Link to home
Start Free TrialLog in
Avatar of john lambert
john lambert

asked on

nmap scanner?

nmap scanner?who knows how to scan port 3333-3392 not all open ports but only those who have RDP ?
thank you...
Avatar of ste5an
ste5an
Flag of Germany image

Use nmap -p 3333-3392 on the command line.
Avatar of skullnobrains
skullnobrains

something like this

nmap -PY3333-3392 a.b.d.d/mask | grep RDP
requires to loop over nmap results and attempt a connection with a software that understands rdp

something like this scans ports properly on my own host.
i feel lazy grabbing the hostname with sed but it is rather trivial

nmap -p 3333-3392 localhost | sed -n 's:^\([0-9][0-9]*\).*:\1:p' | xargs -n 1 -I% sh -c 'xfreerdp -u tst -p tst --authonly localhost:% >/dev/null 2>/dev/null && echo "RDP listening on localhost:%" '
RDP listening on localhost:3389

Open in new window

Avatar of john lambert

ASKER

something for windows ?
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you........
feel free to post the final script for windows. i'm pretty sure it can be useful to others. if you manage something that works without installing extra tools, all the better.