自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Fping:一個多主機同時ping掃描程序

安全
fping是一款類似ping(1)(ping(1)是通過ICMP(網(wǎng)絡控制信息協(xié)議Internet Control Message Protocol)協(xié)議回復請求以檢測主機是否存在)的程序。

fping是一款類似ping(1)(ping(1)是通過ICMP(網(wǎng)絡控制信息協(xié)議Internet Control Message Protocol)協(xié)議回復請求以檢測主機是否存在)的程序。Fping與ping不同的地方在于,您可以在命令行中指定要ping的主機數(shù)量范圍,也可以指定含有要ping的主機列表文件。與ping要等待某一主機連接超時或發(fā)回反饋信息不同,fping給一個主機發(fā)送完數(shù)據(jù)包后,馬上給下一個主機發(fā)送數(shù)據(jù)包,實現(xiàn)多主機同時ping。如果某一主機ping通,則此主機將被打上標記,并從等待列表中移除,如果沒ping通,說明主機無法到達,主機仍然留在等待列表中,等待后續(xù)操作。

下載鏈接:http://down.51cto.com/data/158562

>>去網(wǎng)絡安全工具百寶箱看看其它安全工具

PS:本文沒有涉及到windows下面的fping.

功能

fping - send ICMP ECHO_REQUEST packets to network hosts

UNIX和Windows環(huán)境都有許多可以用來進行ICMP ping掃描的工具。fping(http://packetstorm.securify.com/ Exploit_Code__Archive/ fping.tar.gz)是UNIX環(huán)境里久經(jīng)考驗的ping掃描工具之一。早期的ping掃描工具大都需要等待前一個被探測主機返回某種響應消息之后才能繼續(xù)探測下一臺主機是否存在,但fping卻能以輪轉(zhuǎn)方式并行地發(fā)出大量的ping請求。這么一來,用fping工具去掃描多個IP地址的速度要比ping快很多。fping工具有兩種用法:既可以通過標準輸入設備(stdin)向它提供一系列IP地址作為輸入,也可以讓它去讀取某個文件。讓fping工具去讀取一個文件是件很簡單的事情:創(chuàng)建一個文本文件并把IP地址按每行一個的格式寫入,如下所示:

  1. 192.168.51.1   
  2. 192.168.51.2   
  3. 192.168.51.3   
  4. ...   
  5. 192.168.51.253   
  6. 192.168.51.254 

然后使用“-f”參數(shù)讀入這個文件,如下所示:

  1. [root]$ fping –a –f in.txt   
  2. 192.168.1.254 is alive   
  3. 192.168.1.227 is alive   
  4. 192.168.1.224 is alive   
  5. ...   
  6. 192.168.1.3 is alive   
  7. 192.168.1.2 is alive   
  8. 192.168.1.1 is alive   
  9. 192.168.1.190 is alive 

fping工具的“-a”選項表示只在輸出報告里列出當前正在運行的系統(tǒng)。如果你愿意,還可以同時使用這個工具的“-d”選項去解析主機名。筆者比較喜歡使用fping工具的“-a”選項配合shell腳本和“-d”選項去掃描那些有著***的主機名的系統(tǒng)。在編寫進行ping掃描的腳本時,“-f”和fping工具的其他幾個選項也很有用。fping工具的可用選項的完整清單可以通過執(zhí)行“fping -h”命令來查看。

Unix 版本相關網(wǎng)站:http://www.fping.com/

Windows版本相關網(wǎng)站:http://www.kwakkelflap.com/ 
 
實現(xiàn)機制:

Fping sends ICMP echo requests to a list of IP addresses, provided either on standard input or from a file, in a parallelized fashion. It sends out Pings in a "round-robin" fashion without waiting for a response. When responses are eventually returned, fping notes whether the host is alive or not and waits for more responses, all the while continuing its Ping sweep.

跟普通shell批量ping腳本相比,具有并行,結果易讀的優(yōu)點。   #p#
 
fping -a -g 172.19.148.1 172.19.148.255 -s -n  >hosts
 
執(zhí)行結果,顯示通的IP: 

  1. [root@Meil_88 root]# vi hosts    
  2.     
  3. 172.19.148.1   
  4. 172.19.148.2   
  5. 172.19.148.3   
  6. 172.19.148.18  

參數(shù):

fping Option
Description
-a
Lists targets that responded
-A
Lists targets by address instead of hostname
-b <num>
Sends <num> bytes of data per ICMP packet (default 56)
-B <f>
Tells fping to wait <f> times longer for a reply after each successive failed request (default 1.5)
-c <num>
Number of Pings to send to each target (default 1)
-C <num>
Same as above but prints additional statistics for each host
-e
Displays elapsed time on return packets
-f <file>
Reads the target list from <file> (use "-" for standard input)
-g
Tells fping to generate a target list by specifying the start and end address (ex. ./fping -g 192.168.1.0 192.168.1.255) or an IP/subnet mask (ex. ./fping -g 192.168.1.0/24)
-i <num>
Interval (in milliseconds) to wait between Pings (default 25)
-l
Sends Pings forever
-m
Pings multiple interfaces on target host
-n
Displays targets by name (-d is equivalent)
-p <num>
Interval (in milliseconds) between Pings to an individual target (in looping and counting modes, default 1000)
-q
Doesn't show per-target/per-Ping results
-Q <num>
Same as -q, but show summary every <num> seconds
-r <num>
When a host doesn't respond, retries the host <num> times (default 3)
-s
Displays summary statistics
-t <num>
Timeout (in milliseconds) for individual targets (default 500)
-u
Displays targets that are unreachable
-v
Displays version number

責任編輯:佟健 來源: 飛諾網(wǎng)
相關推薦

2019-04-25 05:35:30

ping網(wǎng)絡命令

2023-04-04 12:24:10

2010-05-06 16:40:47

Unix SUID

2020-06-12 07:53:56

程序員語言代碼

2020-02-22 21:51:43

程序員Microsoft SServerSQL

2025-01-20 13:23:17

2023-03-10 13:38:00

Python文檔掃描器

2019-03-06 09:15:11

ping網(wǎng)絡華云數(shù)據(jù)

2015-05-06 13:39:15

Windows系統(tǒng)復雜

2011-08-17 10:28:53

多對多查詢SQL Server

2021-04-19 11:16:17

小程序微信開發(fā)

2011-05-11 10:58:39

iOS

2014-01-06 09:33:32

程序員管理

2020-11-10 07:13:44

端口號進程

2009-10-14 09:58:43

VB.NET程序

2010-03-02 13:35:59

Fedora apac

2015-03-06 09:44:11

微軟Azure谷歌云谷歌應用引擎

2021-09-28 09:07:21

云計算主機托管云服務

2020-10-05 21:13:37

程序員技能開發(fā)者

2012-10-29 09:51:17

科技公司創(chuàng)業(yè)程序員
點贊
收藏

51CTO技術棧公眾號