Packets....

For general discussion of Project Volucris

Moderators: Joe M., Karl G.

Packets....

Postby lawn gnome » Tue Jun 05, 2007 6:10 pm

i wasnt sure where to post this, but i have a question about how i can format a raw packet in a C++ program. I have been asking on Xentales didnt have much help (my original topic is here http://www.xentales.com/viewtopic.php?f=34&t=59289).

(this is just the last post i made in the topic on xentales)
How should i format the raw packet??? iv tried 2 different ways.
Code: Select all
char packet[] = { 0x00, ect, ect, ect };
or
char packet[] = { "00, ect, ect, ect" };



also, CommView displays the raw packet in 2 different formats....like here is the packet to turn the warlock into a fireball.
Code: Select all
0x0000   00 20 E0 7E 12 31 00 0E-9B 28 D6 16 08 00 45 00   . à~.1..›(Ö...E.
0x0010   00 25 3A 7D 00 00 80 11-36 6A C0 A8 00 04 40 22   .%:}..€.6jÀ¨..@"
0x0020   C9 12 06 09 13 BA 00 11-5A 00 46 41 98 3B D3 AB   É....º..Z.FA˜;Ó«
0x0030   B8 FE 57                                          ¸þW



and then when i tell it to send it displays it like this
Code: Select all
0x0000   00 20 E0 7E 12 31 00 0E 9B 28 D6 16 08 00 45 00   . à~.1..›(Ö...E.
0x0010   00 25 3A 7D 00 00 80 11 36 6A C0 A8 00 04 40 22   .%:}..€.6jÀ¨..@"
0x0020   C9 12 06 09 13 BA 00 11 5A 00 46 41 98 3B D3 AB   É....º..Z.FA˜;Ó«
0x0030   B8 FE 57                                          ¸þW



the first one has the "0E-9B" and the second one uses "0E 9B"....

what one should i be using. I think this could be the cause of my problems in why its not working for me lol
User avatar
lawn gnome
Traveler
Traveler
 
Posts: 93
Joined: Fri Dec 22, 2006 8:55 pm

Postby thadiusofx3 » Tue Jun 05, 2007 8:16 pm

I don't think theres any difference
Image
Thus spake the master programmer, "After three days without programming, life becomes meaningless"
User avatar
thadiusofx3
Knight
Knight
 
Posts: 887
Joined: Mon Dec 18, 2006 11:46 pm
Location: Jonesboro, AR

Postby lawn gnome » Tue Jun 05, 2007 8:22 pm

hrm....well how come it never works then? i send the packet like 20 times and it doesnt work.... ??
User avatar
lawn gnome
Traveler
Traveler
 
Posts: 93
Joined: Fri Dec 22, 2006 8:55 pm

Postby thadiusofx3 » Tue Jun 05, 2007 9:18 pm

read up some more on packets, I don't think you're formatting it, or sending it right.
I dunno though haven't looked at it closely
Image
Thus spake the master programmer, "After three days without programming, life becomes meaningless"
User avatar
thadiusofx3
Knight
Knight
 
Posts: 887
Joined: Mon Dec 18, 2006 11:46 pm
Location: Jonesboro, AR

Postby Karl G. » Wed Jun 06, 2007 7:52 am

It looks like the dash is purely a function of your editor; the ascii/hex codes are the same so it should be the same thing. It's possible that EJ has implemented a system to prevent such simple packet-hacking, however. I know that my network system does.
User avatar
Karl G.
Lesser Spirit
 
Posts: 2453
Joined: Sat Mar 04, 2006 10:26 am

Postby lawn gnome » Thu Jun 07, 2007 6:22 pm

i belive i found the problem....i dont know what port im sending from or how to send from a specific port. most packets that goto xenimus come from port 1407 or 1536. Anyone know how i can send from a specific port?
User avatar
lawn gnome
Traveler
Traveler
 
Posts: 93
Joined: Fri Dec 22, 2006 8:55 pm

Postby Karl G. » Thu Jun 07, 2007 8:08 pm

You can try binding your socket as if you want to receive, then sending using the same socket. Usually it will just randomly assign a socket on an outgoing port without one.
User avatar
Karl G.
Lesser Spirit
 
Posts: 2453
Joined: Sat Mar 04, 2006 10:26 am


Return to Volucris



Who is online

Users browsing this forum: No registered users and 1 guest