Giter Site home page Giter Site logo

scanless's Introduction

⚠️ I am no longer maintaining scanless as of August 2023. ⚠️

scanless

This is a Python command-line utility and library for using websites that can perform port scans on your behalf.

Supported Online Port Scanners

Install

Do it up:

$ pip install scanless --user

CLI Usage

$ scanless --help
usage: scanless [-h] [-v] [-t TARGET] [-s SCANNER] [-r] [-l] [-a] [-d]

scanless, an online port scan scraper.

options:
  -h, --help            show this help message and exit
  -v, --version         display the current version
  -t TARGET, --target TARGET
                        ip or domain to scan
  -s SCANNER, --scanner SCANNER
                        scanner to use (default: yougetsignal)
  -r, --random          use a random scanner
  -l, --list            list scanners
  -a, --all             use all the scanners
  -d, --debug           debug mode (cli mode off & show network errors)

$ scanless --list
+----------------+--------------------------------------+
| Scanner Name   | Website                              |
+----------------+--------------------------------------+
| ipfingerprints | https://www.ipfingerprints.com       |
| spiderip       | https://spiderip.com                 |
| standingtech   | https://portscanner.standingtech.com |
| viewdns        | https://viewdns.info                 |
| yougetsignal   | https://www.yougetsignal.com         |
+----------------+--------------------------------------+

$ scanless -t scanme.nmap.org -s spiderip
Running scanless v2.2.1 ...

spiderip:
PORT      STATE  SERVICE
21/tcp    closed ftp
22/tcp    open   ssh
25/tcp    closed smtp
80/tcp    open   http
110/tcp   closed pop3
143/tcp   closed imap
443/tcp   closed https
465/tcp   closed smtps
993/tcp   closed imaps
995/tcp   closed pop3s
1433/tcp  closed ms-sql-s
3306/tcp  closed mysql
3389/tcp  closed ms-wbt-server
5900/tcp  closed vnc
8080/tcp  closed http-proxy
8443/tcp  closed https-alt

Library Usage

>>> import scanless
>>> sl = scanless.Scanless()
>>> output = sl.scan('scanme.nmap.org', scanner='yougetsignal')
>>> print(output['raw'])
PORT      STATE  SERVICE
21/tcp    closed ftp
22/tcp    open   ssh
23/tcp    closed telnet
25/tcp    closed smtp
53/tcp    closed domain
80/tcp    open   http
110/tcp   closed pop3
115/tcp   closed sftp
135/tcp   closed msrpc
139/tcp   closed netbios-ssn
143/tcp   closed imap
194/tcp   closed irc
443/tcp   closed https
445/tcp   closed microsoft-ds
1433/tcp  closed ms-sql-s
3306/tcp  closed mysql
3389/tcp  closed ms-wbt-server
5632/tcp  closed pcanywherestat
5900/tcp  closed vnc
6112/tcp  closed dtspc
>>> import json
>>> print(json.dumps(output['parsed'], indent=2))
[
  {
    "port": "21",
    "state": "closed",
    "service": "ftp",
    "protocol": "tcp"
  },
  {
    "port": "22",
    "state": "open",
    "service": "ssh",
    "protocol": "tcp"
  },
  {
    "port": "23",
    "state": "closed",
    "service": "telnet",
    "protocol": "tcp"
  },
  {
    "port": "25",
    "state": "closed",
    "service": "smtp",
    "protocol": "tcp"
  },
  {
    "port": "53",
    "state": "closed",
    "service": "domain",
    "protocol": "tcp"
  },
  {
    "port": "80",
    "state": "open",
    "service": "http",
    "protocol": "tcp"
  },
  ...
]

scanless's People

Contributors

amauryortega avatar amshar21 avatar fabaff avatar shaunpud avatar tiuscodes avatar vesche 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  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

scanless's Issues

what's wrong?

system:windows10

scanless -a -t 192.168.1.120
Running scanless...
Error, yougetsignal was unable to run.
Error, viewdns was unable to run.

------- hackertarget -------
Starting Nmap 7.01 ( https://nmap.org ) at 2017-08-17 20:14 UTC
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.35 seconds

Error, ipfingerprints was unable to run.

------- pingeu -------
PORT STATE SERVICE
21/tcp closed ftp
22/tcp closed ssh
23/tcp closed telnet
25/tcp closed smtp
53/tcp closed dns
80/tcp closed http
139/tcp closed netbios
443/tcp closed https
445/tcp closed smb
3389/tcp closed rdp

------- spiderip -------
PORT STATE SERVICE
21/tcp closed ftp
22/tcp closed ssh
25/tcp closed smtp
80/tcp closed http
110/tcp closed pop3
143/tcp closed imap
443/tcp closed https
465/tcp closed smtps
993/tcp closed imaps
995/tcp closed pop3s
1433/tcp closed mssql
3306/tcp closed mysql
3389/tcp closed rdp
5900/tcp closed vnc
8080/tcp closed http-alt
8443/tcp closed https-alt

Error, portcheckers was unable to run.
Error, t1shopper was unable to run.

Good work

This is not an issue , this is a complement to your work on this script .
Nice job , and excellent idea ;)

Specify service version numbers and port

Overall, the tool is very useful. I'm not sure if this is possible with these current sites, but it would be great to add support or sites that support service version numbers. Additionally, it would be useful to specify a specific port or group of ports rather than have the tool scan everything.

Hackertarget not working

It seems something might have changed on hackertarget side, scanless needs an update.
`Python 3.11.2 (main, Feb 12 2023, 00:48:52) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import scanless
sl = scanless.Scanless()
output = sl.scan('scanme.nmap.org', scanner='hackertarget')
Traceback (most recent call last):
File "", line 1, in
File "/home/kali/.local/lib/python3.11/site-packages/scanless/core.py", line 76, in scan
return self.scannersscanner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/.local/lib/python3.11/site-packages/scanless/core.py", line 106, in hackertarget
output = soup.findAll("pre", {"id": "formResponse"})[0].string
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
`

v2.1.0 improvements

  1. Further improve library usage, something like this...
>>> import scanless
>>> sl = scanless.Scanless()
>>> sl.scan('scanme.nmap.org', scanner='hackertarget')
{'pretty_output': '...', 'raw_output': [(22, 'open'), (23, 'closed'), ...]}
  1. Output colors on CLI using crayons.
  2. Move random.choice funcs into a util.py or something
  3. 3.6 in setup.py, whoops.

A few scanners not working

ipfingerprints, pingeu, and spiderip are all not working. I'm not sure how long this has been the case, I hardly ever use the -a option.

  • ipfingerprints: resolving, but not returning any data.
  • pingeu: reporting every port as up
  • spiderip: unable to run / not resolving

Can we talk about creating a scanless standard API?

Sorry I'm on my phone so this will be terse, hopefully I have some time to update later... But something really basic, such as what I saw when I looked through the code of the other scanners. Either http to not add dependencies or maybe zmq to add speed. But effectively an easy to deploy server that enabled public users to scan IP addresses. Such that you can set it up with a docker container, a GitHub clone, or an Ansible playbook. It would be nice if there were many more publicly accessible servers to choose from or to distribute work to and I think the best route to that end goal is to write an easily deployable server. Which I'm happy to do if you think it's a good idea as well.

Portcheckers is down

Not sure if it's a website change on first glance.
Will get to this when I get a chance or a PR is always welcome. :)

It's useless to install kali on it

It's useless to install kali on it

(kali kali)-[/Tools/PortScanning/scanless]
-$pip3.8 install scanless --user
Requirement already satisfied:scanless in /home/kali/.local/lib/python3.8/site-packages (2.2.1)
Requirement already satisfied:beautifulsoup4 in /home/kali/.local/lib/python3.8/site-packages (from scanless)(4.11.1)
Requirement already satisfied:crayons in /home/kali/.local/lib/python3.8/site-packages (from scanless)(0.4.0)
Requirement already satisfied:requests in /home/kali/.local/lib/python3.8/site-packages (from scanless)(2.28.2)
Requirement already satisfied:soupsieve>1.2 in /home/kali/.local/lib/python3.8/site-packages (from beautifulsoup4->scanless)(2.3.2)
Requirement already satisfied:colorama in /home/kali/.local/lib/python3.8/site-packages (from crayons->scanless)(0.4.4)
Requirement already satisfied:charset-normalizer<4,>2 in /home/kali/.local/lib/python3.8/site-packages (from requests->scanless)(3.1.0)
Requirement already satisfied:idna<4,>2.5 in /home/kali/.local/lib/python3.8/site-packages (from requests->scanless)(3.4)
Requirement already satisfied:urllib3<1.27,>1.21.1 in /home/kali/.local/lib/python3.8/site-packages (from requests->scanless)(1.26.15)
Requirement already satisfied:certifi>2017.4.17 in /home/kali/.local/lib/python3.8/site-packages (from requests->scanless)(2022.12.7)
(kali kali)-[
/Tools/PortScanning/scanless]
-scanless -h
scanless:command not found
(kali kali)-[~/Tools/PortScanning/scanless]
pip3.8 install scanless --user

NameError: global name 'm' is not defined

Hi,

I'm getting the below error, Any ideas?

Running scanless...
Traceback (most recent call last):
  File "scanless.py", line 80, in <module>
    main()
  File "scanless.py", line 76, in main
    scanless(target, scanner)
  File "scanless.py", line 40, in scanless
    print(run(scanner))
  File "scanless.py", line 32, in run
    return 'Error, {} was unable to run.'.format(m)
NameError: global name 'm' is not defined

Ip proxy.

I want to use ip proxy to hide myself. But i do not want to change my global ip address. Can i just pass a parameter to set ip proxy?

Completely overhaul this tool

  • Create a common class structure for making requests (requests session).
  • Class for parsing results based on module.
  • Better error checking / custom exceptions.
  • Create a dict of all ports used with nmap service names, have output be generated by passing in a list of ports & status.
  • Colors for output would be cool, crayons (open / closed / error) => (green / red / gray).
  • Bump major version.
  • License trove classifier is wrong in setup.py

Publish to PyPI

It'd be really nice if this had a setup.py and was available on PyPI, so that I could pip install scanless!

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.