In addition to reconnaissance IP, there is also one-port scan in the hacker's detection mode. "Port scans" allow you to know which services, ports are open and not used (which you can understand to find the channel to the computer) that is being scanned.
first, port scanning
Easy to find remote
Reprinted: you can scan segment B and crack some service passwords According to the dictionary, such as FTP, SSH, MySQL, MSSQL, and Oracle. The system will automatically try to empty and weak passwords, for example, ftp Anonymous logon, mssql sa blank password, and oracle default password. Is it recommended to scan about 50 IP addresses due to php timeout? Php # ClassBPHPportscannerby
Reprinted: you can
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
A few days ago, I started to learn socket. I wrote a single-threaded single-host port scanner for one of the great help of yunshu. Today I want to change it to multi-host scanning, (The thread is still single and slow, but it can be used for learning. It doesn't matter if it is slow), but it won't be changed. Please give me some advice.
/*Name: netxportCopyright: netxflyAuthor: netxflyDate: 12-10-04Description: A simple
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
Port scan
Using System;Using System.Drawing;Using System.Collections;Using System.ComponentModel;Using System.Windows.Forms;Add the following.Using System.Data;Using System.Net.Sockets;Using System.Net;Using System.IO;Using System.Text;Using System.Threading;
Namespace Iportscan{Summary description for Form1.public class Form1:System.Windows.Forms.Form{This is where the public variables that the program is
tcpconnect Scan : TCP full connection scan. Using the Connect () function provided by the system to connect to the target port, if the target port is listening to this port, then the Connect () function will be successfully returned, otherwise, the change
A few days ago to see an article about Metasploit and PowerShell, which mentioned a statement about the port scan, write very concise, very good idea, you can throw away the bulky nmap directly scan the specified IP port:
Copy Code code as follows:
1..1024 | %{Echo ((New-object Net.Sockets.TcpClient).
Pyhton Scan Port Script code
#-*-Coding:utf8-*-#!/usr/bin/python# Program: Port scan import socket, time, Threadsocket.setdefaulttimeout (3) def Soc Ket_port (Ip,port): "" "Enter IP and port number,
I,
TCP scan technology
There are many common port scanning technologies, such as TCP connect () scanning, tcp syn scanning, and tcp fin scanning. There are also many articles on the network, such: the most basic scanning technology used by my program is described on the http://www.antai-genecon.com/suml/zhishiyy/jingong/duankougj.htm: TCP scanning.The CONNECT () System Call provided by the operating system
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)
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
ArticleDirectory
I. Overview
Ii. NMAP implementation
Iii. Python implementation (using Python-NMAP)
Due to work requirements, I used UDP port scanning knowledge during this time. Here I will summarize it for my convenience. I. Overview
Task Description:Develop oneProgramUsed to obtain the list of Host IP addresses that enable the SNMP service in the LAN, and write the corresponding files for other programs to use.Background:SNMP
IntroducedPython-nmap is a port scanning tool based on the system Nmap command, which is simple and convenient to use.Recently, in order to enhance server security and supervision, it is necessary to keep the company server open port scan records every day, once there is an increase in the decrease can be found.Previously wrote a https://github.com/bashhu/monitor
I. OverviewTask Description:Develop a program to obtain a list of host IP addresses in the LAN on which the SNMP service is opened, and write the corresponding files for use by other programs.Background knowledge:SNMP is based on UDP, and the standard SNMP service uses ports 161 and 162.Ideas:1, access to the local domain online host list;2, to obtain the SNMP port of each host (such as 161) open condition;3. Write specific files in a specific format.
# 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
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.