Query the options for IP in the global network

xiaoxiao2021-03-06  41

I. SQLCREATE PROC IP_SEARCH (@begin char, @ end char) as - create table aa (data varchar (200)) Declare @ip varchar (20), @ str varchar (100) -, @ Begin Int - set @ Begin = 1IF @begin is null set @ begin = 1if @end is null set @ end = 255WHILE (@begin <= @ End) Begin set @ ip = '192.168.0.' Cast (@begin as char) SET @ Str = 'ping' @ ip '-N 1' Create Table #t (Data Varchar (200)) Insert #t exec @Str if not exists (Select * from #t where data like "%) TIMED OUT% ') Insert Aa Values ​​(@ ip ' have been buy ') Drop table #t set @ begin = @ Begin 1ndselect * from aa - delete from aaexec ip_search

--Drop proc ip_search two, dos command for / l% i in (1, 1, 254) do ping -n 1 -l 8 -w 100 192.168.0.% i | Find "reply" >> Record.txt

转载请注明原文地址:https://www.9cbs.com/read-75551.html

New Post(0)