what you don't know can hurt you

rdpScan Network Checker

rdpScan Network Checker
Posted Mar 18, 2012
Authored by silverstoneblue

This is a simple script that leverages nmap to scan for RDP-Server.

tags | tool, scanner
systems | unix
MD5 | 35e064423d7b758146ffd350e92abfb8

rdpScan Network Checker

Change Mirror Download
#!/bin/bash
#
# rdpScan - scan a network segment for RDP-Server
# author: silverstoneblue@gmx.net
# requires: fgrep awk nmap

scriptname="rdpScan"
version="1.0"
rdpips="/tmp/tmprdp.$$"

declare -i rdpfound=0

function is_installed {
which $1 > /dev/null 2>&1
if [ $? -ne 0 ]
then
printf "\nERROR: %s not installed.\n\n" $1
exit 255
fi
}

is_installed fgrep
is_installed awk
is_installed nmap

if [ $# -ne 1 ]; then
printf "\n \n"
printf "rdpScan - scan a network segment for RDP-Server \n\n"
printf "version %s by silverstoneblue@gmx.net \n\n" $version
printf "Usage: %s {target network}\n\n" $scriptname
printf "target network:\n"
printf " can pass hostnames, IP's, networks, etc.\n"
printf " server.company.com, company.com/24, 192.168.0.1/16, 10.0.0-255.1-254\n"
printf "example:\n"
printf " %s 80.187.0.0/24\n\n" $scriptname
exit 255
fi

iprange=$1

printf "\nScanning for RDP-Server..."

nmap -n -P0 -sS -p 3389 -oG - $iprange | fgrep 'Ports: 3389/open/tcp//ms-term-serv///' | awk '{print $2}' > $rdpips

printf "\n\n"

exec 3< $rdpips

echo "*****************"
echo "RDP IP Address"
echo "*****************"

while read rdpip <&3 ; do
rdpfound=$rdpfound+1
printf "%-15s %s\n" $rdpip
done


if [ $rdpfound -eq 0 ] ; then
printf "No RDP-Server found on network target %s. \n\n" $iprange
rm -f $rdpips
exit 255
fi

printf "\n%d RDP-Server found on network target %s.\n" $rdpfound $iprange
printf "Now try ur luck ;)\n"
printf "have fun ;) \n"
rm -f $rdpips
exit 0

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

September 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    1 Files
  • 2
    Sep 2nd
    38 Files
  • 3
    Sep 3rd
    30 Files
  • 4
    Sep 4th
    15 Files
  • 5
    Sep 5th
    12 Files
  • 6
    Sep 6th
    17 Files
  • 7
    Sep 7th
    3 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    24 Files
  • 10
    Sep 10th
    22 Files
  • 11
    Sep 11th
    22 Files
  • 12
    Sep 12th
    15 Files
  • 13
    Sep 13th
    5 Files
  • 14
    Sep 14th
    2 Files
  • 15
    Sep 15th
    1 Files
  • 16
    Sep 16th
    11 Files
  • 17
    Sep 17th
    16 Files
  • 18
    Sep 18th
    8 Files
  • 19
    Sep 19th
    12 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close