檢查郵件伺服器是否有效
private function getmailserver(byval sdomain as string) as string
dim info as new processstartinfo
dim ns as process
'呼叫windows的nslookup命令,查詢郵件伺服器
info.useshellexecute = false
info.redirectstandardinput = true
info.redirectstandardoutput = true
info.filename = "nslookup"
info.createnowindow = true
'查詢型別為mx。關於nslookup的詳細說明,請參見
'windows幫助
info.arguments = "-type=mx " + sdomain.toupper.trim
'啟動乙個進行執行windows的nslookup命令()
ns = process.start(info)
dim sout as streamreader
sout = ns.standardoutput
' 利用正規表示式找出nslookup命令輸出結果中的郵件伺服器資訊
dim reg as system.text.regularexpressions.regex = new system.text.regularexpressions.regex("mail exchanger = (?[^///s]+)")
dim mailserver as string
dim response as string = ""
do while (sout.peek() > -1)
response = sout.readline()
dim amatch as system.text.regularexpressions.match = reg.match(response)
if (amatch.success) then
mailserver = amatch.groups("server").value
exit do
end if
loop
return mailserver
end function
檢查sql server所在伺服器是否改過名
use master select srvid,srvname,datasource from sysservers 如果沒有srvid 0或者srvid 0 也就是本機器 但srvname和datasource不一樣,需要按如下方法修改 use master go 設定兩個變數 declare s...
檢查伺服器是否被惡意登入
1.檢視近期成功的密碼登入 grep password var log auth.log grep v failed grep v invalid2.檢視最近登入失敗的 ip 和每個 ip 失敗次數 awk else end var log auth.log sort k2 rn3.檢視近期登入失敗...
郵件伺服器
郵件伺服器免費 一般telnet pop3server 110後就可以用這些命令了,大小寫不敏感,不包括口令本身,注意不要讓口令回顯,等驗證通過後再允許回顯好了。user username 認可 pass password 認可 執行成功則狀態轉換 apop name,digest 認可 一種安全傳...