-
Notifications
You must be signed in to change notification settings - Fork 0
/
outside_singlehost_netscan.sh
51 lines (43 loc) · 1.24 KB
/
outside_singlehost_netscan.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bashtxt
cible=$1
if [ ! -d "resultats" ];then
mkdir resultats
fi
if [ ! -d "resultats/netscan.md" ];then
touch resultats/netscan.md
fi
echo -e "# Outside singlehost network scan\n" >> resultats/netscan.md
echo "ICMP Port Scanning"
{
echo -e "## Outside singlehost ICMP Port Scanning Result\n"
echo '```'
nmap -PE -PM -PP -sn -n "$cible"
echo -e '```\n'
} >> resultats/netscan.md
echo "TCP Port Scanning"
{
echo -e "## Outside singlehost TCP Port Scanning Result\n"
echo '```'
masscan --banners -p20,21-23,25,53,80,110,111,135,139,143,443,445,993,995,1723,3306,3389,5900,8080 "$cible"
echo -e '```\n'
} >> resultats/netscan.md
echo "HTTP Port Scanning"
{
echo -e "## Outside singlehost HTTP Port Scanning Result\n"
masscan --banners -p80,443,8000-8100,8443 "$cible"
echo -e '```\n'
} >> resultats/netscan.md
echo "UDP Port Scanning"
{
echo -e "## Outside singlehost UDP Port Scanning Result\n"
echo '```'
nmap -sU -sV --version-intensity 0 -F -n "$cible"
echo -e '```\n'
} >> resultats/netscan.md
echo "SCTP Port Scanning"
{
echo -e "## Outside singlehost SCTP Port Scanning Result\n"
echo '```'
nmap -sY -n --open -Pn "$cible"
echo -e '```\n'
} >> resultats/netscan.md