Comments (7)
You may run with -D (debug) to try to see more details about interface selection
from hping.
@njombart
I've tried as you suggested - looks like it gives up after trying a few interfaces.
Below is the result:
$ sudo ./hping3 -D -I tun0 -S -p 443 10.2.20.74
DEBUG: if lo: Don't Match (but seems to be UP)
DEBUG: if eth0:avahi: Don't Match (but seems to be UP)
DEBUG: if wlan0: Don't Match (but seems to be UP)
DEBUG: if br0: Don't Match (but seems to be UP)
DEBUG: if vmbridge: Don't Match (but seems to be UP)
DEBUG: if lxdbr0: Don't Match (but seems to be UP)
DEBUG: if vmwarews12br0: Don't Match (but seems to be UP)
DEBUG: if vmwarews12br1: Don't Match (but seems to be UP)
DEBUG: if vmwarews12br2: Don't Match (but seems to be UP)
DEBUG: if vmwarews12br3: Don't Match (but seems to be UP)
DEBUG: if vmwarews12br4: Don't Match (but seems to be UP)
DEBUG: if br-0039e1852ce5: Don't Match (but seems to be UP)
DEBUG: if docker0: Don't Match (but seems to be UP)
DEBUG: if br-37a9a1f3ebc0: Don't Match (but seems to be UP)
DEBUG: if docker_gwbridge: Don't Match (but seems to be UP)
DEBUG: if virbr1: Don't Match (but seems to be UP)
using lo, addr: 127.0.0.1, MTU: 1500
DEBUG: pcap_open_live(lo, 99999, 0, 1, 0x626820)
DEBUG: dltype is 1
HPING 10.2.20.74 (lo 10.2.20.74): S set, 40 headers + 0 data bytes
45 00 00 28 BE E8 00 00 40 06 00 00 7F 00 00 01 0A 02 14 4A 09 7B 01 BB 2D 8F 02 EF 34 9D AA C4 50 02 02 00 F5 7F 00 00
DEBUG: under pcap_recv()
DEBUG: [pcap_recv] p = NULL
DEBUG: [pcap_recv] p = NULL
DEBUG: [pcap_recv] p = NULL
DEBUG: [pcap_recv] p = NULL
DEBUG: [pcap_recv] p = NULL
DEBUG: [pcap_recv] p = NULL
That DEBUG: [pcap_recv] p = NULL
continuously floods my screen and intermittently tossing a line similar to the one below every ~930 lines:
45 00 00 28 BE E8 00 00 40 06 00 00 7F 00 00 01 0A 02 14 4A 09 7B 01 BB 2D 8F 02 EF 34 9D AA C4 50 02 02 00 F5 7F 00 00
from hping.
Unfortunately for me, since I make the VPN link after all other links have come up (or much later in the day or when the link drops and recreated), the VPN interface (tun0
) is normally at the bottom of the list.
So it seems that maybe a flag could be provided that instructs HPING to keep trying to the end of the list or maybe give it a regexp
of interfaces to exclude. For instance, if I remove the interfaces with noqueue
and those in a DOWN
state, I end up with a much smaller list of interfaces to try:
$ ip l l | perl -l -0777 -ne 'for (m{^[0-9].*?(?=^[0-9]|\Z)}gsm) {print if !/noqueue|DOWN/}'
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 3c:a9:f4:39:9c:d0 brd ff:ff:ff:ff:ff:ff
61: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
link/none
62: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 90:f6:52:17:e1:81 brd ff:ff:ff:ff:ff:ff
And as you can see, today I have 46 interfaces:
$ ip l l | awk '/^[0-9]*:/ {print}'| wc -l
46
from hping.
Yep there is a limit to 16 interface which was enough before container times ...
I would suggest increase this limit in getifname.c
as a workaround
from hping.
@njombart thanks for the suggestion.
I'll use it as a workaround for now.
If this is not something planned for a future update, then please close this issue.
from hping.
For completeness sake, here's what I had to modify to get it to work in my environment of numerous interfaces.
Modify file getifname.c
line 47 on commit 3547c7691742c6eaa31f8402e0ccbb81387c1b99
of master
branch:
From:
struct ifreq ibuf[16],
To:
struct ifreq ibuf[80],
from hping.
I ran into this issue today. My environment has a lot of VLAN interfaces.
Just a note, for Docker containers, you can make use of macvlan network driver to get rid of extra veth interfaces in init netns.
Don't forget to change memset(ibuf, 0, sizeof(struct ifreq)*16);
line as well.
from hping.
Related Issues (20)
- Hping causes core dump
- Website DOWN
- 在windows下如何安装? HOT 1
- Scanning with udp (`-2`) results in bogus messages
- hping3 -i u10000,is 100 packets for second, not 10 packets for second HOT 2
- Support for multithreading
- hping occasionally reports RTT+1s instead of real RTT HOT 1
- Getting Compilation Error When Running make command to install the hping in Ubuntu 19.04
- DUP false positive
- Suggest improvement to "RECTUM" error message
- gcc warns memcpy will always overflow: memcpy(&icmp, p, sizeof(subtcp)); (Mac OS)
- fix typo: "tramitted" --> "transmitted"
- problem
- Ipv6 support?
- hping had better reset signal mask to ensure SIGALRM is unblocked
- hping3 -F -P -U 192.168.1.3 -P 80 hping3: you must specify only one target host at a time HOT 1
- Increase interfaces limit to 4096
- QUIC protocol support?
- IPV6 Support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hping.