Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

nmap scanner?

Posted on 2016-10-15
7
Medium Priority
?
124 Views
Last Modified: 2016-11-13
nmap scanner?who knows how to scan port 3333-3392 not all open ports but only those who have RDP ?
thank you...
0
Comment
Question by:john lambert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 35

Expert Comment

by:ste5an
ID: 41845154
Use nmap -p 3333-3392 on the command line.
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41845155
something like this

nmap -PY3333-3392 a.b.d.d/mask | grep RDP
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41883428
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

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:john lambert
ID: 41884496
something for windows ?
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 2000 total points
ID: 41884500
since you stated yourself that you already had figured the answer out, i'm wondering why you would ask.

you would need to code the equivalent in whatever language you are comfortable with. powershell has a few tools but parsing nmap's output seems complicated. you probably need to install either sed only and work it out in powershell, or rather script it in vb, perl, or even install cygwin or bash4unix ( or a similar shell ) and use the above code.

note that even the above code does not handle multiple hosts as-is. you'd need a second sed instruction
1
 

Author Closing Comment

by:john lambert
ID: 41884505
thank you........
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41885428
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.
0

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What monsters are hiding in your child's room? In this article I will share with you a tech horror story that could happen to anyone, along with some tips on how you can prevent it from happening to you.
An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question