Giter Club home page Giter Club logo

netscan's Introduction

Netscan

Netscan is a fast TCP port scanner for IPv4 and IPv6 networks. Netscan is written in Go and is intended for normal users to run on Linux, Windows or Mac systems. The goal of netscan is to find open server ports quickly for service tracking and later testing and deep analysis using tools such as Nmap and Nessus. Netscan results are intended to be loaded into a relational database.

Time to scan 1 million hosts for 45 common ports (using 32K semaphore)

$ time ./netscan 172.txt ports.txt > 172.results.txt

real    44m3.894s
user    24m15.180s
sys     48m20.012s

To get or build netscan

$ go get github.com/62726164/netscan
$ go build netscan.go

To run netscan

$ netscan ips.txt ports.txt > results.txt

Notes

  • To scan large networks for many dozens of ports, consider increasing the number of open files for the user who runs netscan and also increasing the size of the counting semaphore in the netscan code. Experiment to find a suitable number on your scanner systems for your particular networks. Here's an example on Linux systems in the file /etc/security/limits.conf:
user_name      soft    nofile      150000
user_name      hard    nofile      150000
  • The file ips.txt must be a plain text file with one IP address or hostname per line. It must contain one or more entries. Netscan does not support CIDR notation. See the gen_ips.py script (in this repository) as an example of how to generate a list of IPs based on a CIDR prefix. Here's an example ips.txt file:
192.168.1.54
2001:468:c80:c111:0:401a:d2f8:de6c
hostname.your.domain
  • The file ports.txt must be a plain text file with one TCP port number per line. It must contain at least one port number. Typically, ports.txt would look something like this:
21
22
23
80
443
445
3389

How to scan IPv6 networks efficiently

Add AAAA DNS records for all of your IPv6 servers and allow your netscan scan engines to do zone transfers. This limits the scan to IPv6 enabled servers that are in the DNS.

netscan's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.