当前注册人数107024人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB   站内搜索 BBS讨论社区 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

port scan with asp.net

ASP.NET网站端口扫描源代码

2007年12月09日
C#, Windows, .NET 2.0, ASP.NET, IIS 6, VS2005, Dev
本程序是一个ASP.NET程序,通过这个网页,你可以对任何一个主机或者网站(域名)进行端口扫描,发现对方主机打开了什么样的端口,是什么样的服务运行在该端口上。程序采用了多线程机制,同时对多个端口进行探测。
 
相关知识

试探端口的方法:

public void portAc(object portNoObj)
{
    int portNo = (int)portNoObj;
    TcpClient TcpScan = new TcpClient();
    try
    {
        // Try to connect

        TcpScan.Connect(ipAdres, portNo);

        if (!TcpScan.Connected) return;
        // If there's no exception, we can say the port is open

        log += "Port " + portNo + " open\r\n";

        //NOTE: We may include more finger tips to here

        switch (portNo)
        {
            case 80: http = true; break;
        }

        try
        {
            DataRow dr = dt.NewRow();
            dr[0] = "http://www.portsdb.org/bin/portsdb.cgi?portnumber=" + 
                     portNo + "&protocol=ANY&String=";
            dt.Rows.Add(dr);
        } // Ends Try

        catch (Exception Err)
        {
            throw Err;
        }
    }
    catch
    {
        // An exception occured, thus the port is probably closed

    }
}
源代码原文下载:
port scan with asp.net this is an old fashion to learn which port is open or not on the target. You can try the working example at mascix.com and I check around for nice and fast portscanner but could not find and offcourse this one not like nmap just connects the port and if its connected tells its open. by the way http finger is the part of this web app. which checks if 80. port is open on the target and writes the output I guess after user saw the output who will understand which OS runs on the target.

源码图片

从本站下载附件及源代码(1个附件,已经成功下载105次)

最值得关注的外文源代码

Openbravo ERP
Converting ASP.NET site into a SharePoint site
Troubleshooting Partial Rendering Errors in ATLAS and ASP.NET 2.0
Sample Application to Integrate Silverlight and ASP.NET AJAX
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论18次,此处显示最近14次评论! 查看所有评论

lili  2010年02月21日
不错,挺好的
于宁  2009年09月26日
积分不够~~
dragonflying  2009年04月16日
学习,原创真的占很小一部分,借鉴别人成果是高效的
wangmingjian  2009年03月18日
很好
minesks  2009年02月16日
很好
helihua0909  2009年02月12日
good
xzx258  2008年12月25日
还不错 试了下
wjq  2008年10月30日
看了一下,感觉还行
fengjun7719  2008年10月25日
呵和~!
fengjun7719  2008年10月25日
喜欢~!试试去~!
liyachi  2008年10月24日
不错
aking  2008年10月09日
ASP.NET网站端口扫描源代码
leiryhp  2008年08月30日
ASP.NET网站端口扫描源代码
leiryhp  2008年08月29日
ASP.NET网站端口扫描源代码
字数在300字内
请如实评论
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved   免责声明
京ICP备08011023号