A complete online hunt for the source code

Source: Internet
Author: User
Tags ftp to domain

In front of a lot of the use of asp+ to achieve the network long pursuit of the program, now here to provide you with this full application of the original program, I hope you first look at
The previous article, with the problem of taking a look at this program, in fact, is very simple. At the same time I also brought you the download of this program!
This program is still a little bit of a problem, such as processing IP address to find the host domain name, if the input is not a legitimate IP address, then the program will
Return an error, if you are interested, you can modify this program yourself:
<%@ Import namespace= "System.Net"%>
<% @Import namespace= "System.Net.Sockets"%>
<%@ Import namespace= "System.IO"%>
<script language= "C #" runat=server>
String strret;
protected void DoClick (Object Src, EventArgs E) {

if (dropdown1. SelectedItem.Value.ToInt16 () ==2) {

Iphostentry hostinfo = DNS. gethostbyname (Txtsearch.text);
Strret= Hostinfo.addresslist[0]. ToString () + "<br>"; Domain name converted to IP address
Iphostentry hostinfo = DNS. GETHOSTBYADDR (Txtsearch.text);
strret= hostinfo.hostname + "<br>"; Convert IP address to domain name

if (checkbox1.checked) {
String Host=txtsearch.text;

TcpClient TCPC = new TcpClient ();
Strret=strret + "SMTP Server:" + tcpconnect (tcpc,host,25) + "<br>"; SMTP Port

TCPC = new TcpClient ();
Strret=strret + "WWW Server:" + tcpconnect (tcpc,host,80) + "<br>"; WWW Port

TCPC = new TcpClient ();
Strret=strret + "FTP Server:" + tcpconnect (tcpc,host,21) + "<br>"; FTP Port

TCPC = new TcpClient ();
Strret=strret + "Pop3 Server:" + tcpconnect (tcpc,host,110) + "<br>"; Pop Port

TCPC = new TcpClient ();
Strret=strret + "Agent Server:" + tcpconnect (tcpc,host,1080) + "<br>"; Ports used by the SOCKET5 port proxy Server

TCPC = new TcpClient ();
Strret=strret + "DNS Server:" + tcpconnect (tcpc,host,53) + "<br>"; DNS Port
ShowMsg. Text=strret;

String tcpconnect (tcpclient tcpc,string host,int port) {
The function of this function is to check whether the port of the specified host is in use.
String strret= "service not Found";
if (0 = = Tcpc. Connect (Host,port)) {
Connection Server succeeded
Strret= "is running";
return strret;

<title>web Hunt </title>
<script language= "JScript" >
These two functions are functional to access the Clipboard
function Doufucopy () {
TextRange = Txtsearch.createtextrange ();
Textrange.execcommand ("Copy");
function Doufupaste () {
TextRange = Txtsearch.createtextrange ();
Textrange.execcommand ("Paste");
<form Id=testform runat=server>
<asp:dropdownlist id= "DropDown1" runat= "Server" >
<asp:listitem id=listitem1 value=1> Find domain name </asp:ListItem>
<asp:listitem id=listitem2 value=2> Find ip</asp:listitem>
<asp:textbox runat=server id=txtsearch/>
<asp:checkbox id= "CheckBox1" runat= "Server" text= "check each other's machine"/>
<asp:button runat=server id=do text= "Find" Onclick=doclick/>
<asp:label id=showmsg runat=server/>
<input Type=button value= "copy" onclick= "Doufucopy ();" >
<input Type=button value= "Paste" onclick= "doufucopy ();" >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.