国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

網(wǎng)上追捕(很多實(shí)用的port)

2019-11-18 21:28:53
字體:
供稿:網(wǎng)友
/*
豆腐制作 都是精品
http://www.asp888.net 豆腐技術(shù)站
如轉(zhuǎn)載 請(qǐng)保留完整版權(quán)信息
*/
我們可以在asp.net中通過使用Sockets Class 來對(duì)InterNet 上的主機(jī)進(jìn)行遠(yuǎn)程的控制和探測(不要搞破壞呀!)
下面的例子中豆腐給大家提供一個(gè)例子,可以對(duì) 指定的主機(jī)進(jìn)行 探測:)功能類似 追捕。
<%@ Import Namespace="System.Net" %>
<% @Import Namespace="System.Net.Sockets" %>
<%@ Import Namespace="System.IO" %>
<script language="C#" runat=server>
PRotected void Page_Load(Object Src, EventArgs E){
TCPClient tcpc = new TCPClient();
String host="host";
showmsg.Text=TcpConnect(tcpc,host,25); //SMTP 端口
/*
showmsg.Text=TcpConnect(tcpc,host,80); //WWW 端口
showmsg.Text=TcpConnect(tcpc,host,21); //FTP 端口
showmsg.Text=TcpConnect(tcpc,host,110); //Pop 端口
showmsg.Text=TcpConnect(tcpc,host,1080); //Socket5 端口 代理服務(wù)器使用的端口
showmsg.Text=TcpConnect(tcpc,host,53); //DNS 端口
*/
}
String TcpConnect(TCPClient tcpc,String host,int port){
StreamReader sr ;
String strRet="123";
if(0 == tcpc.Connect(host,port)){
//聯(lián)結(jié)服務(wù)器成功
sr = new StreamReader(tcpc.GetStream(), Encoding.Default);
strRet=sr.ReadLine();
}
return strRet;
}
</script>
<html>
<head>
<title>網(wǎng)絡(luò)追捕</title>
<link rel="stylesheet" type="text/CSS" href="/doufu.css">
</head>
<body>
<asp:Label id=showmsg runat=server />
</body>
</html>

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 日照市| 孙吴县| 和顺县| 西畴县| 丹阳市| 西藏| 乐东| 靖西县| 乳山市| 县级市| 察雅县| 谷城县| 西贡区| 嘉定区| 桃源县| 贵南县| 西城区| 天镇县| 阜平县| 连南| 建昌县| 正蓝旗| 宝应县| 凌海市| 湾仔区| 濮阳县| 呼伦贝尔市| 鲁山县| 霍林郭勒市| 日土县| 晋江市| 桃园县| 固镇县| 榆中县| 北安市| 武川县| 盐源县| 永川市| 江陵县| 金门县| 东乡族自治县|