tcpscan 端口扫描工具

tcpscan 端口扫描工具
一个用python3写的端口扫描小脚本,主要使用socket和telnetlib,支持开放服务探测,输出为json格式。
帮助

Tcp PortScan V1.0 optional arguments:
-h, --help            show this help message and exit
-i IP, --ip IP        Scan an ip or cidr list eg. 1.1.1.1 or 1.1.1.0/24
-d DOMAIN, --domain DOMAIN
                    Scan a domain name eg. -d www.google.com
-f FILE, --file FILE  Read the ip list from the file
-p PORT, --port PORT  Set scan port 21,22,23..., default scan 350 port
-m METHOD, --method METHOD
                    Tcp or telnet scan, tcp calls socket and identifies
                    service
-t THREAD, --thread THREAD
                    set threads, default:200

用法
tcpscan.py -i 1.1.1.1
tcpscan.py -i 1.1.1.1 -p 22,80,445
tcpscan.py -i 1.1.1.0/24 -m tcp -t 200
tcpscan.py -f ip.txt -m tcp -t 200
tcpscan.py -d google.com
输出
{
"ip": "192.168.1.1",
"port": 9050,
"proto": "http",
"payload": "b'HTTP/1.1 200 OKrnX-DNS-Prefetch-Control: offrnX-Frame-Options: SAMEORIGINrnStrict-Transport-Security: max-age=15552000; includeSubDomainsrnX-Download-Options: noopenrnX-Content-Type-Options: nosniffrnX-XSS-Protection: 1; mode=blockrnContent-Type: application/json; charset=utf-8rnContent-Length: 15rnETag: W/"f-KOwe7l9ASePE8hNQacHSyA"rnDate: Thu, 31 Jan 2019 08:23:33 GMTrnConnection: keep-alivernrn{"status":true}'"
}
{
"ip": "192.168.1.1",
"port": 8088,
"proto": "http",
"payload": "b'HTTP/1.1 200 OKrnVary: CookiernContent-Type: text/html; charset=utf-8rnContent-Language: enrnrn<!doctype html>n<html>n <head>n <meta charset="utf-8">n <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->n <meta name="viewport" content="width=device-width, initial-scale=1">n <title>Virtualization Station</title>n <link rel="shortcut icon" href="static/favicon.ico">n <link rel="stylesheet" href="static/common.css?v=3.1.834">n <link rel="stylesheet" href="static/login.css?v=3.1.'"
}
{
"ip": "192.168.1.1",
"port": 9051,
"proto": "http",
"payload": "b'HTTP/1.1 200 OKrnX-Powered-By: ExpressrnContent-Type: application/json; charset=utf-8rnContent-Length: 15rnETag: W/"f-KOwe7l9ASePE8hNQacHSyA"rnDate: Thu, 31 Jan 2019 08:23:33 GMTrnConnection: keep-alivernrn{"status":true}'"
}
文章来源:

华盟知识星球入口
https://github.com/fanyingjie2/tcpscan

tcpscan 端口(1)服务探测(1)扫描工具(12)
本文来源 github,由 七月的肥猫 整理编辑,其版权均为 github 所有,文章内容系作者个人观点,不代表 华盟网 对观点赞同或支持。如需转载,请注明文章来源。

本文经授权后发布,本文观点不代表立场,转载请联系原作者。
phpMyAdmin 渗透利用总结
« 上一篇 05-04
指纹锁的硬件逆向工程
下一篇 » 05-04