All Projects → vinitshahdeo → PortScanner

vinitshahdeo / PortScanner

Licence: MIT License
A go-to tool for scanning network. Scan all the open ports for a given host with just one click.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
SCSS
7915 projects

Projects that are alternatives of or similar to PortScanner

C-Sharp-Multi-Threaded-Port-Scanner
C# multi threaded TCP port scanner console application.
Stars: ✭ 41 (-58.59%)
Mutual labels:  port-scanner, port-scanner-socket, port-scanning
nmap-formatter
A tool that allows you to convert NMAP results to html, csv, json, markdown, graphviz (dot). Simply put it's nmap converter.
Stars: ✭ 129 (+30.3%)
Mutual labels:  port-scanner, port-scanning
Portforge
Lightweight utility to fool port scanners
Stars: ✭ 23 (-76.77%)
Mutual labels:  port-scanner, port-scanning
FazPort
FazPort is an advanced Perl Port Scanner. Scan and Detect open port in every website(s) you want.
Stars: ✭ 16 (-83.84%)
Mutual labels:  port-scanner, port-scanner-socket
waycup
A minimal tool that hides your online assets from online security scanners, researchers and hackers.
Stars: ✭ 100 (+1.01%)
Mutual labels:  port-scanning
Dark Fantasy Hack Tool
DDOS Tool: To take down small websites with HTTP FLOOD. Port scanner: To know the open ports of a site. FTP Password Cracker: To hack file system of websites.. Banner Grabber: To get the service or software running on a port. (After knowing the software running google for its vulnerabilities.) Web Spider: For gathering web application hacking information. Email scraper: To get all emails related to a webpage IMDB Rating: Easy way to access the movie database. Both .exe(compressed as zip) and .py versions are available in files.
Stars: ✭ 131 (+32.32%)
Mutual labels:  port-scanner
Pbscan
Faster and more efficient stateless SYN scanner and banner grabber due to userland TCP/IP stack usage.
Stars: ✭ 122 (+23.23%)
Mutual labels:  port-scanner
Saydog Framework
Saydog Framework
Stars: ✭ 71 (-28.28%)
Mutual labels:  port-scanner
liwasc
List, wake and scan nodes in a network.
Stars: ✭ 129 (+30.3%)
Mutual labels:  port-scanner
tcpie
CLI tool to ping any TCP port
Stars: ✭ 51 (-48.48%)
Mutual labels:  port-scanner
armada
A high performance TCP SYN port scanner.
Stars: ✭ 276 (+178.79%)
Mutual labels:  port-scanner
Nimscan
🚀 Fast Port Scanner 🚀
Stars: ✭ 134 (+35.35%)
Mutual labels:  port-scanner
Pycurity
Python Security Scripts
Stars: ✭ 218 (+120.2%)
Mutual labels:  port-scanner
Portauthority
A handy systems and security-focused tool, Port Authority is a very fast Android port scanner. Port Authority also allows you to quickly discover hosts on your network and will display useful network information about your device and other hosts.
Stars: ✭ 174 (+75.76%)
Mutual labels:  port-scanner
Awesome Internet Scanning
A curated list of awesome Internet port and host scanners, plus related components and much more, with a focus on free and open source projects.
Stars: ✭ 130 (+31.31%)
Mutual labels:  port-scanner
Sandmap
Nmap on steroids. Simple CLI with the ability to run pure Nmap engine, 31 modules with 459 scan profiles.
Stars: ✭ 1,180 (+1091.92%)
Mutual labels:  port-scanner
port-scanner
Port scanner in Go
Stars: ✭ 33 (-66.67%)
Mutual labels:  port-scanner
security-utilities
Offensive Security Certified Profesional (OSCP) course scripts, some have been generalized
Stars: ✭ 39 (-60.61%)
Mutual labels:  port-scanning
SaltwaterTaffy
An nmap wrapper library for .NET
Stars: ✭ 44 (-55.56%)
Mutual labels:  port-scanning
Asset Scan
asset-scan是一款适用甲方企业的外网资产周期性扫描监控系统
Stars: ✭ 149 (+50.51%)
Mutual labels:  port-scanner

Port Scanner

A basic Port Scanner 🔎 using Python with an Express Server to test!

GitHub license GitHub code size in bytes GitHub last commit

Note: Please follow this link if you're a GSSoC participant. Keep watching this repo, we'll be opening more beginner-friendly issues.

With this port scanner, I just attempt to connectThis is a form of "reconnaissance" for hackers and penetration testers at various ports, and do nothing else. If I'm able to connect to open ports, then I know at least the port is open.

Pre-requisites 🚨

node-current GitHub top language

  • Python >= v2.7.0

    • Install Python from here.
  • Node.js >= v0.10.0

    • Install Node.js from here.
  • Pip >= v9.0.1

    • Install pip from here.

How to run? 🚀

To run Port Scanner: (Via Terminal)

  • Open terminal and type npm install: This will install the dependencies (Express).

  • In the same terminal and type npm start: This will start multiple servers within the given range.

  • Open another terminal and type python src/scanner.py: Enter localhost or 127.0.0.1. It will scan all the ports and print the open ports.

Note: You can enter remote host if you want to scan the ports for any remote host. Check the DISCLAIMER.md before doing this.

To run Port Scanner: (Via UI)

Install flask

Make sure you have Python27\Scripts path added to your system's environment variables.

1. In PowerShell,

pip install flask

Install virtual environment

This step is required only if you are using Python2.7, skip this step when running Python3.X.

2. For Python 2, (via pip)

In PowerShell,

pip install virtualenv
virtualenv --help

Kindly check this if pip installation fails.

Create virtual environment

3. Create a venv folder inside src,

python -m virtualenv venv
\Python27\Scripts\virtualenv.exe venv

Activate the virtual environment

4. Activate venv,

venv\Scripts\activate

5. Run mainScanner.py,

pip install flask
python src/mainScanner.py

6. Go to the port url returned by your terminal.

To run IP Scanner:

  • Open terminal and type python src/ipscanner.py: Enter any IP address XXX.XXX.XXX.YYY. It will scan all the addresses in the range XXX.XXX.XXX.0 to XXX.XXX.XXX.255 and print the addresses which are live.

Configuration ⚙️

The servers are opened at multiple ports, you can change the low range and high range for the ports to be listened by the Express server.

{
    "range": {
        "low": "1",
        "high": "8888"
    },
    "ipRange": {
        "low": "0",
        "high": "255"
    },
    "count": "10",
    "thread": { 
        "count": 8
    }
}
  • range.low: lowest port number (inclusive)
  • range.high: highest port number (exclusive)
  • ipRange.low: lowest IP address range (inclusive)
  • ipRange.high: highest IP address range (inclusive)
  • count: total number of ports
  • thread.count: total number of concurrent threads

Contributing 🤝

PRs Welcome CodeFactor Open Source Love

Please read our Code of Conduct.

We're accepting PRs for our open and unassigned issues. Please check CONTRIBUTING.md. We'd love your contributions! Kindly follow the steps below to get started:

1. Fork this repository.

2. Clone the forked repository.

git clone https://github.com/<your-github-username>/PortScanner

3. Navigate to the project directory.

cd PortScanner

4. Create a new branch.

git checkout -b <your_branch_name>

5. Make changes in source code.

6. Stage your changes and commit

git add .

git commit -m "<your_commit_message>"

7. Push your local commits to the remote repo.

git push -u origin <your_branch_name>

8. Create a PR to develop !

9. Congratulations! 🎉 Sit and relax, you've made your contribution to Port Scanner project. ✌️ ❤️

Branching 🚧

  • master branch is maintained and tested regulary for Python 2.

  • Please checkout feature/python3.8 if you're using Python 3.

git checkout feature/python3.8

Need for Multithreading

The ability of a process to execute multiple threads parallelly is called multithreading. Ideally, multithreading can significantly improve the performance of any program.

Imagine scanning substantial number of ports(range.high = 8888) consecutively. The process would require quite a long time.

This calls for the need of concurrency in different parts of this range(1-8888). That is, running different parts(1-1111, 1112-2222, 2223-3333...) of the same process at the same time. This would reduce the time required for completion by significant amount. The reduction in time can be related to the number of concurrent ranges(threads) being scanned simultaneously. Checkout the Performance Analysis for a follow up.

Performance using threads 🎯

  • src/single/scanner.py: Scanner without thread
  • src/scanner.py: Scanner with multi threads
Range(low-high) src/single/scanner.py (in milliseconds) src/scanner.py (in milliseconds)
1-80 143243 30862

CONST_NUM_THREADS : 8

Performance on the basis of number of threads 📉

Range of ports: 1-80

Number of threads Execution time (in milliseconds) Compared Performances
2 71627 50 % faster
4 40808 71.51 % faster
8 37003 74.17 % faster
16 36870 74.26 % faster
32 32674 77.19 % faster

Performance Analysis

Performance Analysis

Blog

Medium Story

Open Source Programs

We're now a part of Leapcode. It helps you contribute to open-source projects right from your first PR to working on major projects. It's still under construction and hopeful to have their platform up pretty soon. Click here to get an early access.

Useful resources 📚

  • Express: Node.js web framework used for creating server. Check server/index.js
  • Socket: Low-level networking interface in Python. Check src/scanner.py
  • Threading: Thread-based parallelism in python. Check src/scanner_thread.py
  • Flask: A micro web framework written in Python. Check src/mainScanner.py

Contributors 🏆

GitHub issues GitHub pull requests

Name 🎖️ Social Media 👋 GitHub :octocat:
Vinit Shahdeo 🐦 Twitter
🎓 LinkedIn
@vinitshahdeo
Kashish 🐦 Twitter
🎓 LinkedIn
@Kashish121
Ishika Dubey 🐦 Twitter
🎓 LinkedIn
@ishika1727

See the contribution graph here.

Admin

Vinit Shahdeo

License

FOSSA Status

TL;DR

Check out this gist if you're only looking for a Python script for scanning ports.


if (_.isAwesome(thisRepo)) {
  thisRepo.star(); // thanks in advance :p
}

GitHub followers Twitter Follow

This repository is intended for individuals to test their own equipment for weak security, and the author(@vinitshahdeo) will take no responsibility if it is put to any other use. Check DISCLAIMER.md

Made with Python Built with love

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].