avinashkranjan / Pentesting-and-Hacking-Scripts

🚀 A curated collection of Pentesting and Hacking Scripts for Script Kiddie to Advanced Pentesters. 👨‍💻
Creative Commons Zero v1.0 Universal
204 stars 137 forks source link

Building a Basic Port Scanner using NMAP in Python #9

Closed avinashkranjan closed 3 years ago

avinashkranjan commented 3 years ago

Aim

  1. Specific Port Search
  2. Specific Range Port Search
  3. Convert Data stored in dic into JSON and Save it in a text file
virajmane commented 3 years ago

Can I work on this?

virajmane commented 3 years ago

Script takes domain or IP Address as an input. Gives open ports and other information as an output in JSON format. There is also an optional function that gives information about ports when called

Output:

Enter the host to be scanned: google.com
{
   "IP address":"108.177.121.102",
   "hostname":"108.177.121.102",
   "ISP":"GOOGLE",
   "ASN":"AS15169",
   "Country":"United States (US)",
   "latitude":"37.751",
   "longitude":"-97.822",
   "ports":[80,443]
}

Optional Output:

{
   "Port":"80",
   "Protocol":"udp",
   "Service":"trojans",
   "Description":"W32.Beagle.AO@mm [Symantec-2004-080911-3251-99] - mass-mailing worm with backdoor functionality. Uses its own SMTP engine, discovered 08.09.2004. Opens port 80 tcp & udp. W32.Bobax.AF@mm [Symantec-2005-081611-4121-99] (2005.08.15) - a mass-mailing worm that opens a backdoor and lowers security settings on the compromised computer. It exploits the MS Plug and Play Buffer Overflow vulnerability (MS Security Bulletin [MS05-039]) on port 21/tcp., and by sending copies of itself to gathered email addresses. Also opens a backdoor on a random tcp port and/or port 80/udp. Siemens SINEMA Server before 12 SP1 allows remote attackers to cause a denial of service (web-interface outage) via crafted HTTP requests to port 80 (TCP/UDP). References: [CVE-2014-2733] Multiple directory traversal vulnerabilities in the integrated web server in Siemens SINEMA Server before 12 SP1 allow remote attackers to access arbitrary files via HTTP traffic to port (1) 4999 or (2) 80. References: [CVE-2014-2732] Multiple directory traversal vulnerabilities in the integrated web server in Siemens SINEMA Server before 12 SP1 allow remote attackers to access arbitrary files via HTTP traffic to port (1) 4999 or (2) 80. Reference: [CVE-2014-2731] Port 80 udp is also used by some games, like Alien vs Predator (Activision)."
}

Link: https://github.com/virajmane/NetworkingTools

avinashkranjan commented 3 years ago

Looks Good..Assigning it to you.. @virajmane