Create parse_portscan
This commit is contained in:
40
fish_functions/parse_portscan
Normal file
40
fish_functions/parse_portscan
Normal file
@@ -0,0 +1,40 @@
|
||||
function parse_csportscan
|
||||
for line in $(cat $argv[1])
|
||||
set ip $(echo $line | cut -d \t -f 1)
|
||||
set port $(echo $line | cut -d \t -f 2)
|
||||
switch $port
|
||||
case 21
|
||||
echo $ip >> ./ftphosts.txt
|
||||
case 22
|
||||
echo $ip >> ./sshhosts.txt
|
||||
case 23
|
||||
echo $ip >> ./telnethosts.txt
|
||||
case 53
|
||||
echo $ip >> ./dnshosts.txt
|
||||
case 135
|
||||
echo $ip >> ./windowshosts.txt
|
||||
case 3306
|
||||
echo $ip >> ./mysqlhosts.txt
|
||||
case 3389
|
||||
echo $ip >> ./rdphosts.txt
|
||||
case 5985
|
||||
echo $ip >> ./winrmhosts.txt
|
||||
case 1433
|
||||
echo $ip >> ./mssqlhosts.txt
|
||||
case 80
|
||||
echo $ip >> ./webhosts.txt
|
||||
case 443
|
||||
echo $ip >> ./webhosts.txt
|
||||
case 8080
|
||||
echo $ip >> ./webhosts.txt
|
||||
case 8181
|
||||
echo $ip >> ./webhosts.txt
|
||||
case 8443
|
||||
echo $ip >> ./webhosts.txt
|
||||
case 4433
|
||||
echo $ip >> ./webhosts.txt
|
||||
case 4443
|
||||
echo $ip >> ./webhosts.txt
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user