Jump to content

Need help with sending packets.

- - - - -

  • Please log in to reply
9 replies to this topic

#1
Sylfaen

Sylfaen

    Newbie

  • Members
  • Pip
  • 3 posts
EDIT::: Instead of the confusing mess I was looking for previously, here's what i need insead. I need a program to generate numbers into a text document for me.

I need it to go like this:

(4E 65 77 20 53 65 6E 64 08 00 00 00 08 00 C6 66 1C 5C *00* *00* 08 00 00 00)
(4E 65 77 20 53 65 6E 64 08 00 00 00 08 00 C6 66 1C 5C *00* *01* 08 00 00 00)
(4E 65 77 20 53 65 6E 64 08 00 00 00 08 00 C6 66 1C 5C *00* *02* 08 00 00 00) Once the second colum of *XX* Hits FF, The first switched to 01.. So..
(4E 65 77 20 53 65 6E 64 08 00 00 00 08 00 C6 66 1C 5C *01* *00* 08 00 00 00)
(4E 65 77 20 53 65 6E 64 08 00 00 00 08 00 C6 66 1C 5C *01* *01* 08 00 00 00)
All the way up to...
(4E 65 77 20 53 65 6E 64 08 00 00 00 08 00 C6 66 1C 5C *FF* *FF* 08 00 00 00)
Of course, without the parenthesis or asteriks. So, 00 00 - FF FF for those two bytes.

And need the rest of it to remain constant. If it makes it more simple, each string can start on a new line, and there doesn't need to be spaces between the numbers. If anyone can tell me how to do this, a program or something, that should be all I need. <3

EDIT 2: I found this: Generate List of Sequential Numbers
It's what I need, with the exception that it doesn't register hex values, only numbers. So I can only get 10 00 - 99 99.

Edited by Sylfaen, 24 January 2011 - 07:12 AM.


#2
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts
Were you talking about TCP packets? UDP packets? or... ? Please explain how these packets are sent? through some network protocols? through named pipes? Please provide more on the how the packets got transported from the packet editor to the receiver.

#3
Sylfaen

Sylfaen

    Newbie

  • Members
  • Pip
  • 3 posts
These packets are being Sent to the client through TCP I believe.. Not entirely sure, using a program called Winsock Packet Editor (WPE Pro)

#4
sam_l

sam_l

    Learning Programmer

  • Members
  • PipPipPip
  • 52 posts

Quote

Were you talking about TCP packets? UDP packets? or... ? Please explain how these packets are sent? through some network protocols? through named pipes? Please provide more on the how the packets got transported from the packet editor to the receiver.

Irrelevant and possibly confusing to the original poster.

@OP : Your goal is to use automate the sending of specific packets. The method of going about it and the ability to do so will vary depending on the language. Ultimately you are going to have to create your packet from the ground up. I would recommend starting at this page, A brief programming tutorial in C for raw sockets.

Edited by sam_l, 24 January 2011 - 12:03 AM.
Formatting.


#5
Sylfaen

Sylfaen

    Newbie

  • Members
  • Pip
  • 3 posts
I think I broke this thread some how... I no longer see the original post

Edited by Sylfaen, 24 January 2011 - 07:13 AM.


#6
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts

sam_l said:

Irrelevant and possibly confusing to the original poster.

Lol, so if someone only tells you that they have to send packets, you immediately know that they mean UDP packets? How could you know it's not UPS packet? Don't tell me you are a psychic. :)

#7
sam_l

sam_l

    Learning Programmer

  • Members
  • PipPipPip
  • 52 posts

Quote

Lol, so if someone only tells you that they have to send packets, you immediately know that they mean UDP packets? How could you know it's not UPS packet? Don't tell me you are a psychic.

He is going to have to figure out the data-structure, I'm not writing the code for him, just showing him a good place to get an idea of how to go about it.

Edited by sam_l, 25 January 2011 - 05:55 AM.


#8
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts
^Lol, so you just need to define the data structure and it will automatically choose the protocol to correctly send it? Btw, do you know UDP and TCP packets have very different structure? Without asking what kind of packet he is interested in, how do you know which header and which structure to use?

#9
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts
I just realized that the original post is now completely different from what it was originally (when I posted the first reply). To OP, please next time do not do major change to any posts you've made.

Anyway, it looks that now you don't need to directly send packages. Just want to generate the lines. It's actually very easy. Just keep a string constant, and a byte variable, and a counter variable. What programming language are you familiar with? I believe all language could do this simple thing.

#10
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
What language does this has to be in?
I think you can even generate that list in excel :P




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users