From c120ea91beeb89d0e190b483bedc0d545122dacf Mon Sep 17 00:00:00 2001 From: Ayushman Date: Fri, 1 Nov 2024 22:12:35 +0530 Subject: [PATCH] Added Python file - Nmap Scanner --- CONTRIBUTING.md | 6 ++++++ Python/Nmap_Scanner.py | 32 ++++++++++++++--------------- profiles/Ayushman Pal.md | 33 ++++++++++++++++++++++++++++++ scripts/hello_world_WannaCry016.py | 1 + 4 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 profiles/Ayushman Pal.md create mode 100644 scripts/hello_world_WannaCry016.py diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7b0c41a5..27c51b89d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,9 @@ +#### Name: [Ayushman Pal](https://github.com/WannaCry016) + +- Place: Chennai, India +- Bio: Fullstack Developer | Mobile Game Developer | ML/AI Enthusiast +- GitHub: [WannaCry016](https://github.com/WannaCry016) + #### Name: [3mYouOL](https://github.com/3mYouOL) - Place: Iloilo, Philippines diff --git a/Python/Nmap_Scanner.py b/Python/Nmap_Scanner.py index 5fbe38216..430f581d0 100644 --- a/Python/Nmap_Scanner.py +++ b/Python/Nmap_Scanner.py @@ -1,16 +1,16 @@ -import nmap - -nm = nmap.PortScanner() - -# scan a target host for open ports -nm.scan('localhost', arguments='-p 22,80,443') - -# print the state of the ports -for host in nm.all_hosts(): - print('Host : %s (%s)' % (host, nm[host].hostname())) - print('State : %s' % nm[host].state()) - for proto in nm[host].all_protocols(): - print('Protocol : %s' % proto) - ports = nm[host][proto].keys() - for port in ports: - print('port : %s\tstate : %s' % (port, nm[host][proto][port]['state'])) +import nmap + +nm = nmap.PortScanner() + +# scan a target host for open ports +nm.scan('localhost', arguments='-p 22,80,443') + +# print the state of the ports +for host in nm.all_hosts(): + print('Host : %s (%s)' % (host, nm[host].hostname())) + print('State : %s' % nm[host].state()) + for proto in nm[host].all_protocols(): + print('Protocol : %s' % proto) + ports = nm[host][proto].keys() + for port in ports: + print('port : %s\tstate : %s' % (port, nm[host][proto][port]['state'])) diff --git a/profiles/Ayushman Pal.md b/profiles/Ayushman Pal.md new file mode 100644 index 000000000..33c3b77b2 --- /dev/null +++ b/profiles/Ayushman Pal.md @@ -0,0 +1,33 @@ +# Ayushman Pal + +### Location + +Chennai, INDIA + +### Academics + +- Pursuing Btech in Chemical Engineering at Indian Institute of Technology, Madras + +### Interests + +- Learning Enthusiast +- Music +- Python +- HTML/CSS/JS +- DSA (C++) + +### Skills + +- DSA +- Typing(with speed more than 140WPM) +- Java +- Git & GitHub +- Python + +### Projects + +- [Portfolio] https://github.com/WannaCry016 + +### Profile Link + +[Ayushman Pal](https://github.com/WannaCry016) \ No newline at end of file diff --git a/scripts/hello_world_WannaCry016.py b/scripts/hello_world_WannaCry016.py new file mode 100644 index 000000000..8e235769c --- /dev/null +++ b/scripts/hello_world_WannaCry016.py @@ -0,0 +1 @@ +print("Hello World") \ No newline at end of file