$ sudo nmap -sS 45.20.209.41 Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-22 09:44 CEST Nmap scan report for 45-20-209-41.lightspeed.rlghnc.sbcglobal.net (45.20.209.41) Host is up (0.11s latency). Not shown: 994 filtered ports PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 143/tcp open imap 443/tcp closed https 993/tcp open imaps
$ echo | nc -v 45.20.209.41 22 Connection to 45.20.209.41 22 port [tcp/ssh] succeeded! SSH-2.0-OpenSSH_8.8
作者的评论
对于 TAB 示例,您可以将所有
sed
操作放在一个参数中,而不是用复合分号 ";" 分隔它们,例如sed -e 's/^/>/; s/\t/ /g' Makefile
另一个有用的是首先添加一个
REGEX
,类似于 grepping,然后在行上应用运算符,例如sed '/REGEX/ s/^/>/; s/\t/ /g' Makefile
如果安装 nmap,以下内容可能会派上用场
$ sudo nmap --script broadcast-dhcp-discover
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-22 10:44 CEST
Pre-scan script results
| broadcast-dhcp-discover
| Response 1 of 1
| IP Offered: 10.0.0.252
| DHCP Message Type: DHCPOFFER
| Server Identifier: 10.0.0.2
| IP Address Lease Time: 2m00s
| Renewal Time Value: 1m00s
| Rebinding Time Value: 1m45s
| Subnet Mask: 255.255.255.0
| Broadcast Address: 10.0.0.255
| Domain Name: home.dehakkelaar.nl
| NTP Servers: 10.0.0.3
| Domain Name Server: 10.0.0.2, 10.0.0.4
|_ Router: 10.0.0.1
并且可以从公共 IP 中学到很多东西 ;)
$ dig +short -x 45.20.209.41
45-20-209-41.lightspeed.rlghnc.sbcglobal.net.
$ sudo nmap -sS 45.20.209.41
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-22 09:44 CEST
Nmap scan report for 45-20-209-41.lightspeed.rlghnc.sbcglobal.net (45.20.209.41)
Host is up (0.11s latency).
Not shown: 994 filtered ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
143/tcp open imap
443/tcp closed https
993/tcp open imaps
$ echo | nc -v 45.20.209.41 22
Connection to 45.20.209.41 22 port [tcp/ssh] succeeded!
SSH-2.0-OpenSSH_8.8
$ curl -I 45.20.209.41
HTTP/1.1 200 OK
Date: Fri, 22 Jul 2022 07:45:28 GMT
Server: Apache/2.4.54 (Fedora Linux) OpenSSL/3.0.5
X-Powered-By: PHP/8.1.8
Link: ; rel="https://api.w.org/"
Content-Type: text/html; charset=UTF-8
$ nc 45.20.209.41 25 <<< 'helo me.'
554 yorktown.both.org ESMTP not accepting messages
250 yorktown.both.org Hello XXXX [XXXX], pleased to meet you
$ whois 45.20.209.41
[..]
Organization: AT&T Corp. (AC-3280)
$ whois both.org
[..]
Registrar: Google LLC