Thread: Trying to Mimic an Internet Program!

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    9

    Trying to Mimic an Internet Program!

    Hi Guys,
    I need help from the experts on this. I have a client program on my computer that connects to servers and sends information and commands and receives data. It's like a chat client (that's one of its functions) and it has a nice GUI. I want to write my own interface for the program, though, so I need to find a way to sort of intercept the information coming from the servers and mimic the information that would come from the real client. Is there a way to figure this out just by having the program on the computer? The data is probably (definitely) encrypted.

    Is there another way to do this? Could I somehow read the information that's displayed on the screen and then deal with that info in my program? I'd need to simulate mouseclicks then, and I don't know how to do that. I'm a good programmer as far as algorithms and code and whatnot are concerned, but I know nothing about internet-aware programs in C++ and I don't know enough about hacking stuff to be able to figure out how this program talks to the servers.

    If this wasn't clear, let me know. This is a small but crucial part of a really important project, so I would greatly appreciate any help you can provide. Thanks,
    Michael

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    The first thing to understand imho, is the protocol used by the client+server. But as the "data is probably (definitely) encrypted", you'll have a hard time working this out simply by monitoring the connection.

    I'd suggest you contact the programs author, and ask if they would let you have a copy of their documentation, or if there is an API that they allow developers like yourself to interface to.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    9
    thanks Hammer,

    I tried contacting the company and asked about the protocol, but three e-mails and three weeks have passed without reply. Maybe some phone calls and snail mail are in order.

  4. #4
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    If it isn't open source, and there's no API, chances are they won't answer you one way or another. Not everyone wants other developers dipping their fingers into their code. What's the app anyway?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  5. #5
    Registered User
    Join Date
    Sep 2003
    Posts
    9
    Aha...the app. It's the PartyPoker.com online poker client. I'm looking to write a more sophisticated UI that will show me players' stats and allow me to keep notes in front of me all the time.

    It sounds silly and poker-addicty, but for the amount of money that this could/would make me it's worth the effort.

    I'm talking to the PartyPoker folks again right now, so we'll see what I can find out about the protocol...

  6. #6
    Registered User
    Join Date
    Sep 2003
    Posts
    9
    Ok, so here's the deal. I talked to the PP folks and they said (after several transfers and dozens of minutes on hold) that the protocol is TCP and it goes through port 2147. They also said that it's not encoded data, so I can read it as straight ascii text (!)

    How do I watch the port so I can get the syntax of the messages and commands down? There must be C++ libraries and whatnot for straight TCP, so could you point me in the direction of documentation for that? Now I'm psyched, this could actually get going.

    Thanks for your help so far, Hammer.

  7. #7
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    A quick Google gave me this.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  8. #8
    Registered User
    Join Date
    Sep 2003
    Posts
    9
    Awesome! So I downloaded and installed Ethereal, and what it gave me was some whacked out stuff. It's not immediately parcible ASCII like the tech guy said it would be. It seems to be encoded, but not entirely. The format isn't pretty, and it's not clear what's going on, even though I know what many of the data packets should contain (information about the cards or the actions of players.)

    Any hints on how I could parse this crapola?

    This is the stuff I sent to the PartyPoker Servers. Am I missing something? Is this just not ASCII text? What could I ask the guys that would help me? At this point, my knowledge and experience is useless, so I'm in dire need of help.

    Code:
      Hn"`wdȁOhq%~u`	'uG>H9yACU2m;6  H,jZb__)#9<V2u|o~"^*[Bhq?a`i  `)SW'T6/=kT$LqXFJ0?'⼽x.+

  9. #9
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    No point in posting that lot! he he.

    Either hex dump it, and go from there, or go back to the supplier and ask them if you can get a copy of their application level protocol (ie how the client and server chit chat to each other). You never know, this info might be on the web anyway, try googling for it.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  10. #10
    Registered User
    Join Date
    Sep 2003
    Posts
    9
    The first guy lied. I called again and they said that - of course - the data is encrypted and that they can't give me any kind of key or application protocol to decode it. That's actually what I expected, but that weenie I called last night gave me false hope. ASCII text indeed.

    What this means is that I'll have to actually run the program in the background and capture the graphics it displays and interpret them as data. Crap. That is, unless some crazy hacker out there wants to figure out how to decode the data.

    Thanks for your help guys, I needed to explore this to assure myself it was a dead end. Any hints on how to get information from the screen or how to simulate mouse clicks?

  11. #11
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    is that stuff legal if it is then can someone show me a good link on hacking to someone elses computer, something like a tutorial maybe? or if u have any info yourself id be happy to see
    it

  12. #12
    Registered User
    Join Date
    Sep 2003
    Posts
    9
    What stuff? Online poker? Absolutely. Cracking someone else's encryption? Probably, unless it's the government's encryption or if the data isn't supposed to be viewed. The thing is, the data I'm trying to get at is already on my computer and already being put to use by a program on my computer. I just want to do something a little different with it. Party Poker doesn't want me to know their encryption method because then I could intercept other peoples' data...i guess. Don't know how that'd be possible, but I understand their security reasons for keeping it secret.

    But online poker rules, if you're good at it. Easily a hundred hands an hour, good stakes, bad players...$40/hr without breaking a sweat.

  13. #13
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    actually i was just hoping to get an answer to the stuff i wrote after that... still r..

  14. #14
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>show me a good link on hacking to someone elses computer
    Yeah, right'o. Anything like that will get deleted by me or another of the moderators.

    Now you've established that it's protected content, how to hack it won't be discussed anymore on here... sorry.

    >> I could intercept other peoples' data...
    I doubt other peoples private data is being sent to your client program, at least, nothing that you can't already see or at least have a good idea of what it is.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  15. #15
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    ok if i hack to my other computer i have then its not any illegal stuff

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 07:49 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM