Giter Club home page Giter Club logo

nimscan's Introduction

πŸ‘‘ NimScan πŸ‘‘

Really fast port scanner (With filtered option - Windows support only)

Administrator_ Command Prompt 2021-03-09 18-01-21

Benchmarks

βš™οΈ Category πŸ‘οΈ Nmap πŸ€– RustScan ♨️ masscan πŸ‘‘ NimScan
Filtered ~107 Seconds ❌ ❌ ~60 Seconds (Windows Only)
non-filtered ~25 Seconds ~3 Seconds (Linux) ~8 Seconds (Linux) ~7 Seconds (2 threads)
Dependencies Npcap driver Nmap libpcap driver No dependencies
Can be used as module/library ❌ ❌ ❌ βœ”οΈ

All bechmarks were performed inside LAN and on 65K ports.

Usage

Usage:
    NimScan <host | IPs> -p:<portX>-<portY> [--timeout=<time>] [--files=<limit of file descriptors>] [-a]
    NimScan <host | IPs> -p:<port>
    NimScan <host | IPs> -p:<port1>,<port2>,<portN>
    NimScan (-h | --help)
Options:
    -h, --help            Show this screen.
    -p, --ports           Ports to scan. [default: 1-65,535]
    -a, --all             Use rawsockets to find filtered/closed/open ports (Takes longer and limited to 10,000 ports).
    -t, --threads         Number of threads per scan.
    -f, --files=<limit>   File descriptors per thread limit.
    -i, --ignore          Ignore ping latency check.
    --timeout=<time>      Timeout to add to the latency [default: 1500].

Examples

Scan range between 1 to 5000 ports

NimScan 10.0.0.0/24 -p:1-5000 

Scan specific ports

NimScan 10.0.0.1-10.0.0.10 -p:80,443,445

Show closed/filtered/open using rawsockets

NimScan.exe 10.0.0.69 -a

C/C++ Library πŸ§‘πŸ»β€πŸ’»

Guide

Exported functions

scan(char * host, int * ports, int size);
scanner(char * host, int * ports, int size, char * parameters);

Options

  • host - IP/HOST to scan
  • ports - Ports to scan
  • size - Size of ports array
  • parameters - Parameters to give for the scanner as mentiond above under Usage

Create

#include <stdio.h>

int main(void)
{
    NimMain(); // A MUST! 

    int ports[] = {1, 445, 8080, 3389, 135, 139};
    int size = sizeof ports / sizeof ports[0];
    
    scan(<IP/HOST>, ports, size); // Scan given ports with default configuration (timeout = 1500ms, files = 5000)

    scanner(<IP/HOST>, NULL, 0, "<arguments>"); // Scanning all 65K ports with given arguments
    return 0;
}

Compile

Make sure NimScanToC.a is in your program's folder.

gcc <file>.c -L. -l:NimScanToC.a -w -o NimScan.exe

nimscan's People

Contributors

elddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nimscan's Issues

Virus Detected

Windows Defender said it's a Trojan

Trojan:Win64/CryptInject!MSR

raiseOSError error!!

I run this script on my ubuntu machine. and this script shows some errors. Why this error?

image

Error: type mismatch in param_parser.nim(110, 39)

compiled using the command
nim c \NimScan-master\NimScan.nim
with the latest nim compiler (1.6.4)
and got the error:

NimScan-master\modules\param_parser.nim(110, 39) Error: type mismatch: got <string, string>
but expected one of:
proc calc_range(subnet: string): seq[string]
first type mismatch at position: 2
extra argument given
1 other mismatching symbols have been suppressed; compile with --showAllMismatches:on to see them

expression: calc_range(range1, range2)

cidr range is off by 1

The cidr range for 192.168.1.1/25 should include 192.168.1.1 to 192.168.1.127 inclusive.
In file ip_seg.nim, the line last[3] = $(last[3].parseInt() -1) excludes the final value and should be last[3] = $(last[3].parseInt()).

This fix would allow a single IP in cidr notation (192.168.1.1/32) and correct the range to include the last ip in each cidr range

Compile New Version: undefined reference to 'scan' and 'scanner'

Hello,

It seems that the instructions of compiling the new version are not correct. I tried the command you listed in your README.md and also looked at the test.c, but failed to compile. You could provide me with the latest .exe or update the README.md please?

Using Kali Linux latest nim and gcc package installed.

cannot find module

NimScan/modules/globals.nim(5, 28) Error: cannot open file: OSDiscovery

fix this

oserr.nim(94) raiseOSError
asyncfutures.nim(372) read
asyncfutures.nim(372) read
Error: unhandled exception: Too many open files [OSError]
oserr.nim(94) raiseOSError
asyncfutures.nim(372) read
asyncfutures.nim(372) read
Error:

Awesome!

Nice port scanner. Nim looks like an awesome language too! :)

oserror

when i start the nimscan.exe on windows cmd webshell,somewrong happend ;
like #nimscan.exe -o:result > output
can resolve it ?
#########
oserr.nim(94) raiseOSError
Error: unhandled exception:ε₯ζŸ„ζ— ζ•ˆγ€‚
#############

i have trouble install it

i have no idea how could pack it up to an exe.
my try in test.c :
scan(IP, ports, size); // Scan given ports with default configuration (timeout = 1500ms, files = 5000)
scanner(IP, NULL, 0, ""); // Scanning all 65K ports with given arguments

However ,everytime it comes to :
test.c:19:10: ι”™θ――οΌšexpected expression before β€˜<’ token
it seems that IP/Host havn't been clained, may i get u help?

Compilation error on Linux ARM platform due to undeclared identifier LPCST

I am trying to compile a Nim software on a Linux ARM platform, but I am encountering a compilation error related to an undeclared identifier LPCSTR in the file ip_seg.nim. The error message is as follows:

/root/nim/NimScan/modules/ip_seg.nim(12, 25) Error: undeclared identifier: 'LPCSTR'

After investigating the issue, I found that LPCSTR is a Windows-specific data type that does not exist on Linux systems. It seems that the code in ip_seg.nim is referring to Windows API related headers, which is causing the error.

I would like to request help in resolving this issue. Is there a way to make the code cross-platform compatible or to use Linux-specific headers instead of Windows headers? Any guidance on how to proceed would be greatly appreciated.

Thank you for your help.

Unable to compile?

Tried gcc test.c -L. -1:NimScanToC.a -w -o NimScan.exe

came up with heap of errors

is this the right command?

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.