Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Israel Torres
- # 2011/10/18
- # SCCM 2007 Port Connection Checker using nmap
- #UDP
- function nmap_check_sccm_udp {
- IPADDRESS=$1
- sudo nmap -p53,67,68,69,135,137,138,500,636,2701,2702,4011,63000-64000 -sU -P0 $IPADDRESS 2> /dev/null | grep -E 'open|filtered|closed'
- }
- #TCP
- function nmap_check_sccm_tcp {
- IPADDRESS=$1
- sudo nmap -p80,135,139,389,443,445,636,1433,16992,16993,16995,1723,2701,2702,3268,3269,3389,8530,8531,9971 -sS -P0 $IPADDRESS 2> /dev/null | grep -E 'open|filtered|closed'
- }
- function nmap_check_sccm_all {
- IPADDRESS=$1
- echo -e "#checking TCP SCCM ports on $IPADDRESS ..."
- nmap_check_sccm_tcp $IPADDRESS
- echo -e "\n#checking UPD SCCM ports on $IPADDRESS ..."
- nmap_check_sccm_udp $IPADDRESS
- }
- if [ ! $# -lt 1 ]; then
- IPADDRESS=$1
- sudo echo "[SCCM 2007 Port Connection Checker]"
- nmap_check_sccm_all $IPADDRESS
- else
- echo "usage: $0 'TARGET(IP_ADDRESS|HOSTNAME)' "
- fi
- #EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement