cisagov / log4j-scanner

log4j-scanner is a project derived from other members of the open-source community by CISA to help organizations identify potentially vulnerable web services affected by the log4j vulnerabilities.
1.28k stars 215 forks source link

ddnsserver.py: error: unrecognized arguments: 53 #15

Closed shivammusic closed 2 years ago

shivammusic commented 2 years ago

command: python3 ddnsserver.py --udp 53

o/p:

usage: ddnsserver.py [-h] [--port PORT] [--tcp] [--udp] ddnsserver.py: error: unrecognized arguments: 53

Screenshot 2021-12-23 at 11 13 36 PM
KyleEvers commented 2 years ago

Hi @shivammusic, looks like your intended command line arguments should be python3 ddnsserver.py --port 53 --udp and python3 ddnsserver.py --port 1337 --tcp respectively where --udp or --tcp are just a boolean arguments.

Hope this helps!

shivammusic commented 2 years ago

hi @KyleEvers

i run python3 ddnsserver.py --port 53 --udp

and got

Starting nameserver...
Traceback (most recent call last):
  File "ddnsserver.py", line 175, in <module>
    main()
  File "ddnsserver.py", line 153, in main
    if args.udp: servers.append(socketserver.ThreadingUDPServer(('', args.port), UDPRequestHandler))
  File "/usr/lib/python3.8/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
reconpad2@root:/home/ubuntu/log4j-scanner/dns# 

Then i found run ps -fA | grep python to grep running process and killed them. But still getting this error.

Screenshot 2021-12-24 at 12 18 16 AM
global4g commented 2 years ago

@shivammusic You may have to open up port 53 on your system. Most likely its in use already. sudo lsof -i :53 to check

genericcontributor commented 2 years ago

The typo in the command was fixed. Thank you. @KyleEvers

@shivammusic , it does seem like you're using the port. It also appears like you're on a ubuntu box. Try these steps if you're still having issues.

https://www.linuxuprising.com/2020/07/ubuntu-how-to-free-up-port-53-used-by.html