twitchyliquid64 Posted December 18, 2010 Share Posted December 18, 2010 (edited) Hi all, This is a simple question - I want to assemble a message to send in a TCP connection (specifically, guntella) This is what the packet will contain. GUNTELLA HEADER STRUCTURE: Byte Pos Name 0 - 15 Message ID 16 Function ID 17 TTL Remaining 18 Hops taken 19 - 22 Data Length Firstly, how do I individually 'make' data in this fashion? Secondly, how do I 'string' them together? if your wondering? Ill use the guntella network as a backup to find peers for my p2p network. Thx in advance, -Twitchy. Edited April 13, 2013 by twitchyliquid64 ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
trancexx Posted December 18, 2010 Share Posted December 18, 2010 That's fairly simple task using dllstruct: $GUNTELLA_HEADER = DllStructCreate("byte MessageID[16];" & _ "byte FunctionID;" & _ "byte TTLRemaining;" & _ "byte Hopstaken;" & _ "dword DataLength;") ;... set fields here ... ; Binary: $bBinary = DllStructGetData(DllStructCreate("byte[" & DllStructGetSize($GUNTELLA_HEADER) & "]", DllStructGetPtr($GUNTELLA_HEADER)), 1) ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted December 18, 2010 Author Share Posted December 18, 2010 That's fairly simple task using dllstruct: $GUNTELLA_HEADER = DllStructCreate("byte MessageID[16];" & _ "byte FunctionID;" & _ "byte TTLRemaining;" & _ "byte Hopstaken;" & _ "dword DataLength;") ;... set fields here ... ; Binary: $bBinary = DllStructGetData(DllStructCreate("byte[" & DllStructGetSize($GUNTELLA_HEADER) & "]", DllStructGetPtr($GUNTELLA_HEADER)), 1) So then would I just do... $GUNTELLA_HEADER = DllStructCreate("byte MessageID[16];" & _ "byte FunctionID;" & _ "byte TTLRemaining;" & _ "byte Hopstaken;" & _ "dword DataLength;") $FunctionID = ;Um, however you make 16 bytes of randomness $TTLRemaining = 8 $Hopstaken = 0 $DataLength = 0 ; Binary: $bBinary = DllStructGetData(DllStructCreate("byte[" & DllStructGetSize($GUNTELLA_HEADER) & "]", DllStructGetPtr($GUNTELLA_HEADER)), 1) ??? How do you 'set' in Dllstruct??? ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
trancexx Posted December 18, 2010 Share Posted December 18, 2010 Usually by using DllStructSetData function. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted December 18, 2010 Author Share Posted December 18, 2010 (edited) Im still confused: how would I make say 0x50 in the data on the first place? is there any way i can do this without any complex dll structs??? (thx by the way, you walk on golden sand ) ????? $GUNTELLA_HEADER = DllStructCreate("byte MessageID[16];" & _ "byte FunctionID;" & _ "byte TTLRemaining;" & _ "byte Hopstaken;" & _ "dword DataLength;") DllStructSetData ( $GUNTELLA_HEADER, "FunctionID", 0x50) $bBinary = DllStructGetData(DllStructCreate("byte[" & DllStructGetSize($GUNTELLA_HEADER) & "]", DllStructGetPtr($GUNTELLA_HEADER)), 1) ???? Edited December 18, 2010 by hyperzap ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted December 18, 2010 Author Share Posted December 18, 2010 This will help you understand what I plan to do and how the messages must be structured; im not very good at explaining. http://capnbry.net/gnutella/protocol.php The end result (once Ive figured out how to generate the packets) will hopefully be a UDF to fully interact with the Guntella network. ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search 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