Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Israel Torres
- # 2011/10/17
- # 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 "checking UPD SCCM ports on $IPADDRESS ..."
- nmap_check_sccm_udp $IPADDRESS
- echo "checking TCP SCCM ports on $IPADDRESS ..."
- nmap_check_sccm_tcp $IPADDRESS
- }
- TESTIP1='10.10.10.10'
- TESTIP2='10.10.11.10'
- nmap_check_sccm_all $TESTIP1
- nmap_check_sccm_all $TESTIP2
- #EOF
Advertisement