-
- Founder:
- bmsleight
-
- Members:
- 68
-
- Posts:
- 795
-
- Founded:
- 6 months ago
-
- Newest Member:
-
christianp3
Discuss coding your own bots to pay on betfair and other betting exchanges.
+0
permalink
permalink
I've been playing poker online for a number of years. It's a game that both excites me and depresses me so i tend to play a lot and then take timeout for a few months or more.
Anyway, just wondering if we have any other poker players here? I'm working on several tools for betfair poker, would be nice to discuss ideas with someone who shares an interest...
Anyway, just wondering if we have any other poker players here? I'm working on several tools for betfair poker, would be nice to discuss ideas with someone who shares an interest...
+0
permalink
permalink
I play poker online and offline. I have yet to try the betfair poker. I'd imagine it it full of poker bots already. I did have a long think about making a poker for a normal online poker-sites, but after the Americans really clamped down on visa payment to poker site the whole liquidity dropped out of the market.
I apologize in advance, but this it what I found. The American casual player, pre-clamp down, where of a far lower standard than European online players. Once the Americans when away the liquidity was down and standard went up. To such a extent that I can scrap a small profit, but time is better invested into my betfair bots. Then again - some day by bots.....
I have a friends (offline) poker match on Friday.
Anyway rambling reply over. What ideas ?
+0
permalink
permalink
I've found that betfair is one of the loosest sites i've ever played. There are a lot of Italians and Greeks playing there and you'll be surprised how many players will call their whole stack preflop with a rag-ace and worse. This obviously makes the games very volatile and badbeats are common. I mostly play sit n go tourneys to try and steady the variance. I've recently setup a new account in order to get rakeback and it's surprising how much it adds up to each month, considering i very rarely play higher than $10 a game.
My own personal project is a "helper" program. The target is to create a live odds calculator for both win % and pot odds and then at a later stage i'll be adding a hand history parser in order to profile each opponent. I've had the calculator working quite nicely but i've hit a few intermittent faults with the screen scraping code and i can't seem to pinpoint the fault. I suppose it could be made into a bot eventually but i'd much rather play the game myself as there are sooo many variables in NL poker and programming any decent sort of bluffing engine is a major task.
From what i've read online, there are easier sites to work with such as Party Poker (who's hand histories can be read realtime using ReadProcessMemory API) or PokerStars (who save realtime info to a log file), but the fact they are "easy" means that those sites are full of bots. And of course Betfair is the deepest fish bowl i've ever played...
My own personal project is a "helper" program. The target is to create a live odds calculator for both win % and pot odds and then at a later stage i'll be adding a hand history parser in order to profile each opponent. I've had the calculator working quite nicely but i've hit a few intermittent faults with the screen scraping code and i can't seem to pinpoint the fault. I suppose it could be made into a bot eventually but i'd much rather play the game myself as there are sooo many variables in NL poker and programming any decent sort of bluffing engine is a major task.
From what i've read online, there are easier sites to work with such as Party Poker (who's hand histories can be read realtime using ReadProcessMemory API) or PokerStars (who save realtime info to a log file), but the fact they are "easy" means that those sites are full of bots. And of course Betfair is the deepest fish bowl i've ever played...
+0
permalink
permalink
Now there's some minor coincidence. I started playing betfair poker about a week ago. I can't play for toffee and have probably lost 95%+ STTs I've been playing. One upside, it's the most enjoyable gambling I've experienced for ages. I didn't realise what all the fuss was, e.g. constant TV advertising for poker sites etc. It's a fun way to lose money. I'm not interested in botting it tho - I don't even know how to win yet lol
+0
permalink
permalink
FRED, read a book! Don't go chucking money away cos it can be a tough game to beat. And play Freeroll multis to gain some experience. As a very basic sit n' go strategy, wait for AA/KK/QQ/JJ/TT/99/AK and push all-in preflop. You'll be surprised how often you can win a tourney doing that.
bmsleight, i've already got my evaluation code sorted. It can Monte Carlo about 80,000 games a sec on my oldish AMD 3000. Not as fast as some of the C++ ones but plenty fast enough to obtain an accurate result.
My biggest problem is consistently reading the game info. I'm using BitBlt() and taking screen snapshots and then comparing them to a saved library. as i said before, it works well most of the time but has an occasional blip and stops reacting until the next game starts. Quite annoying TBH. Have read several articles that suggest using DLL Injection or API hooking but i'm inexperienced with such techniques and i'm not even sure if they'll solve my problems.
bmsleight, i've already got my evaluation code sorted. It can Monte Carlo about 80,000 games a sec on my oldish AMD 3000. Not as fast as some of the C++ ones but plenty fast enough to obtain an accurate result.
My biggest problem is consistently reading the game info. I'm using BitBlt() and taking screen snapshots and then comparing them to a saved library. as i said before, it works well most of the time but has an occasional blip and stops reacting until the next game starts. Quite annoying TBH. Have read several articles that suggest using DLL Injection or API hooking but i'm inexperienced with such techniques and i'm not even sure if they'll solve my problems.
+0
permalink
permalink
I play on Absolute Poker, mainly because they have a Java client and I use linux (realtime plain text Hand Histories as well, birchy). Used to use Paradise under wine, but got fed up of the way it scattered files all over my home directory.
I noticed the same thing as bmsleight just after the US clampdown, the only Yanks who played were sharks prepared to make the effort. I don't think that's so true now though, a lot of fish are creeping back from over the pond as circumvention methods filter down..(I mentioned the football at a ring game the other night and no-one knew what I was on about).
I think the games would have to be much looser than they are before I would risk using a bot to play, but as birchy says, helper apps can be very useful. I used to slap all the hand histories into a database and use that to identify strong/weak players and such. It's very useful for analysing your own play as well, I found I was overplaying KK (used to treat it pretty much like AA), and JJ (ditto, playing it like QQ), and losing a lot on things like KQ and KJ suited when I hit a flush (you only ever get action against an Ace-Rag).
I don't use helper apps now, I would have to alter the code for the new site, and there are higher priorities on my coding time (horesracing bots especially). After this thread, though, it's going back on my to-do list, right under the v6 API upgrade....
+0
permalink
permalink
Thanks for the guide birchy. I've read a few, but when it comes to the crunch it goes out the window as I'm only playing for fun! Might sink in eventually but I'll probably get bored before then. I wouldn't dream of manually placing bets on sports, I leave that to my bots, but I'm currently finding poker ($2.50 STTs etc) quite entertaining (cheap thrills)
+0
permalink
permalink
Real-time hand history access is the perfect backbone for any poker tool, however i'm VERY skeptical of Absolute after they got busted for having a Super User account. Was something to do with one of the owners as well. It's a well publicised case. And i've not long setup my rakeback on betfair so i'm determined to get it working. Has anybody played around with packet sniffing and decryption? Now THAT would be a sweeeeet way of following the game.
Fred, i tend to play Super Turbos. A lot of the "sharks" on the forums say that the Super Turbos are nothing more than a crapshoot, however i've devised a highly aggressive strategy and regularly cash in abvout 50% of games. Poker is all about patience and aggression...
Fred, i tend to play Super Turbos. A lot of the "sharks" on the forums say that the Super Turbos are nothing more than a crapshoot, however i've devised a highly aggressive strategy and regularly cash in abvout 50% of games. Poker is all about patience and aggression...
+0
permalink
permalink
Thanks for the heads-up on Absolute, birchy, didn't know about that.
Packet sniffing on Windows 9.x used to be straightforward (there was some Italian University freeware that was blinding), but NT/W2k/XP was a pain. You needed some MS libraries that were only available for server versions, and I could never get it to work properly on my system.
Recently, MS made their sniffer (Microsoft Network Monitor) available as a free download, but I don't know how good it is.
I use tcpdump on linux which is very good and well established; perl has modules which make it painless, and I would imagine other languages do as well. It is also available for Windows, but I've never used it on that platform.
Anyway, getting the raw packets should be quite straightforward (did it for Paradise about 3 years ago), but I couldn't decrypt them so I gave up. Hope you have more luck.
+0
permalink
permalink
Did anyone else read these articles on writing a poker bot?
http://www.codingthewheel.com/archives/how-i-built-a-working-poker-bot
http://www.codingthewheel.com/archives/how-i-built-a-working-online-poker-bot-2
I thought they were interesting - but then I know nothing about poker. 
+0
permalink
permalink
JPL, yes read those (and the 3rd one) very recently. Interesting stuff, although he's not shared much in the way of code. All i'm interested in is getting live data/hand histories from betfair in order to trigger my odds calculator. I'm eagerly awaiting the 4th installment but some of the commentors suggest it's nothing more than a hype site and that he'll never actually share any USEFUL code.
I also found OpenHoldem which is an open source version of WinHoldem. Again, that uses screen scraping and betfair poker is a bitch to scrape due to the fact they've deliberately fiddled with randomizing the pixel colours. Actually, it's quite scary how many "secret" botters are coming out of the woodwork and i wouldn't be at all surprised if at least 10% of all online poker players are now bots. The only consolation is that The Univerity Of Alberta has been studying this subject for many years and despite a whole host of cleverly constructed neural networks and AI, they've not really produced a bot capable of beating human players other than ones it has played 1,000's of times before.
Regarding my own "mediocre" project, my target is to create some kind of realtime game streamer. I've manage to rig up a VB6 packet sniffer using a 3rd party app called WinPcap, although i'd like to knock something up myself using Winsock and/or C++. Decrypting the incoming packets looks like a mammoth task. ReadProcess memory has failed to find any hand history info in memory so i assume the strings are built server-side and sent in one lump at the end of the game. Been playing around with OllyDbg but don't really know what i'm looking for. Do we have any gamerz/hacky/cracky types on here who'd like to earn a few quid?
I also found OpenHoldem which is an open source version of WinHoldem. Again, that uses screen scraping and betfair poker is a bitch to scrape due to the fact they've deliberately fiddled with randomizing the pixel colours. Actually, it's quite scary how many "secret" botters are coming out of the woodwork and i wouldn't be at all surprised if at least 10% of all online poker players are now bots. The only consolation is that The Univerity Of Alberta has been studying this subject for many years and despite a whole host of cleverly constructed neural networks and AI, they've not really produced a bot capable of beating human players other than ones it has played 1,000's of times before.
Regarding my own "mediocre" project, my target is to create some kind of realtime game streamer. I've manage to rig up a VB6 packet sniffer using a 3rd party app called WinPcap, although i'd like to knock something up myself using Winsock and/or C++. Decrypting the incoming packets looks like a mammoth task. ReadProcess memory has failed to find any hand history info in memory so i assume the strings are built server-side and sent in one lump at the end of the game. Been playing around with OllyDbg but don't really know what i'm looking for. Do we have any gamerz/hacky/cracky types on here who'd like to earn a few quid?

+0
permalink
permalink
Heads up - there's an article on slashdot about high-end poker bots
(http://games.slashdot.org/article.pl?sid=08/07/03/214245),
mainly about the University of Alberta program
( http://poker.cs.ualberta.ca/ )
They are the guys who came up with a total solution to draughts, btw, so they know their stuff regarding theoretical game playing.
+0
permalink
permalink
This is a continuation in order to prevent http://diybetfairbots.lefora.com/2008/08/28/web-scraping-in-java-or-c/page1/#post934476 going off topic...
I've not actually tried Betfair poker in Linux. My love for Betfair has ended over the last month or so. Long story short, i was making a nice steady profit (despite regular badbeats) and then my "luck" seemed to turn to nothing but badbeats. The last game i played there was a $10 heads up STT. First hand of the game, i get dealt KK. Opponent is on the SB and raises 3BB. I re-raise, he re-raises, i push all-in. He's got AA. 1 hand and game over. That was just the tip of the iceburg but also a final straw for myself. Don't get me wrong, i've played poker online for a number of years, so i accept that badbeats are a normal part of the game. It's just that on some sites, the badbeats are abnormally frequent....
So now i'm looking at browser based clients. Never played the B2B network, so i'd like to give that a go via Betdaq or Devilfish Poker as they do a rakeback deal of 30% fixed or upto 60% based on liquidity. So now i'm trying to get info on how to scrape an APPLET without using screen scraping. Several have suggested downloading the Jar file, decompiling it and then modifying it/rebuilding. That's all very well, but what happens when they update the server-side client and discover that the applet you supposedly just downloaded is not the same applet that you are running?
I have several posts regarding this, but no clear answers yet. Interesting reads:
http://www.criticalsecurity.net/index.php?showtopic=30566
http://www.criticalsecurity.net/index.php?showtopic=30320
http://www.devdaily.com/java/edu/pj/pj010020/
http://www.codingthewheel.com/archives/how-i-built-a-working-poker-bot (no upto 8 parts)
http://code.google.com/p/openholdembot/
http://pokerai.org/pf3/viewtopic.php?f=3&t=16
The list could go on and on if i were to list every injection and evaluation site as well....
I just wondered how you were managing with online poker under linux. I remember you were keen on the betfair site a month or so ago; have you had any luck running their software under linux?
I've not actually tried Betfair poker in Linux. My love for Betfair has ended over the last month or so. Long story short, i was making a nice steady profit (despite regular badbeats) and then my "luck" seemed to turn to nothing but badbeats. The last game i played there was a $10 heads up STT. First hand of the game, i get dealt KK. Opponent is on the SB and raises 3BB. I re-raise, he re-raises, i push all-in. He's got AA. 1 hand and game over. That was just the tip of the iceburg but also a final straw for myself. Don't get me wrong, i've played poker online for a number of years, so i accept that badbeats are a normal part of the game. It's just that on some sites, the badbeats are abnormally frequent....
So now i'm looking at browser based clients. Never played the B2B network, so i'd like to give that a go via Betdaq or Devilfish Poker as they do a rakeback deal of 30% fixed or upto 60% based on liquidity. So now i'm trying to get info on how to scrape an APPLET without using screen scraping. Several have suggested downloading the Jar file, decompiling it and then modifying it/rebuilding. That's all very well, but what happens when they update the server-side client and discover that the applet you supposedly just downloaded is not the same applet that you are running?
I have several posts regarding this, but no clear answers yet. Interesting reads:
http://www.criticalsecurity.net/index.php?showtopic=30566
http://www.criticalsecurity.net/index.php?showtopic=30320
http://www.devdaily.com/java/edu/pj/pj010020/
http://www.codingthewheel.com/archives/how-i-built-a-working-poker-bot (no upto 8 parts)
http://code.google.com/p/openholdembot/
http://pokerai.org/pf3/viewtopic.php?f=3&t=16
The list could go on and on if i were to list every injection and evaluation site as well....
+0
permalink
permalink
By the way, Birchy, if you're still tinkering with Betfair's Poker client and ReadProcessMemory, etc., you might want to have a look at this analysis of Skype:
http://www.blackhat.com/presentations/bh-europe-06/bh-eu-06-biondi/bh-eu-06-biondi-up.pdf
It covers a number of things that can be done to obfuscate an EXE. I found it pretty interesting.
+0
permalink
permalink
Hi Nadat.
As far as Windows clients are concerned, there are a couple of threads on critical security that describe how to step through the exe with Olly debugger and locate the SSL routines. In the case of Betfair and PKR, they use OpenSSL library. PKR imports a DLL and Betfair have inlined the code. In either case, there are some nicely detailed tutorials on how to use DLL injection to "bounce" the live game data into your own app. It should be an easy task for anyone who is fluent in debugging, assembler and C++. Unfortunately, i'm not fluent and i'm no longer using Windows.
As far as Windows clients are concerned, there are a couple of threads on critical security that describe how to step through the exe with Olly debugger and locate the SSL routines. In the case of Betfair and PKR, they use OpenSSL library. PKR imports a DLL and Betfair have inlined the code. In either case, there are some nicely detailed tutorials on how to use DLL injection to "bounce" the live game data into your own app. It should be an easy task for anyone who is fluent in debugging, assembler and C++. Unfortunately, i'm not fluent and i'm no longer using Windows.
+0
permalink
permalink
Nadat, you're obviously quite clued up on programming. Do you have any suggestions for how i would go about reading info from the browser based Betdaq or 24hpoker applets? The graphics look nice and "flat", so i could possibly screen-scrape but that's a last resort. Could i perhaps play with the JVM or JRE and get it to spit out useful info? I'm trying to do this in a way that won't require a lot of code modification when the poker aplet is updated. But i'm not really sure which areas to concentrate on...
+0
permalink
permalink
Birchy, I found your Botchy posts on criticalsecurity.net. I've not had much to do with Java applets, but the first thing I'd do is try to enable the log4j logging they've left in there. You'd need to modify the log4j.properties file in pokerclient.jar to set the root category to DEBUG. I've not used log4j with an applet, so I don't know if or where it's able to write a log file; probably outputs to the console, though. After changing the properties in the JAR, you'll find out whether or not you can use a modified JAR on your HDD, or whether they check its hash or something. The logs might give you some ideas or they might be completely useless. Don't know, but it'd be my first step.
+0
permalink
permalink
I don't have time to try that right now but when i first downloaded all the required Jar files and modified the html applet launcher to use local copies, it would start to load up and then stop. From what i understand about applets, the security restrictions imposed by java requires that all files (codebase) must be located on the same server that sends/recieves data to/from the applet. Having the files on my local drive but transferring data via a different/remote server appears to be a no-no....well, as far as i understand it. I remember discovering that on the Sun website, however i may have misunderstood it.
I did play around with some socket code in both Java and C++ in order to try and capture the packets as a Man-In-The-Middle application but i was unable to listen to port 443 due to it being already open/bound. Even if i achieved that, the MITM server address would be wrong so i'm guessing that i'd need to sniff the packets without touching them. And then of course i'd have to decompile the Jar files, track down the encrypt/decrypt algorithm and build it into my sniffer.
I always thought that i was fairly good at programming but it's jobs like this that make me feel like a complete noob.
I did play around with some socket code in both Java and C++ in order to try and capture the packets as a Man-In-The-Middle application but i was unable to listen to port 443 due to it being already open/bound. Even if i achieved that, the MITM server address would be wrong so i'm guessing that i'd need to sniff the packets without touching them. And then of course i'd have to decompile the Jar files, track down the encrypt/decrypt algorithm and build it into my sniffer.
I always thought that i was fairly good at programming but it's jobs like this that make me feel like a complete noob.

This Topic Is Locked To Guest Posts
It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member