I. Overview
Task Description:
Develop a program to obtain a list of host IP addresses for the SNMP service on the LAN and write the corresponding files for use by other programs.
Background knowledge:
SNMP is UDP-based, and the standard SNMP service uses 161 and 162 ports.
Ideas:
1, get the local area online host list;
2, get the SNMP port of each host (for example, 161) to open the State;
3. Write specific files in a specific format.
Only the first t
Bulk scan IP Port, the result of exporting IP-named files based on scanned IP.Assume that the contents of the 1.txt file are127.0.0.1192.168.1.1Then we get the file content IP to scanwindow. bat version
: 1.txt for file name, modify according to requirement: C:\nmap\nmap-6.46\nmap.exe is the path of Namp, modify according to requirement: put 1.txt together with the
Ask PHP swoole extended scan IP 65,535 ports whether the idea of opening
I've only recently learned about Swoole extensions, but I've learned about pthreads extensions before, but there's no idea.
Issues that need to be addressed:
11,000 IP concurrent Scan survival (own resolution using ping or FSOCKOPEN,NODEJS, but too inefficient or want to use PHP environment)
2. Sca
Scan port data storage with thread-safe queue queues
Scan ports with multithreading
Implementing program organization with the thread class
#Coding:utf-8ImportSYSImportSocketImportSYSImportRe fromThreadingImportThread fromQueueImportQueueclassScanport (Thread):def __init__(self, target_ip, Target_port, Q): Super (Scanport, self).__init__() self.targe
Simple multi-threaded port scanning ToolYou can receive an IP address as a parameter, and if you do not, the port of the native is scanned by default1 #!/usr/bin/python2 3 ImportSocket4 Import Time5 ImportArgparse6 ImportThreading7 8 defarg_process ():9Argparser=argparse. Argumentparser (description="Port Scaner")TenArgparser.add_argument ('- I.','--ip', action='
The Tag:smtplib exists loginmultipartlines formats streamatt accessories #!/usr/bin/env python3 #coding: Utf-8import timeimport commandsimport osimport smtplibimport email. Mimemultipartimport email. Mimetextimport email. Mimebaseimport mimetypesimport Email. Mimeimage#import mimeimage# function: Scan the host's port number 22nd is open and will be successful export log, if there is a
static void Main (string[] args) { Console.WriteLine ("Please enter IP"); String ip = Console.ReadLine (); Parallel.For (1, 65535, i = Scan (IP, I, +)); Console.WriteLine ("Scan Complete"); } public static void Scan (string ip, int port, int timeout)
Tag:python Scan Tool [[emailprotected]~]#catportscan.py#!/usr/bin/envpython#-*- coding:utf-8-*-importsocket# instantiation of an object S=socket.socket () #循环遍历你自定义的端口范围 Forportinrange (1,65535): #使用python的异常处理 to determine the behavior after a program error try: print "[+]attemptingtoconnectto127.0.0.1:" + STR (port) #客户端对服务器端进行连接, the format of the general address is a tuple (hostname,
Not very familiar with multi-threading, the first simple application.1 /*2 2015.5 HT3 multi-line threaded port scanning4 5 Netstat-an6 7 */8 9#include Ten#include One#include A #pragmaComment (lib, "Ws2_32.lib") - using namespacestd; - the //port parameters passed by thread -typedefstruct - { -UnsignedintMin_port; +UnsignedintMax_port; - }port; +
Suppose the 1.txt file content is127.0.0.1192.168.1.1Then we get the file content IP for scanningwindow. bat version
: 1.txt is the filename, modify according to the requirement: C:\nmap\nmap-6.46\nmap.exe as Namp path, modified according to requirements: Put the 1.txt together with the scan script
The code is as follows
Copy Code
@echo offFor/f "delims=,"%%i in (1.txt) do C:\nmap\nmap-6.46\nmap.exe-T3-A-v-p-%%i >%%i.txt
MFC scan COM port Program
MFC scan COM port program source code
Features:
The core function is scan. Not only can the actual port of COM such as Bluetooth and printer be scanned, but also the
being a warrior is not a simple thing, it is an endless struggle that lasts until the last moment of our lives. No life down is a warrior, like no life down is doomed mediocre, is we let ourselves become such or that!--Natsume StoneDesign ideas:Call Optparse. Optionparse () method, build option parser, accept host name (or IP address), scan port list two parameters. Build two functions Portscan and Connscan
A gadget that uses Python to scan a fixed port to receive parameters: Start IP, terminate IP, target port. and test success, so in this record, Daniel do not spray.
#coding =utf-8 Import Socket import time import sys def portscanner (ip,port): Server = (ip,port) SOCKFD
# Nc-Z localhost 1-10000 // scan ports 1 to 1000 of the Local Machine to obtain the opened portConnection to localhost 22 port [TCP/ssh] succeeded!Connection to localhost 80 port [TCP/HTTP] succeeded!Connection to localhost 111 port [TCP/SunRPC] succeeded!Connection to localhost 199
, Pop3, Location Service, Netbios-NS, Netbios-DGM, Netbios-SSN, IMAP, Https, Microsoft-DS, MSSQL, MYSQL, Terminal Services );// After checking the IP format, use an array to define the service name and status of each port.Echo"
";Echo"
";Echo"
IP address you scanned: ". $ remoteip ."";Echo"
";Echo"
";Echo"
{
$ Fp = @ fsockopen ($ remoteip, $ port [$ I], $ errno, $ errstr, 1 );
If (! $ Fp ){
Echo"
Automatically check the ip address used to scan the ssh port, and automatically disable command 01 for 100 scans #! /Bin/bash02 # sshd, failed03cd/var/bakwww.2cto. com04cat/var/log/secure | grepFailed | awk amp; #39; {print $13} amp; #39; | sort | uniq...
Automatically check the ip address used to scan the ssh port,
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.