scan_port | 使用python3 调用nmap , masscan扫描批量IP的批量端口并对指定的路径进行检测 | Sitemap library
kandi X-RAY | scan_port Summary
kandi X-RAY | scan_port Summary
分别使用python3调用nmap、masscan批量扫描IP多个端口,并对扫描后的端口进行访问检测,也就是形成IP+PORT+PATH的多重扫描检测 运行指令: python3 nmap_scan.py -i 127.0.0.1 -p 80 -path url_path.txt -outport outport.txt -outurl outurl.txt -t 10 python3 masscan_scan.py -i 127.0.0.1 -p 80 -path url_path.txt -r 1000 -outport outport.txt -outurl outurl.txt -t 10.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of scan_port
scan_port Key Features
scan_port Examples and Code Snippets
Community Discussions
Trending Discussions on scan_port
QUESTION
import socket
from IPy import IP
#multiple targets
targets = input('Enter target/s use comma to split target: ') #type in ip address
#use nslookup to find ip address of website and use www. nslookup (www.gb.facebook.com/)
def scan(target):
converted_ip = check_ip(target)
print('\n' + 'Scanning Targer' + ' ' +str(target) )
for port in range(75,81):
scan_port(converted_ip, port)
def check_ip(ip):
try:
IP(ip) #converts to ip address
return ip
except ValueError:
return socket.gethostbyname(ip) #converts website name to ip address
def get_banner(s):
return s.recv(2048)
def scan_port(ip_address, port):
try:
sock = socket.socket()
sock.settimeout(10)#this is how long to look for the port however the accuracy of the port will be low
sock.connect((ip_address,port)) #connect to ip address
try:
banner = get_banner(sock)
print('port'+ str(port) +'is open and banner is open' + str(banner.decode().strip('\n')))
except:
print('port'+ str(port) +'is open')
except:
pass
#converted_ip = check_ip(ip_address)
if ',' in targets:
for ip_add in targets.spilt(','): #words spilt with comma
scan(ip_add.strip(' ')) #removes empty spaces
else:
scan(targets)
...ANSWER
Answered 2020-Oct-25 at 22:13Look at the error it return: Your browser didn't send a complete request in time.
Try to complete you HTTP request, like so:
QUESTION
I am what I now consider part 3 of completing a task of pinging a very large list of URLs (which number in the thousands) and retrieving a URL's x509 certificate associated with it. Part 1 is here (How do I properly use threads to ping a URL) and Part 2 is here (Why won't my connection pool implement my thread code).
Since I asked these two questions, I have now ended up with the following code:
...ANSWER
Answered 2020-Feb-14 at 07:25Let us look at the problems you have described and try to solve these one at a time:
You have two pieces of code, SslClient
and the script which uses this ssl client. From my understanding of the threadpool, the way you have used the threadpool needs to be changed a bit.
From:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install scan_port
You can use scan_port like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page