Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple ports not working #4

Open
QkiZMR opened this issue Jun 13, 2019 · 4 comments
Open

Multiple ports not working #4

QkiZMR opened this issue Jun 13, 2019 · 4 comments

Comments

@QkiZMR
Copy link

QkiZMR commented Jun 13, 2019

For example if I want to send knocks on few ports with
knocker -d 1000 -p tcp somehost.example.com 123 456 789
command only first knock is sent. All other didnt reach target server.

@rougeth
Copy link
Owner

rougeth commented May 15, 2020

Hey @QkiZMR, do you still have this issue? I couldn't reproduce it.

Running the example_server.py, I'm able to knock all the 3 ports:

❯ python knocker.py -d 1000 -p tcp localhost 59580 59581 59582
knock... knock...

Server output:

❯ python example_server.py
Listening ports: 59580 59581 59582
Ping on 59580
Ping on 59581
Ping on 59582

@QkiZMR
Copy link
Author

QkiZMR commented May 16, 2020

Need to check it because I don't use it since didn't work for me.

@QkiZMR
Copy link
Author

QkiZMR commented May 18, 2020

Still not working but now I checked traffic with tcpdump, not only log files of knockd service like last time. It's even worst that I thought. First log from tcpdump is from working app, works as expected:

 root  /  var  log  tcpdump -n  port 123 or port 456 or port 789                                     tcpdump: verbose output suppressed, use -v or -vv for full protocol decode                               listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes                                20:03:00.631581 IP 5.173.156.15.20778 > 123.45.50.9.123 Flags [S], seq 1751808396, win 65535, options [mss 1424,sackOK,TS val 117028758 ecr 0,nop,wscale 9], length 0                                           20:03:01.750699 IP 5.173.156.15.20780 > 123.45.50.9.456: Flags [S], seq 2502359276, win 65535, options [mss 1424,sackOK,TS val 117029092 ecr 0,nop,wscale 9], length 0                                           20:03:02.950371 IP 5.173.156.15.20782 > 123.45.50.9.789: Flags [S], seq 968692455, win 65535, options [mss 1424,sackOK,TS val 117029434 ecr 0,nop,wscale 9], length 0

Then I checked with knocker and this is tcpdump output:

20:03:28.470823 IP 5.173.156.15.51801 > 123.45.50.9.123: Flags [S], seq 3988535611, win 65535, options [mss 1424,sackOK,TS val 117037105 ecr 0,nop,wscale 9], length 0                                           20:03:29.510794 IP 5.173.156.15.51801 > 123.45.50.9.123: Flags [S], seq 3988535611, win 65535, options [mss 1424,sackOK,TS val 117037406 ecr 0,nop,wscale 9], length 0                                           20:03:29.510872 IP 5.173.156.15.51800 > 123.45.50.9.456: Flags [S], seq 1731991619, win 65535, options [mss 1424,sackOK,TS val 117037423 ecr 0,nop,wscale 9], length 0                                           20:03:30.549656 IP 5.173.156.15.51800 > 123.45.50.9.456: Flags [S], seq 1731991619, win 65535, options [mss 1424,sackOK,TS val 117037724 ecr 0,nop,wscale 9], length 0                                           20:03:30.549789 IP 5.173.156.15.51795 > 123.45.50.9.789: Flags [S], seq 973576454, win 65535, options [mss 1424,sackOK,TS val 117037741 ecr 0,nop,wscale 9], length 0                                            20:03:31.589639 IP 5.173.156.15.51795 > 123.45.50.9.789: Flags [S], seq 973576454, win 65535, options [mss 1424,sackOK,TS val 117038042 ecr 0,nop,wscale 9], length 0

That's why I saw only first packet in logs because rest was not matched. It looks like knocker is sending double packets.

@QkiZMR
Copy link
Author

QkiZMR commented May 18, 2020

I'm checking knocker on Termux environment, knocker installed by pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants