Uriziel01 Posted February 9, 2008 Share Posted February 9, 2008 (edited) Hi Im doing an implementation of GG protocol in my instant messanger. And i have problem witch TCPSend(). I have C++ code of all the protocol (all functions) from http://ekg.chmurka.net/docs/protocol.html#ch1.1. And im starting with HTTP GET, it return me the IP and opened port of GG server.When i make TCPConnect() to this IP and Port server is sending me Recv=0x0100000004000000349AF1C7 0x0100 - means "Welcome/Greetings" and the rest "000004000000349AF1C7" is seed for hashing function.Next i have to send:#define GG_LOGIN70 0x0019 struct gg_login70 { int uin; /* mój numerek */ - My number of GG char hash_type; /* rodzaj funkcji skrótu hasła */ -type of password hashing char hash[64]; /* skrót hasła */ -hash of my pass. int status; /* status na dzień dobry */ -My GG status int version; /* moja wersja klienta */ -Client version char unknown1; /* 0x00 */ -dunno int local_ip; /* mój adres ip */ -My IP short local_port; /* port, na którym słucham */-My opened Port int external_ip; /* zewnętrzny adres ip */- My external IP short external_port; /* zewnętrzny port */ - My external opened Port char image_size; /* maksymalny rozmiar grafiki w KB */ -Max size of received image files char unknown2; /* 0xbe */ -Dunno p.s char description[]; /* opis, nie musi wystąpić */-Not nessesery int time; /* czas, nie musi wystąpić */-Not nessesery };and my question is, how to send it ? LikeTCPSend($mainsocket,0x0019& 0x16&1535586& "1234567898765432123456789876543"& 0x0002& 0x0b& 0& 0)(the values isnt correct!!) the server returns me nothing, and it should return somme error if im sending incorrect values, or succes if they are correct. i have even tried to sendTCPSend($mainsocket,0x0019) TCPSend($mainsocket,0x16) TCPSend($mainsocket,1535586) next..... next.... next....And again server return me nothing, my TCPRecv loop is looping without any recv ? Any ideas what to do ?? Please help ;(p.s-oh and one more thing !! Wgy at the start server return to me 0x0100000004000000349AF1C7 and greeting bytres are 0x0100 but they shoul be 0x0001 !! Whay?? Edited February 9, 2008 by Uriziel01 Link to comment Share on other sites More sharing options...
Kademlia Posted February 9, 2008 Share Posted February 9, 2008 I dont realy understand what hes writing in the link but it seems you have to send information with the HTTP Get, dont you? GET /appsvc/appmsg4.asp?fmnumber=NUMER&version=WERSJA&fmt=FORMAT&lastmsg=WIADOMOŚĆ Try connecting with the "normal" method or program and logg the traffic (with HTTP Analyzer or something simmilar) Link to comment Share on other sites More sharing options...
Uriziel01 Posted February 9, 2008 Author Share Posted February 9, 2008 GET /appsvc/appmsg4.asp?fmnumber=NUMER&version=WERSJA&fmt=FORMAT&lastmsg=WIADOMOŚĆ i have sended that already ! And after this GET, site appears with IP and Port of the GG server. Please help p.s-if needed i may translate a part of those link Link to comment Share on other sites More sharing options...
Kademlia Posted February 9, 2008 Share Posted February 9, 2008 Please download HTTP analyer; Run it an then run you Messenger Tool (one that works) put the get request in the Request Builder and post a screenshot (delete Cookie/PW aso. first) Then do the same thing with your tool and post a screenshot Examplescreen attached Link to comment Share on other sites More sharing options...
Uriziel01 Posted February 9, 2008 Author Share Posted February 9, 2008 (edited) When im running my script HttpAnalyzer log only the first GET request (server answer is the same as in orginal, and its OK) but it dont see any of the next packets, im using TCPSend and HttpAnalyzer dont see them ??!! Situation is the same when im running the orginal program, HttpAnalyzer log the first GET request and next it get nothing. Some other ideas? Edited February 9, 2008 by Uriziel01 Link to comment Share on other sites More sharing options...
Kademlia Posted February 9, 2008 Share Posted February 9, 2008 Your 100% sure you send the same and get the same back? I thought you get something wrong back with your script Link to comment Share on other sites More sharing options...
Uriziel01 Posted February 9, 2008 Author Share Posted February 9, 2008 (edited) from the orginal script: HTTP/1.0 200 OK 0 0 217.17.45.146:8074 217.17.45.146 From my GET request: HTTP/1.0 200 OK 7797 0 91.197.13.18:8074 91.197.13.1 WooW! This 7797 meas that after header i will receive system message but: Recv=0x0100000004000000E4FD952B ?? What is that system message? Edited February 9, 2008 by Uriziel01 Link to comment Share on other sites More sharing options...
Uriziel01 Posted February 9, 2008 Author Share Posted February 9, 2008 Ok i have corrected the GET request (bad spelling of one word) and now im receiving HTTP/1.0 200 OK 0 0 217.17.45.146:8074 217.17.45.146 This is the same as orginal, but server still isnt responding for TCPSEND Link to comment Share on other sites More sharing options...
Kademlia Posted February 9, 2008 Share Posted February 9, 2008 Hmm can´t realy tell you much more then. In you place i would now install "Port Explorer" from DiamondCS And check the packets the server / you are sending and look for an error.....this can take some time. Link to comment Share on other sites More sharing options...
Uriziel01 Posted February 9, 2008 Author Share Posted February 9, 2008 (edited) Ok i will do that By the way, thx for all you help I will still try to run this and if i have a succes i will post the code See you! Edited February 9, 2008 by Uriziel01 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now