"""Project name: Port probing scanWhiteVersion: 1.0Note: For example MySQL 3306 here, port to 80 can also"""#引入线程和socket的模块importthreadingimportsocketrouters=[] #用于保存探测结果lock =threading. Lock () #构造一把锁def main (): NBSP;NBSP;NBSP;NBSP;LOCAL_IPNBSP;=NBSP;SOCKET.GETHOSTBYNAME_EX ( Socket.gethostname ()) all_threads=[]foripin Local_ip[2]:fori inrange (1,255): array=ip.split (".") #把IP以点号做分割 array[3]=str (i)
Label: style blog HTTP color Io OS AR
Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. LINQ; using system. net; using system. net. sockets; using system. text; using system. threading. tasks; using system. windows. forms; namespace scan computer port {public partial class form1: FORM {public form1 () {initializecomponent
Python's most concise and understandable scan port code. It's definitely going to be amazing to run.
Copy the Code code as follows:
From threading import Thread, Activecount
Import socket
Import OS
def test_port (Dst,port):
Os.system (' title ' +str (port))Cli_sock = Socket.socket (socket.af_inet, socket. SOCK_
TCP connection scanning, based on sockets, uses threading to implement multi-threading and to control the number of processes.Note: The Threads_limit variable depends on the host, and there are too many definitions to make the following error:650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/86/F2/wKiom1fPfPGTqgnjAAAL7L75bGQ904.png-wh_500x0-wm_3 -wmp_4-s_3950277187.png "title=" 1.png "alt=" Wkiom1fpfpgtqgnjaaal7l75bgq904.png-wh_50 "/>Code:Importsocketimportthreading#changethesevars.star
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.