Commands commonly used in shell scripts: wget, Curl, SS, Lsof, Nmap, NC, netstat, telnetLab Environment Description:(1) The port used by the remote Nginx Server Ip:192.169.5.136,nginx service is 80;(2) ip:192.169.5.121 of local CeshijiCommon commands on server local monitoring service ports: Netstat, SS, Lsof (for short, three ' S ')Examples of options for common commands:(1) [[email protected] ~]# NETSTAT-LNP |grep nginxTCP 0 0 0.0.0.0:80 0.0.0.0:* L
Many network services use Linux systems and have Apache Server software installed. Vulnerable to hackers using Nmap to scan Web sites, now share a precautionary experience.I can pass the setup, let Linux on Nmap scan ignore color. The iptables tool is used to filter the network information so that the system cannot respond to the scan request information. To improve the security of the server.You need to ru
ImportNmap#Import nmap.py ModuleNM = Nmap. Portscanner ()#instantiation of Nmap. Portscanner ObjectNm.scan ('127.0.0.1','22-443')#Scan 127.0.0.1, port number from 22 to 443Nm.command_line ()#gets the command line that currently performs the scan: Nmap-ox-P 22-443 127.0.0.1Nm.scaninfo ()#get Nmap Scan information {' TCP
First, the newest link addresses are different from the Python stunt and have been modified.Download tar, then run Python setup.py install[Email protected]:/# wget http://xael.org/pages/python-nmap-0.6.1.tar.gz--2017-03-22 13:41:38--http://xael.org/pages/python-nmap-0.6.1.tar.gzResolving xael.org (xael.org) ... 194.36.166.10Connecting to Xael.org (xael.org) |194.36.166.10|:80 ... Connected.HTTP request sent
Nmap can be obtained on the official websitehttps://nmap.org/I use the Nmap binary package to compile the installation under LinuxAfter decompression, execute in file directory./configure--prefix=/usr/local/nmapmakemake Installalias Nmap=/usr/local/nmap/bin/nmapComplete the installationUsing
Work on it, whether in development or operations, when testing some system service ports, there are always TCP or UDP two protocols. As is known to all, TCP service ports can be remotely tested via Telnet, while UDP ports, in general, use Nmap, whether in Linux or Windows environments.Nmap software under Windows also has a graphical interface with command-line mode, but most people use skilled people, more inclined to command-line mode, because the op
: Output to all formats
-V: improves the details of output information.
-D [level]: raise or set the debugging level (9 is recommended)
-- Open: only open ports are displayed.
-- Packet-trace: displays all sent and received packets.
-- Iflist: lists interfaces and routes (debugging)
-- Log-errors: saves Error Records/warnings to specified files.
-- Append-output: append to the specified output file.
-- Resume
: Continue to suspend scanning
-- Stylesheet
: Set the XSL style sh
[Root @ localhost ~] # Nmap-v www.XXXX.com -----------------------------> test the target host
Starting Nmap 6.40 (http://nmap.org) at CSTNmap scan report for 192.168.254.152Host is up (0.00069 s latency ).Not shown: 992 closed ports......................................................OS CPE: cpe:/o: microsoft: windows_vistaOS details: Microsoft Windows VistaNetwork Distance: 1 hopNmap-PT uses TCP ping t
Nmap Port State resolution
status
open
The application receives a TCP connection or UDP message on that port
closed
The closed port is also accessible to nmap, which receives NMAP detection messages and responds. But there is no application listening on it
filtered
"unix!"Python code implementationThe TTL value can be changed by software, so it is not always accurate to judge by the TTL value alone. And the powerful Nmap also provides a powerful parameter-O, can be based on a variety of characteristics of the system identification, implementation of NMAP 192.168.0.108-o command, to obtain the results:Of course, even using nmap
Release of nmap 7.10 (12 new scripts, bug fixes, and OS recognition are added)
In this release, Namp 7.10 has been greatly improved based on previous versions! 12 new NNS are added, with hundreds of OS systems and version fingerprint recognition. Of course, there are also some minor improvements and Bug fixes.Source code and installation packages for Linux, Windows, Mac systems can be obtained through the following link: https://nmap.org/download.html
I. Description of the toolCall Nmap library for port scanningSecond, demonstrate the use of the effect650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8C/31/wKiom1hkumqAIUmwAASq5uUuz9s324.png "title=" Nmapscan.png "alt=" Wkiom1hkumqaiumwaasq5uuuz9s324.png "/>Third, Code + CommentsImportnmapimportargparsedefnmapscan (Host,port):# Call Nmap's Portscanner class nm=nmap. Portscanner () # scan results=
NMap, also known as Network Mapper, is a web scan and sniffer toolkit under Linux.Nmap is a powerful scanner that is often used in network safety penetration testing. The power of function is self-evident. Here are some of its scanning commands. Specifically, we have to rely on everyone to learn, because it is too strong.1) Get the system type and open port of the remote hostNmap-ss-p0-sv-o Here the -ss TCP SYN Scan (also known as semi-open, or stealt
You want to use NMAP to scan the IP segment and output a clean IP: Port file. So I wrote a simple script.
import xml.dom.minidomimport sysimport getoptstatstr=""statstrlist=["open"]infile=""outfile=""infileflag=0outfileflag=0statstrflag=0isstatflag=0helpflag=0#chu li can shuoptions,args = getopt.getopt(sys.argv[1:],"hni:o:s:",["help","in=","out=","stat"])for name,value in options: if name in ("-h","--help"): print """ xxoo.py
person is all right ...mytools.py This is the definition of a library of functions, the use of a function, the sendemail of the e-mail function, of course, the current scene can be defined in a file, but it is a good habit to split the program by module. Haha, I'm a little pythonic.#-*-coding:utf-8-*-importsmtplibfromemail.mime.textimportmimetextfrom email.headerimportheaderdefsendemail (Sender,receiver,subject,content,smtpserver, Smtpuser,smtppass): msg=mimetext (content, ' html ', ' Utf-8 ')
nmap-n-sp 10.0.0.0/24
Starting Nmap 4.20 (http://insecure.org) at 2009-02-02 07:41 CST
Host 10.0.0.1 appears to is up.
Host 10.0.0.10 appears to is up.
Host 10.0.0.104 appears to is up.
Host 10.0.0.124 appears to is up.
Host 10.0.0.125 appears to is up.
Host 10.0.0.129 appears to is up.
Nmap finished:256 IP addresses (6 hosts up) scanned in 2.365 seconds
0) View the native open ports
Nmap localhost
1 Get the remote host system type and open port
Nmap-ss-p0-sv-o
Here the -ss TCP SYN Scan (also known as semi-open, or stealth scan)-P0 allows you to turn off ICMP pings.-SV Open System version detection-O attempt to identify the remote operating systemOther options:-a simultaneously turns on operating system fingerprint and version detection-v Verbose output sc
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.