antirez / antirez/hping

During file tx, too many packets are transmitted

Abierto
#16 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C
Estrellas
1.7k
Forks
364
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.