antirez / antirez/hping

During file tx, too many packets are transmitted

Aperta
#16 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C
Stelle
1.7k
Fork
364
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I am transferring a file with these parameters:
hping3 10.0.1.5 --icmp --sign data --file target.txt -d 100 -u -C 11
Listener:
hping3 10.0.1.4 --listen data -I eth0

File contains:
Lorem ipsum dolor sit amet, sed ad nibh recusabo, eos albucius periculis constituto no. Per exerci dicunt an. Ut impetus saperet labores sed.

I receive:
Lorem ipsum dolor sit amet, sed ad nibh recusabo, eos albucius periculis constituto no. Per exerci dicunt an. Ut impetus saperet labores sed.
Lorem ipsum dolor sit amet, sed ad nibh recusabo, eos albucius periculis constituto no. Per exer

All my transfers are like this and depending on my data frame value I get more or less but rarely the exact file. I viewed the pcaps, and there seems to be 1 or 2 extra packets sent that are exactly the same as the very first 1-2 packets. To get around this, I base64 encode it as base64 data has "==" delimiters. I then "cut" it on the first "==" so it is no longer repetitive.

As an example (once the data being sent is base64 encoded):
# $1 - sending IP
# $2 - signature
# $3 - interface
# $4 - file to save as
# Usage: hping3 [sender ip] --listen [signature] -I [interface] > [file]

hping3 $1 --listen $2 -I $3 > ./.temp1
trap " " INT
echo "past trap"
cut -f1 -d '=' ./.temp1 | tr -d '\n' > ./.temp2
echo -n '==' | cat ./.temp2 - > $4
rm ./.temp2 & rm ./.temp1

I am sending this data from one VM to another and do not see any reason for retransmitted packets.
![icmp-capture](https://cloud.githubusercontent.com/assets/9759855/9101298/b1d2abd0-3baa-11e5-8760-e23fc241211b.png)

Right click and save the file > Change the file from *.png to *.pcapng to view in wireshark to see the extra packet that was sent. It's not just in this ICMP type either, type 0 did this as well.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.