antirez / antirez/hping

During file tx, too many packets are transmitted

Đang mở
#16 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C
Star
1.7k
Fork
364
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.