leonjza / awesome-nmap-grep Goto Github PK
View Code? Open in Web Editor NEWAwesome Nmap Grep
Awesome Nmap Grep
The cut command no longer accepts input like this cut -d' ' -f2 -f4-
It produces the error cut: only one type of list may be specified
To resolve this change the cut command cut -d' ' -f2 -f4- to cut -d' ' -f2,4-
Hey, kindly could you explain this part, mostly the awk bit would love to understand how you did it so that I can edit it for it to output host-ip port service portocol.
NMAP_FILE=output.grep
egrep -v "^#|Status: Up" $NMAP_FILE | cut -d' ' -f2 -f4- | \
sed -n -e 's/Ignored.*//p' | \
awk '{print "Host: " $1 " Ports: " NF-1; $1=""; for(i=2; i<=NF; i++) { a=a" "$i; }; split(a,s,","); for(e in s) { split(s[e],v,"/"); printf "%-8s %s/%-7s %s\n" , v[2], v[3], v[1], v[5]}; a="" }'
Tried this command, however, it also greps for closed ports:
My output
Host: (my ip address) Ports: 3
closed tcp/ 80 http
open tcp/ 443 ssl|http
'''
How do i get rid of the closed ports?
Any response is greatly appreciated!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.