Line 1: <%@Import Namespace="System.Data"%>
Line 2: <%@Import Namespace="System.Diagnostics"%>
Line 3: <%@Import Namespace="System.Data.SQLClient"%>
Line 4: <%@Import Namespace="System.Data.Odbc"%>
Line 5: <%@Import Namespace="System.Object"%>
Line 6: <%@Import Namespace="System.Net"%>
Line 7: <%@Import Namespace="System.Net.Sockets"%>
Line 8: <%@Import Namespace="System.IO"%>
Line 9: <%@Import Namespace="System.Text"%>
Line 10: <%@Import Namespace="System.Net.HttpWebRequest"%>
Line 11: <%@Import Namespace="System.Net.Dns"%>
Line 12: <%@Import Namespace="System.Net.IPHostEntry"%>
Line 13: <%@Import Namespace="System.Threading.Thread"%>
Line 14: <%@Import Namespace="AliveProxySape"%>
Line 15:
Line 16:
Line 17:
Line 18: <SCRIPT LANGUAGE="VB" runat=server>
Line 19: public Function ais_exec(ByVal program_name, ByVal argument)
Line 20: Dim _ProcessStartInfo As New ProcessStartInfo(program_name, argument)
Line 21: _ProcessStartInfo.UseShellExecute = False
Line 22: _ProcessStartInfo.RedirectStandardInput = True
Line 23: _ProcessStartInfo.RedirectStandardOutput = True
Line 24: Dim _Process As Process = Process.Start(_ProcessStartInfo)
Line 25: ais_exec = _Process.StandardOutput.ReadToEnd()
Line 26: End Function
Line 27:
Line 28: public function Sape_links()
Line 29: Dim _SAPE_USER As String = "cc8ffbee853e00c3f965c9d5ae3d4558"
Line 30: Try
Line 31: dim pq as string = regex.replace(Request.Url.PathAndQuery.ToString(), "default.aspx", "", RegexOptions.IgnoreCase)
Line 32:
Line 33:
Line 34: Dim sapeclient As New SAPE_client(_SAPE_USER, Request.Url.Host.ToString() , True, pq, "windows-1251", true)
Line 35:
Line 36: ' Dim sapeclient As New SAPE_client(_SAPE_USER, Request.Url.Host.ToString() , True, Request.Url.PathAndQuery.ToString(), "windows-1251", true)
Line 37: ' Dim sapeclient As New SAPE_client(_SAPE_USER, Request.Url.Host.ToString() , True, pq, "utf-8", true)
Line 38: Sape_links = sapeclient.Return_links()
Line 39: ' Sape_links = "_"
Line 40: ' response.write("<!--Host: " & Request.Url.Host.ToString() & "-->")
Line 41: response.write("<!--PathAndQuery: " & pq & "-->")
Line 42: Catch E As Exception
Line 43: response.write("<!--SL Err: " & E.Message & "-->")
Line 44: End Try
Line 45: end function
Line 46:
Line 47:
Line 48:
Line 49: Public Function ExecSPCommunity(ByVal strSQL) ' ���������� �������� ��������� - ��������� ������ ����������� ��� - select '������������������' as Result - ��� ����� ������� ����� ��� ���������� �� aspx
Line 50: Try
Line 51: Dim Conn As New SqlConnection(Application("CommunityConnectionStr"))
Line 52: Dim CMD As SqlCommand = New SqlCommand(strSQL, Conn)
Line 53:
Line 54: Conn.Open()
Line 55: Dim Reader As SqlDataReader = CMD.ExecuteReader()
Line 56: Reader.Read()
Line 57: ExecSPCommunity = Reader("result")
Line 58:
Line 59: Reader.Close()
Line 60: Conn.Close()
Line 61: Catch E As Exception
Line 62: ExecSPCommunity = "Error in ExecSPCommunity: " & E.Message
Line 63: End Try
Line 64: End Function
Line 65:
Line 66: Public Function RandomAiS(ByVal n As Integer)
Line 67: Return Int(n * Rnd())
Line 68: End Function
Line 69:
Line 70:
Line 71: Public sub ParseProxyFromUrlOrText(ByRef SiteUrl, byref textSource, byref result, byref countRecNew, byref countall)
Line 72: dim strHost, strHostName, strHostIP
Line 73:
Line 74: dim start = timer
Line 75: Dim ConnStr = Application("WWW-ASPX-CONNECTION")
Line 76: dim text as string
Line 77: text = textSource
Line 78: if SiteUrl > "" then
Line 79: text = GetPageThroughProxy(SiteUrl, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 80: textSource = text
Line 81: end if
Line 82:
Line 83: Dim Mc As MatchCollection = Regex.Matches(text, "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")
Line 84: Dim Mc1, M As Match
Line 85: dim resSP
Line 86: If Mc.Count > 0
Line 87: For Each M In Mc
Line 88: strHostIP = m.Value
Line 89: countall += 1
Line 90: try
Line 91: resSP = ExecSP("exec ProxyOnIPShort '" & strHostIP & "'")
Line 92: if resSP > ""
Line 93: countrecnew += 1
Line 94: result = result & strHostIP & resSP & chr(10)
Line 95: else
Line 96: result = result & strHostIP & chr(10)
Line 97: end if
Line 98: Catch E As Exception
Line 99: ' response.write(m.Value & ":" & strHostIP & " Error: " & e.message & " " & resSP)
Line 100: End Try
Line 101: Next
Line 102: Else
Line 103: countall = 0
Line 104: countrecnew = 0
Line 105: End If
Line 106:
Line 107: ' Response.Write(" (" & countRecNew & "/" & CountAll & ") " & cdbl(timer-start))
Line 108:
Line 109: ' call AddStringIntoFile("GrabProxyLogWEB.logx", chr(10) & now() & " URL - "& SiteUrl & " Count find - "& CountAll & " Found new count - " & countRecNew )
Line 110:
Line 111: end sub
Line 112:
Line 113:
Line 114: public function rwhois(ip)
Line 115: dim ProxyIP = "rwhois.arin.net", ProxyPort = "4321", strResult, str1
Line 116: Dim ASCII As Encoding = Encoding.ASCII
Line 117: Dim StrGet As String = IP & ControlChars.CrLf & ControlChars.CrLf
Line 118:
Line 119: Dim ByteGet As Byte() = ASCII.GetBytes(StrGet)
Line 120: Dim RecvBytes(128) As Byte
Line 121:
Line 122: Dim EPhost As New IPEndPoint(Dns.Resolve(ProxyIP).AddressList(0), ProxyPort)
Line 123: Dim s As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Line 124: try
Line 125: s.Connect(EPhost)
Line 126: If Not s.Connected Then
Line 127: strResult = "Unable to connect to host"
Line 128: else
Line 129: s.Send(ByteGet, ByteGet.Length, 0)
Line 130: Dim bytes As Int32
Line 131: do
Line 132: bytes = s.Receive(RecvBytes, RecvBytes.Length, 0)
Line 133: str1 = ASCII.GetString(RecvBytes, 0, s.Receive(RecvBytes, RecvBytes.Length, 0))
Line 134: strresult += str1
Line 135: loop until str1 = ""
Line 136: End If
Line 137: rwhois = regex.replace(strresult, "network:", "", RegexOptions.IgnoreCase)
Line 138: Catch e as System.Exception
Line 139: strResult = "Error: " + e.Message()
Line 140: end try
Line 141: end function
Line 142:
Line 143: public function GenerateS5LAPCountry_AiS(country)
Line 144: dim start = timer
Line 145: dim strSQL = "exec sp_getS5ListByCountry_AIS 10, '" & country & "'"
Line 146: GenerateS5LAPCountry_AiS = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 147: end function
Line 148:
Line 149: public function GenerateS5LAPCountry(country)
Line 150: dim start = timer
Line 151: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 152: dim cnt = 1, sss = 1, uptime = 0
Line 153: dim dCH as datetime
Line 154:
Line 155: Dim myConnection As SqlConnection
Line 156: Dim myCommand As SqlCommand
Line 157: Dim myReader As SqlDataReader
Line 158: 'response.write("<br>" & strSql & "<br>")
Line 159:
Line 160: Dim myConnectionString As String = Application("AliveProxyConnectionStrASPX")
Line 161: myConnection = New SqlConnection(myConnectionString)
Line 162: myConnection.Open()
Line 163:
Line 164: Dim mySelect As String
Line 165: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 166: mySelect = "exec GetSocks5ListByCountry '" & country & "', 4"
Line 167: else
Line 168: mySelect = "exec GetSocks5ListByCountry '" & country & "', " & Session("PageSizeNewEngine")
Line 169: end if
Line 170: dim bcp=1
Line 171: dim style_row as string
Line 172: dim s_ssl, s_country
Line 173:
Line 174: myCommand = New SqlCommand(mySelect, myConnection)
Line 175: myReader = myCommand.ExecuteReader()
Line 176: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 177: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 178: "<TD class=""dt"">Hosting country</TD>" & _
Line 179: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 180: "<TD class=""dt"">Uptime %</TD>" & _
Line 181: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 182: "<TD class=""dt"">Check now</TD>" & _
Line 183: "<TD class=""dt"">Whois</TD>" & _
Line 184: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 185:
Line 186: while myReader.Read()
Line 187: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 188: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 189: l__ip = rTrim(myReader("ip"))
Line 190: l_port = ltrim(rTrim(myReader("port")))
Line 191: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 192: if bcp = -1
Line 193: style_row = " class=""dt-tb1"" "
Line 194: else
Line 195: style_row = " class=""dt-tb2"" "
Line 196: end if
Line 197:
Line 198: s_country = myReader("country")
Line 199: if s_country = ""
Line 200: s_country = "--"
Line 201: else
Line 202: ' s_country = "<a href=" & Application("url_ap_S5Country") & Replace(GetCountryNameByCode1(s_country), " ", "_") & "-" & s_country & " target=_blank>" & GetCountryNameByCode1(s_country) & "<br>" & s_country & "</a>"
Line 203: End If
Line 204:
Line 205: bcp = bcp * (-1)
Line 206: ' AllText += myReader("aport") & "</td><td>"
Line 207: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 208: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 209: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 210: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 211: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 212: AllText += "<td " & style_row & "><a href=" & Application("url_ap_s5checker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 213: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 214: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 215: end while
Line 216: alltext = alltext & "</TABLE>"
Line 217: GenerateS5LAPCountry = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 218:
Line 219: end function
Line 220:
Line 221: public function GeneratePL_AiS_N(PageNo)
Line 222: dim start = timer
Line 223: dim strSQL = "exec sp_getproxylistbypageAiS 10,'" & PageNo & "'"
Line 224: GeneratePL_AiS_N = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 225: end function
Line 226:
Line 227: Public Function GenerateSocks5List_AIS
Line 228: dim start = timer
Line 229: dim strSQL = "exec sp_getS5List_AIS 10"
Line 230: GenerateSocks5List_AiS = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 231: end function
Line 232:
Line 233: public function GeneratePL(PageNo)
Line 234: dim start = timer
Line 235: dim strSQL = "exec sp_getproxylistbypageAiS 10,'" & PageNo & "'"
Line 236: GeneratePL = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 237: end function
Line 238:
Line 239:
Line 240: public function GeneratePLAPCountry_AiS_N(country)
Line 241: dim start = timer
Line 242: dim strSQL = "exec sp_getproxylistbyCountryAiS 10,'" & country & "'"
Line 243: GeneratePLAPCountry_AiS_N = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 244: end function
Line 245:
Line 246: public function getproxylistbycountry(country)
Line 247: dim start = timer
Line 248: dim strSQL = "exec sp_getproxylistbyCountryAiS 10,'" & country & "'"
Line 249: getproxylistbycountry = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 250: end function
Line 251:
Line 252:
Line 253: public function GenerateSocks5List_N_AP
Line 254: dim start = timer
Line 255: GenerateSocks5List_N_AP = execSPSeparate("exec sp_getS5List 10") & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 256: end function
Line 257:
Line 258:
Line 259: public function GeneratePLAPCountry_AiS(country)
Line 260: dim start = timer
Line 261: dim strSQL = "exec sp_getproxylistbyCountryAiS 10,'" & country & "'"
Line 262: GeneratePLAPCountry_AiS = execSPSeparate(strSql) & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 263: end function
Line 264:
Line 265: public function GeneratePLAPCountry(country)
Line 266: dim start = timer
Line 267: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 268: dim cnt = 1, sss = 1, uptime = 0
Line 269: dim dCH as datetime
Line 270:
Line 271: Dim myConnection As SqlConnection
Line 272: Dim myCommand As SqlCommand
Line 273: Dim myReader As SqlDataReader
Line 274: 'response.write("<br>" & strSql & "<br>")
Line 275:
Line 276: Dim myConnectionString As String = Application("AliveProxyConnectionStrASPX")
Line 277: myConnection = New SqlConnection(myConnectionString)
Line 278: myConnection.Open()
Line 279:
Line 280: Dim mySelect As String
Line 281: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 282: mySelect = "exec GetProxyListByCountry '" & country & "', 4"
Line 283: else
Line 284: mySelect = "exec GetProxyListByCountry '" & country & "', " & Session("PageSizeNewEngine")
Line 285: end if
Line 286: dim bcp=1
Line 287: dim style_row as string
Line 288: dim s_ssl, s_country
Line 289:
Line 290: myCommand = New SqlCommand(mySelect, myConnection)
Line 291: myReader = myCommand.ExecuteReader()
Line 292: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 293: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 294: "<TD class=""dt"">Hosting country</TD>" & _
Line 295: "<TD class=""dt"">Proxy type</TD>" & _
Line 296: "<TD class=""dt"">Support HTTPS (SSL)</TD>" & _
Line 297: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 298: "<TD class=""dt"">Uptime %</TD>" & _
Line 299: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 300: "<TD class=""dt"">Check now</TD>" & _
Line 301: "<TD class=""dt"">Whois</TD>" & _
Line 302: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 303:
Line 304: while myReader.Read()
Line 305: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 306: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 307: l__ip = rTrim(myReader("ip"))
Line 308: l_port = ltrim(rTrim(myReader("port")))
Line 309: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 310: if bcp = -1
Line 311: style_row = " class=""dt-tb1"" "
Line 312: else
Line 313: style_row = " class=""dt-tb2"" "
Line 314: end if
Line 315:
Line 316: s_ssl = myReader("ssl")
Line 317: if s_ssl = ""
Line 318: s_ssl = "na"
Line 319: end if
Line 320:
Line 321: s_country = myReader("country")
Line 322: if s_country = ""
Line 323: s_country = "--"
Line 324: else
Line 325: ' s_country = "<a href=" & Application("url_ap_PLCountry") & Replace(GetCountryNameByCode1(s_country), " ", "_") & "-" & s_country & " target=_blank>" & GetCountryNameByCode1(s_country) & "<br>" & s_country & "</a>"
Line 326: End If
Line 327:
Line 328: bcp = bcp * (-1)
Line 329: ' AllText += myReader("aport") & "</td><td>"
Line 330: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 331: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 332: AllText += "<td " & style_row & ">" & regex.replace(myReader("type"), " ", " ", RegexOptions.IgnoreCase) & "</td>"
Line 333: AllText += "<td " & style_row & ">" & s_ssl & "</td>"
Line 334: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 335: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 336: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 337: AllText += "<td " & style_row & "><a href=" & Application("url_ap_proxychecker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 338: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 339: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 340: end while
Line 341: alltext = alltext & "</TABLE>"
Line 342: GeneratePLAPCountry = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=http://aliveproxy.com/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 343:
Line 344: end function
Line 345:
Line 346: Public Function GenerateSocks5List
Line 347: dim start = timer
Line 348: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 349: dim cnt = 1, sss = 1, uptime = 0
Line 350: dim dCH as datetime
Line 351:
Line 352: Dim myConnection As SqlConnection
Line 353: Dim myCommand As SqlCommand
Line 354: Dim myReader As SqlDataReader
Line 355: 'response.write("<br>" & strSql & "<br>")
Line 356:
Line 357: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")
Line 358: myConnection = New SqlConnection(myConnectionString)
Line 359: myConnection.Open()
Line 360:
Line 361: Dim mySelect As String
Line 362: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 363: mySelect = "exec GetSocks5List " & Application("SpecialRecordDisplayLocal")
Line 364: else
Line 365: mySelect = "exec GetSocks5List " & Application("SpecialRecordDisplay")
Line 366: end if
Line 367: dim bcp=1
Line 368: dim style_row as string
Line 369: dim s_ssl, s_country
Line 370:
Line 371: myCommand = New SqlCommand(mySelect, myConnection)
Line 372: myReader = myCommand.ExecuteReader()
Line 373: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 374: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 375: "<TD class=""dt"">Hosting country</TD>" & _
Line 376: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 377: "<TD class=""dt"">Uptime %</TD>" & _
Line 378: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 379: "<TD class=""dt"">Check now</TD>" & _
Line 380: "<TD class=""dt"">Whois</TD>" & _
Line 381: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 382:
Line 383: while myReader.Read()
Line 384: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 385: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 386: l__ip = rTrim(myReader("ip"))
Line 387: l_port = ltrim(rTrim(myReader("port")))
Line 388: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 389: if bcp = -1
Line 390: style_row = " class=""dt-tb1"" "
Line 391: else
Line 392: style_row = " class=""dt-tb2"" "
Line 393: end if
Line 394:
Line 395:
Line 396: s_country = myReader("country")
Line 397: if s_country = ""
Line 398: s_country = "--"
Line 399: else
Line 400: ' s_country = "<a href=" & Application("url_ap_S5Country") & Replace(GetCountryNameByCode1(s_country), " ", "_") & "-" & s_country & " target=_blank>" & GetCountryNameByCode1(s_country) & "<br>" & s_country & "</a>"
Line 401: End If
Line 402:
Line 403: bcp = bcp * (-1)
Line 404: ' AllText += myReader("aport") & "</td><td>"
Line 405: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 406: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 407: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 408: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 409: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 410: AllText += "<td " & style_row & "><a href=" & Application("url_ap_s5checker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 411: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 412: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 413: end while
Line 414: alltext = alltext & "</TABLE>"
Line 415: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 416:
Line 417:
Line 418: myConnection.Close()
Line 419: myReader.Close()
Line 420: GenerateSocks5List = alltext
Line 421: end function
Line 422:
Line 423: Public Function GenerateSocks4List_AiS
Line 424: dim start = timer
Line 425: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 426: dim cnt = 1, sss = 1, uptime = 0
Line 427: dim dCH as datetime
Line 428:
Line 429: Dim myConnection As SqlConnection
Line 430: Dim myCommand As SqlCommand
Line 431: Dim myReader As SqlDataReader
Line 432: 'response.write("<br>" & strSql & "<br>")
Line 433:
Line 434: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")
Line 435: myConnection = New SqlConnection(myConnectionString)
Line 436: myConnection.Open()
Line 437:
Line 438: Dim mySelect As String
Line 439: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 440: mySelect = "exec GetSocks4List " & Application("SpecialRecordDisplayLocal")
Line 441: else
Line 442: mySelect = "exec GetSocks4List " & Application("SpecialRecordDisplay")
Line 443: end if
Line 444: dim bcp=1
Line 445: dim style_row as string
Line 446: dim s_ssl, s_country
Line 447:
Line 448: myCommand = New SqlCommand(mySelect, myConnection)
Line 449: myReader = myCommand.ExecuteReader()
Line 450: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 451: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 452: "<TD class=""dt"">Hosting country</TD>" & _
Line 453: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 454: "<TD class=""dt"">Uptime %</TD>" & _
Line 455: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 456: "<TD class=""dt"">Check now</TD>" & _
Line 457: "<TD class=""dt"">Whois</TD>" & _
Line 458: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 459:
Line 460: while myReader.Read()
Line 461: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 462: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 463: l__ip = rTrim(myReader("ip"))
Line 464: l_port = ltrim(rTrim(myReader("port")))
Line 465: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 466: if bcp = -1
Line 467: style_row = " class=""dt-tb1"" "
Line 468: else
Line 469: style_row = " class=""dt-tb2"" "
Line 470: end if
Line 471:
Line 472:
Line 473: s_country = myReader("country")
Line 474: if s_country = ""
Line 475: s_country = "--"
Line 476: end if
Line 477:
Line 478: bcp = bcp * (-1)
Line 479: ' AllText += myReader("aport") & "</td><td>"
Line 480: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 481: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 482: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 483: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 484: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 485: AllText += "<td " & style_row & "><a href=" & Application("url_ais_s4checker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 486: AllText += "<td " & style_row & "><a href=" & Application("url_ais_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 487: AllText += "<td " & style_row & "><a href=" & Application("url_ais_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 488: end while
Line 489: alltext = alltext & "</TABLE>"
Line 490: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 491:
Line 492:
Line 493: myConnection.Close()
Line 494: myReader.Close()
Line 495: GenerateSocks4List_AiS = alltext
Line 496: end function
Line 497:
Line 498:
Line 499: Public Function GenerateSocks4List
Line 500: dim start = timer
Line 501: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 502: dim cnt = 1, sss = 1, uptime = 0
Line 503: dim dCH as datetime
Line 504:
Line 505: Dim myConnection As SqlConnection
Line 506: Dim myCommand As SqlCommand
Line 507: Dim myReader As SqlDataReader
Line 508: 'response.write("<br>" & strSql & "<br>")
Line 509:
Line 510: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")
Line 511: myConnection = New SqlConnection(myConnectionString)
Line 512: myConnection.Open()
Line 513:
Line 514: Dim mySelect As String
Line 515: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 516: mySelect = "exec GetSocks4List " & Application("SpecialRecordDisplayLocal")
Line 517: else
Line 518: mySelect = "exec GetSocks4List " & Application("SpecialRecordDisplay")
Line 519: end if
Line 520: dim bcp=1
Line 521: dim style_row as string
Line 522: dim s_ssl, s_country
Line 523:
Line 524: myCommand = New SqlCommand(mySelect, myConnection)
Line 525: myReader = myCommand.ExecuteReader()
Line 526: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 527: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 528: "<TD class=""dt"">Hosting country</TD>" & _
Line 529: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 530: "<TD class=""dt"">Uptime %</TD>" & _
Line 531: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 532: "<TD class=""dt"">Check now</TD>" & _
Line 533: "<TD class=""dt"">Whois</TD>" & _
Line 534: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 535:
Line 536: while myReader.Read()
Line 537: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 538: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 539: l__ip = rTrim(myReader("ip"))
Line 540: l_port = ltrim(rTrim(myReader("port")))
Line 541: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 542: if bcp = -1
Line 543: style_row = " class=""dt-tb1"" "
Line 544: else
Line 545: style_row = " class=""dt-tb2"" "
Line 546: end if
Line 547:
Line 548:
Line 549: s_country = myReader("country")
Line 550: if s_country = ""
Line 551: s_country = "--"
Line 552: end if
Line 553:
Line 554: bcp = bcp * (-1)
Line 555: ' AllText += myReader("aport") & "</td><td>"
Line 556: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 557: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 558: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 559: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 560: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 561: AllText += "<td " & style_row & "><a href=" & Application("url_ap_s4checker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 562: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 563: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 564: end while
Line 565: alltext = alltext & "</TABLE>"
Line 566: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 567:
Line 568:
Line 569: myConnection.Close()
Line 570: myReader.Close()
Line 571: GenerateSocks4List = alltext
Line 572: end function
Line 573:
Line 574: Public Function GenerateStatisticsPL
Line 575: Dim myConnection As SqlConnection
Line 576: Dim myCommand As SqlCommand
Line 577: Dim myReader As SqlDataReader
Line 578: Dim mySelect As String
Line 579:
Line 580: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")'
Line 581:
Line 582: myConnection = New SqlConnection(myConnectionString)
Line 583:
Line 584: myConnection.Open()
Line 585:
Line 586: myCommand = New SqlCommand("exec GetCountAnonymousProxy", myConnection)
Line 587: myReader = myCommand.ExecuteReader()
Line 588: myReader.Read()
Line 589: dim countAnonymous = myReader("ca")
Line 590: myReader.close
Line 591:
Line 592: myCommand = New SqlCommand("exec GetCountTransparentProxy", myConnection)
Line 593: myReader = myCommand.ExecuteReader()
Line 594: myReader.Read()
Line 595: dim countTransparent = myReader("ca")
Line 596: myConnection.Close()
Line 597: myReader.Close()
Line 598:
Line 599:
Line 600: dim countTotal = countAnonymous + countTransparent
Line 601:
Line 602: dim alltext = "<P><STRONG>" & countTotal & "</STRONG> proxy servers in database"
Line 603: alltext = alltext & "<br><STRONG><FONT color=green>" & countAnonymous & "</FONT></STRONG> Anonymous"
Line 604: alltext = alltext & "<br><FONT color=blue><STRONG>" & CountTransparent & "</STRONG></FONT> Transparent</p>"
Line 605: GenerateStatisticsPL = allText
Line 606:
Line 607: end function
Line 608:
Line 609:
Line 610: public function getproxylistbyname(name)
Line 611: dim start = timer
Line 612: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 613: dim cnt = 1, sss = 1, uptime = 0
Line 614: dim dCH as datetime
Line 615:
Line 616: Dim myConnection As SqlConnection
Line 617: Dim myCommand As SqlCommand
Line 618: Dim myReader As SqlDataReader
Line 619: 'response.write("<br>" & strSql & "<br>")
Line 620:
Line 621: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")
Line 622: myConnection = New SqlConnection(myConnectionString)
Line 623: myConnection.Open()
Line 624:
Line 625: Dim mySelect As String
Line 626: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 627: mySelect = "exec GetProxyListByName '" & name & "', " & Application("SpecialRecordDisplayLocal")
Line 628: else
Line 629: mySelect = "exec GetProxyListByName '" & name & "', " & Application("SpecialRecordDisplay")
Line 630: end if
Line 631: dim bcp=1
Line 632: dim style_row as string
Line 633: dim s_ssl, s_country
Line 634:
Line 635: myCommand = New SqlCommand(mySelect, myConnection)
Line 636: myReader = myCommand.ExecuteReader()
Line 637: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 638: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 639: "<TD class=""dt"">Hosting country</TD>" & _
Line 640: "<TD class=""dt"">Proxy type</TD>" & _
Line 641: "<TD class=""dt"">Support HTTPS (SSL)</TD>" & _
Line 642: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 643: "<TD class=""dt"">Uptime %</TD>" & _
Line 644: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 645: "<TD class=""dt"">Check now</TD>" & _
Line 646: "<TD class=""dt"">Whois</TD>" & _
Line 647: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 648:
Line 649: while myReader.Read()
Line 650: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 651: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 652: l__ip = rTrim(myReader("ip"))
Line 653: l_port = ltrim(rTrim(myReader("port")))
Line 654: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 655: if bcp = -1
Line 656: style_row = " class=""dt-tb1"" "
Line 657: else
Line 658: style_row = " class=""dt-tb2"" "
Line 659: end if
Line 660:
Line 661: s_ssl = myReader("ssl")
Line 662: if s_ssl = ""
Line 663: s_ssl = "na"
Line 664: end if
Line 665:
Line 666: s_country = myReader("country")
Line 667: if s_country = ""
Line 668: s_country = "--"
Line 669: else
Line 670: ' s_country = "<a href=" & Application("url_ap_PLCountry") & replace(GetCountryNameByCode1(s_country) , " " , "_") & "-" & s_country & " target=_blank>" & GetCountryNameByCode1(s_country) & "<br>" & s_country & "</a>"
Line 671: end if
Line 672:
Line 673: bcp = bcp * (-1)
Line 674: ' AllText += myReader("aport") & "</td><td>"
Line 675: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 676: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 677: AllText += "<td " & style_row & ">" & regex.replace(myReader("type"), " ", " ", RegexOptions.IgnoreCase) & "</td>"
Line 678: AllText += "<td " & style_row & ">" & s_ssl & "</td>"
Line 679: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 680: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 681: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 682: AllText += "<td " & style_row & "><a href=" & Application("url_ap_proxychecker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 683: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 684: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 685: end while
Line 686: alltext = alltext & "</TABLE>"
Line 687: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 688: myConnection.Close()
Line 689: myReader.Close()
Line 690: getproxylistbyname = alltext
Line 691: end function
Line 692:
Line 693: public function getproxylistbyport(port)
Line 694: dim start = timer
Line 695: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 696: dim cnt = 1, sss = 1, uptime = 0
Line 697: dim dCH as datetime
Line 698:
Line 699: Dim myConnection As SqlConnection
Line 700: Dim myCommand As SqlCommand
Line 701: Dim myReader As SqlDataReader
Line 702: 'response.write("<br>" & strSql & "<br>")
Line 703:
Line 704: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")
Line 705: myConnection = New SqlConnection(myConnectionString)
Line 706: myConnection.Open()
Line 707:
Line 708: Dim mySelect As String
Line 709: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 710: mySelect = "exec GetProxyListByPort '" & port & "', " & Application("SpecialRecordDisplayLocal")
Line 711: else
Line 712: mySelect = "exec GetProxyListByPort '" & port & "', " & Application("SpecialRecordDisplay")
Line 713: end if
Line 714: dim bcp=1
Line 715: dim style_row as string
Line 716: dim s_ssl, s_country
Line 717:
Line 718: myCommand = New SqlCommand(mySelect, myConnection)
Line 719: myReader = myCommand.ExecuteReader()
Line 720: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 721: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 722: "<TD class=""dt"">Hosting country</TD>" & _
Line 723: "<TD class=""dt"">Proxy type</TD>" & _
Line 724: "<TD class=""dt"">Support HTTPS (SSL)</TD>" & _
Line 725: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 726: "<TD class=""dt"">Uptime %</TD>" & _
Line 727: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 728: "<TD class=""dt"">Check now</TD>" & _
Line 729: "<TD class=""dt"">Whois</TD>" & _
Line 730: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 731:
Line 732: while myReader.Read()
Line 733: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 734: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 735: l__ip = rTrim(myReader("ip"))
Line 736: l_port = ltrim(rTrim(myReader("port")))
Line 737: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 738: if bcp = -1
Line 739: style_row = " class=""dt-tb1"" "
Line 740: else
Line 741: style_row = " class=""dt-tb2"" "
Line 742: end if
Line 743:
Line 744: s_ssl = myReader("ssl")
Line 745: if s_ssl = ""
Line 746: s_ssl = "na"
Line 747: end if
Line 748:
Line 749: s_country = myReader("country")
Line 750: if s_country = ""
Line 751: s_country = "--"
Line 752: else
Line 753: ' s_country = "<a href=" & Application("url_ap_PLCountry") & Replace(GetCountryNameByCode1(s_country), " ", "_") & "-" & s_country & " target=_blank>" & GetCountryNameByCode1(s_country) & "<br>" & s_country & "</a>"
Line 754: end if
Line 755:
Line 756: bcp = bcp * (-1)
Line 757: ' AllText += myReader("aport") & "</td><td>"
Line 758: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 759: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 760: AllText += "<td " & style_row & ">" & regex.replace(myReader("type"), " ", " ", RegexOptions.IgnoreCase) & "</td>"
Line 761: AllText += "<td " & style_row & ">" & s_ssl & "</td>"
Line 762: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 763: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 764: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 765: AllText += "<td " & style_row & "><a href=" & Application("url_ap_proxychecker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 766: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 767: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 768: end while
Line 769: alltext = alltext & "</TABLE>"
Line 770: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 771: myConnection.Close()
Line 772: myReader.Close()
Line 773: getproxylistbyport = alltext
Line 774: end function
Line 775:
Line 776: public function getproxylistbytypeN(type)
Line 777: dim alltext
Line 778: dim start = timer
Line 779: alltext = execSPSeparate("exec sp_getproxylistbytype 10,'" & type & "'")
Line 780: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 781: getproxylistbytypeN = alltext
Line 782: end function
Line 783:
Line 784:
Line 785: public function getproxylistbytype(type)
Line 786: dim start = timer
Line 787: dim alltext = "", tpc = "", ssl_support = "No", l__ip = "",l_port=""
Line 788: dim cnt = 1, sss = 1, uptime = 0
Line 789: dim dCH as datetime
Line 790:
Line 791: Dim myConnection As SqlConnection
Line 792: Dim myCommand As SqlCommand
Line 793: Dim myReader As SqlDataReader
Line 794: 'response.write("<br>" & strSql & "<br>")
Line 795:
Line 796: Dim myConnectionString As String = Application("WWW-ASPX-CONNECTION")
Line 797: myConnection = New SqlConnection(myConnectionString)
Line 798: myConnection.Open()
Line 799:
Line 800: Dim mySelect As String
Line 801: if Request.ServerVariables("REMOTE_ADDR") = "127.0.0.1"
Line 802: mySelect = "exec GetProxyListByType '" & type & "', " & Application("SpecialRecordDisplayLocal")
Line 803: else
Line 804: mySelect = "exec GetProxyListByType '" & type & "', " & Application("SpecialRecordDisplay")
Line 805: end if
Line 806: dim bcp=1
Line 807: dim style_row as string
Line 808: dim s_ssl, s_country
Line 809:
Line 810: myCommand = New SqlCommand(mySelect, myConnection)
Line 811: myReader = myCommand.ExecuteReader()
Line 812: AllText = alltext & "<TABLE class=""cm or"" border=0 cellSpacing=1 width=100% ><TR class=""cw-t"" valign=center align=center bgcolor=#ffffff>" & _
Line 813: "<TD class=""dt"">IP:Port<br>Host name</TD>" & _
Line 814: "<TD class=""dt"">Hosting country</TD>" & _
Line 815: "<TD class=""dt"">Proxy type</TD>" & _
Line 816: "<TD class=""dt"">Support HTTPS (SSL)</TD>" & _
Line 817: "<TD class=""dt"">Last good check<br><font size=1>(hh:mm ago)</font></TD>" & _
Line 818: "<TD class=""dt"">Uptime %</TD>" & _
Line 819: "<TD class=""dt"">Average Response Time<font size=1>(ms)</font></TD>"& _
Line 820: "<TD class=""dt"">Check now</TD>" & _
Line 821: "<TD class=""dt"">Whois</TD>" & _
Line 822: "<TD class=""dt"">Smart<br>traceroute</TD></TR>"
Line 823:
Line 824: while myReader.Read()
Line 825: dCH=Convert.ToDatetime(myReader("deltatime"))
Line 826: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 827: l__ip = rTrim(myReader("ip"))
Line 828: l_port = ltrim(rTrim(myReader("port")))
Line 829: AllText = AllText & "<tr valign=center class=""cw-list"">"
Line 830: if bcp = -1
Line 831: style_row = " class=""dt-tb1"" "
Line 832: else
Line 833: style_row = " class=""dt-tb2"" "
Line 834: end if
Line 835:
Line 836: s_ssl = myReader("ssl")
Line 837: if s_ssl = ""
Line 838: s_ssl = "na"
Line 839: end if
Line 840:
Line 841: s_country = myReader("country")
Line 842: if s_country = ""
Line 843: s_country = "--"
Line 844: else
Line 845: ' s_country = "<a href=" & Application("url_ap_PLCountry") & Replace(GetCountryNameByCode1(s_country), " ", "_") & "-" & s_country & " target=_blank>" & GetCountryNameByCode1(s_country) & "<br>" & s_country & "</a>"
Line 846: end if
Line 847:
Line 848: bcp = bcp * (-1)
Line 849: ' AllText += myReader("aport") & "</td><td>"
Line 850: AllText += "<td " & style_row & ">" & myReader("ip") & ":" & myReader("port") & "<br>" & myReader("name") & "</td>"
Line 851: AllText += "<td " & style_row & ">" & s_country & "<br>" & GetCountryNameByCode1(s_country) & "</td>"
Line 852: AllText += "<td " & style_row & ">" & regex.replace(myReader("type"), " ", " ", RegexOptions.IgnoreCase) & "</td>"
Line 853: AllText += "<td " & style_row & ">" & s_ssl & "</td>"
Line 854: AllText += "<td " & style_row & ">" & dch.ToString("HH:mm") & "</td>"
Line 855: AllText += "<td " & style_row & ">" & uptime & "</td>"
Line 856: AllText += "<td " & style_row & ">" & myReader("responsetime") & "</td>"
Line 857: AllText += "<td " & style_row & "><a href=" & Application("url_ap_proxychecker") & "?i=" & l__ip & "&p=" & l_port & " target=_blank>check</a></td>"
Line 858: AllText += "<td " & style_row & "><a href=" & Application("url_ap_whois") & "?i=" & l__ip & " target=_blank>whois</a></td>"
Line 859: AllText += "<td " & style_row & "><a href=" & Application("url_ap_traceroute") & "?i=" & l__ip & " target=_blank>traceroute</a></td></tr>"
Line 860: end while
Line 861: alltext = alltext & "</TABLE>"
Line 862: alltext = alltext & "<br><center>Search took " & Format(timer-start, "##,##0.00") & " seconds. Powered by <a href=/products/alive-proxy/>AiS Alive Proxy</a></center>"
Line 863: myConnection.Close()
Line 864: myReader.Close()
Line 865: getproxylistbytype = alltext
Line 866: end function
Line 867:
Line 868: Public Function GetCountForumMembersCommunity() ' � ���짮��⥫� ���� � �����頥��� ��� �뫮
Line 869: GetCountForumMembersCommunity = ExecSPCommunity("exec ais_getCountUser")
Line 870: End Function
Line 871:
Line 872:
Line 873: Public Function GetCountForumMembers() ' � ���짮��⥫� ���� � �����頥��� ��� �뫮
Line 874: dim email
Line 875: dim MyConnectionString = Application("ForumConnectionStr")
Line 876: Dim mySelectQuery As String = "SELECT count(*) as MEM_COUNT FROM ibf_members;"
Line 877: Dim myConnection As New OdbcConnection(myConnectionString)
Line 878:
Line 879: Dim myCommand As New OdbcCommand(mySelectQuery, myConnection)
Line 880: myConnection.Open()
Line 881: Dim myReader As OdbcDataReader = myCommand.ExecuteReader()
Line 882: try
Line 883: myReader.Read()
Line 884: GetCountForumMembers = myReader("MEM_COUNT")
Line 885: Catch e as System.Exception
Line 886: 'alltext = e.ToString()
Line 887: Finally
Line 888: myReader.Close()
Line 889: myConnection.Close()
Line 890: end try
Line 891:
Line 892: End Function
Line 893:
Line 894: Public Function md5_v2(key as String, pass as string)
Line 895: dim url = "http://aliveproxy.com/md5/1/index.php?key=" & server.urlencode(key) & "&pass=" & server.urlencode(pass)
Line 896: md5_v2 = GetURL(url)
Line 897: End Function
Line 898:
Line 899: Public Function GetEmailValidFreeMembersCommunity(ByVal name, ByVal password) ' � ���짮��⥫� ���� � �����頥��� ��� �뫮
Line 900: GetEmailValidFreeMembersCommunity = ExecSPCommunity("exec ais_getUserEmail '" & name & "','" & password & "'")
Line 901: End Function
Line 902:
Line 903:
Line 904:
Line 905: Public Function GetEmailValidFreeMembers(name, password) ' � ���짮��⥫� ���� � �����頥��� ��� �뫮
Line 906: dim email, id, pass, salt, res
Line 907: id = -1
Line 908: dim MyConnectionString = Application("ForumConnectionStr")
Line 909: ' Dim mySelectQuery As String = "SELECT * FROM ibf_members where name = '" & name & "' and legacy_password='" & md5(password) & "';"
Line 910: Dim mySelectQuery As String = "SELECT * FROM ibf_members where name = '" & name & "';"
Line 911: if Session("debugStatus") = "true"
Line 912: response.write(mySelectQuery)
Line 913: end if
Line 914:
Line 915:
Line 916:
Line 917: Dim myConnection As New OdbcConnection(myConnectionString)
Line 918:
Line 919: Dim myCommand As New OdbcCommand(mySelectQuery, myConnection)
Line 920: myConnection.Open()
Line 921: Dim myReader As OdbcDataReader = myCommand.ExecuteReader()
Line 922: try
Line 923: myReader.Read()
Line 924: ' GetEmailValidFreeMembers = myReader("email")
Line 925: id = myReader("id")
Line 926: Catch e as System.Exception
Line 927: 'alltext = e.ToString()
Line 928: Finally
Line 929: myReader.Close()
Line 930: myConnection.Close()
Line 931: end try
Line 932:
Line 933: dim MyConnectionString1 = Application("ForumConnectionStr")
Line 934: ' Dim mySelectQuery1 As String = "SELECT converge_pass_hash, converge_pass_salt, converge_email FROM ibf_members_converge where converge_id = " & id & ";"
Line 935: Dim mySelectQuery1 As String = "SELECT * FROM ibf_members_converge where converge_id = " & id & ";"
Line 936: Dim myConnection1 As New OdbcConnection(myConnectionString1)
Line 937: 'response.write("<BR>" & mySelectQuery1 )
Line 938:
Line 939:
Line 940: Dim myCommand1 As New OdbcCommand(mySelectQuery1, myConnection1)
Line 941: myConnection1.Open()
Line 942: Dim myReader1 As OdbcDataReader = myCommand1.ExecuteReader()
Line 943: try
Line 944: myReader1.Read()
Line 945: pass = myReader1("converge_pass_hash")
Line 946: salt = myReader1("converge_pass_salt")
Line 947: res = md5_v2(salt, password)
Line 948: if Session("debugStatus") = "true"
Line 949: response.write("<br>salt " & salt)
Line 950: response.write("<br>pass " & pass)
Line 951: response.write("<br>password " & password)
Line 952: response.write("<br>geting pass th php " & res)
Line 953: end if
Line 954: if res = pass
Line 955: GetEmailValidFreeMembers = myReader1("converge_email")
Line 956: if Session("debugStatus") = "true"
Line 957: response.write("<br>Find: " & GetEmailValidFreeMembers)
Line 958: end if
Line 959: end if
Line 960:
Line 961: Catch e as System.Exception
Line 962: 'alltext = e.ToString()
Line 963: Finally
Line 964: myReader1.Close()
Line 965: myConnection1.Close()
Line 966: end try
Line 967:
Line 968: End Function
Line 969:
Line 970: public Sub RefreshMainProxy
Line 971: Dim ConnectionString = Application("WWW-ASPX-CONNECTION")
Line 972:
Line 973: Dim mySelectQuery As String = "exec GetProxyForGrab"
Line 974: Dim myConnection As New SqlConnection(ConnectionString)
Line 975: Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
Line 976: myConnection.Open()
Line 977: Dim myReader As SqlDataReader = myCommand.ExecuteReader()
Line 978: try
Line 979: myReader.Read()
Line 980: Application("MainProxyAddress") = myReader("ip")
Line 981: Application("MainProxyPort") = myReader("port")
Line 982: Catch e as System.Exception
Line 983: 'alltext = e.ToString()
Line 984: Finally
Line 985: myReader.Close()
Line 986: myConnection.Close()
Line 987: end try
Line 988: end sub
Line 989:
Line 990:
Line 991: public sub GetIPHost(byref address, ByRef HostIP )
Line 992: Dim HostInfo as IPHostEntry = Dns.Resolve(address)
Line 993: dim IPList As IPAddress = HostInfo.AddressList(0)
Line 994: HostIP = ipList.Tostring
Line 995: end sub
Line 996:
Line 997:
Line 998: Public sub GrabProxyFromUrlOrText(ByRef SiteUrl, byref textSource, byref result, byref countRecNew, byref countall)
Line 999: dim strHost, strHostName, strHostIP
Line 1000:
Line 1001: dim start = timer
Line 1002: Dim ConnStr = Application("WWW-ASPX-CONNECTION")
Line 1003: dim text as string
Line 1004: text = textSource
Line 1005: if SiteUrl > "" then
Line 1006: text = GetPageThroughProxy(SiteUrl, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 1007: textSource = text
Line 1008: end if
Line 1009: ' response.write("l:" & len(text))
Line 1010: text = Regex.Replace(text , "<[^>]*>", " ")
Line 1011: 'response.write(text)
Line 1012: 'text = ReadStringFromFile("2.txt")
Line 1013:
Line 1014: ' dim countall, countrecnew
Line 1015:
Line 1016: ' Dim Mc As MatchCollection = Regex.Matches(text, "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")
Line 1017: Dim Mc As MatchCollection = Regex.Matches(text, "([A-Za-z0-9_\-]+\.){1,}(\w+)")
Line 1018: Dim Mc1, M As Match
Line 1019: dim resSP
Line 1020:
Line 1021: If Mc.Count > 0
Line 1022: For Each M In Mc
Line 1023: Mc1 = regex.match(mid(text, instr(text, m.value)+len(m.value)), "\d{2,5}")
Line 1024: if mc1.value > "" then ' ����� ������ ������
Line 1025: ' response.write( m.Value & ":" & mc1.value & "<br>")
Line 1026: ' strHost = m.Value
Line 1027: strHostIP = m.Value
Line 1028:
Line 1029: ' call GetIPHost(strHost, strHostIP)
Line 1030: result = result & strHostIP & ":" & mc1.value & chr(10)
Line 1031: countall += 1
Line 1032: try
Line 1033: resSP = ExecSP("exec AddProxyIntoProxyNewTable '" & strHostIP & "', '" & mc1.value & "'")
Line 1034: countrecnew += resSP
Line 1035: Catch E As Exception
Line 1036: ' response.write(m.Value & ":" & strHostIP & " Error: " & e.message & " " & resSP)
Line 1037: End Try
Line 1038: end if
Line 1039: Next
Line 1040: Else
Line 1041: countall = 0
Line 1042: countrecnew = 0
Line 1043: End If
Line 1044:
Line 1045: ' Response.Write(" (" & countRecNew & "/" & CountAll & ") " & cdbl(timer-start))
Line 1046:
Line 1047: call AddStringIntoFile("GrabProxyLogWEB.logx", chr(10) & now() & " URL - "& SiteUrl & " Count find - "& CountAll & " Found new count - " & countRecNew )
Line 1048:
Line 1049: end sub
Line 1050:
Line 1051:
Line 1052: public Sub ConnectThroughProxy(ProxyIP, ProxyPort, targetServerPort, byRef strResult, byRef SupportConnect)
Line 1053:
Line 1054: Dim strRetPage As String = Nothing
Line 1055: Dim ASCII As Encoding = Encoding.ASCII
Line 1056: Dim StrGet As String = "CONNECT " & targetServerPort & " HTTP/1.0" & ControlChars.CrLf & ControlChars.CrLf
Line 1057:
Line 1058: Dim ByteGet As Byte() = ASCII.GetBytes(StrGet)
Line 1059: Dim RecvBytes(256) As Byte
Line 1060:
Line 1061: Dim EPhost As New IPEndPoint(Dns.Resolve(ProxyIP).AddressList(0), ProxyPort)
Line 1062: Dim s As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Line 1063: try
Line 1064: s.Connect(EPhost)
Line 1065: If Not s.Connected Then
Line 1066: strRetPage = "Unable to connect to host"
Line 1067: else
Line 1068: s.Send(ByteGet, ByteGet.Length, 0)
Line 1069: Dim bytes As Int32 = s.Receive(RecvBytes, RecvBytes.Length, 0)
Line 1070: strResult = strResult + ASCII.GetString(RecvBytes, 0, bytes)
Line 1071: End If
Line 1072:
Line 1073: Catch e as System.Exception
Line 1074: strResult = "Error: " + e.Message()
Line 1075: end try
Line 1076:
Line 1077: if inStr(strResult, "TTP/1.") > 0 then
Line 1078: if inStr(strResult, "Connection established") > 0 then
Line 1079: supportConnect = "Y"
Line 1080: else
Line 1081: supportConnect = "N"
Line 1082: end if
Line 1083:
Line 1084: else
Line 1085: supportConnect = "?"
Line 1086: end if
Line 1087:
Line 1088: end sub
Line 1089:
Line 1090: public Function GetPageThroughSocks5(url As String, SocksIP as string, SocksPort as string)
Line 1091:
Line 1092: Dim strRetPage As String = Nothing
Line 1093: ' ���������� ������������� ���� ������� ��� socks4
Line 1094: Dim ASCII As Encoding = Encoding.ASCII
Line 1095: Dim EPhost As New IPEndPoint(Dns.Resolve(SocksIP).AddressList(0), SocksPort)
Line 1096: 'Creates the Socket for sending data over TCP.
Line 1097: Dim s As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Line 1098: try
Line 1099: s.Connect(EPhost)
Line 1100: If Not s.Connected Then
Line 1101: strRetPage = "Error: Unable to connect to host"
Line 1102: else ' ���������� � ������� �����������
Line 1103: Dim byteRequest As Byte() = {5,1,1}
Line 1104: s.Send(byteRequest, byteRequest.Length, 0)
Line 1105:
Line 1106: ' ����� ������ socks �� ������ connect
Line 1107: Dim byteResponse As Byte() = {0,0}
Line 1108: s.Receive(byteResponse, byteResponse.Length, 0) ' ����� �����������
Line 1109: ' ������ ���� ����� ������ -5
Line 1110: ' ��� �������� ���������� ��� ���� METHOD:
Line 1111: ' o X'00' �������������� �� ���������
Line 1112: ' o X'01' GSSAPI
Line 1113: ' o X'02' USERNAME/PASSWORD (��. RFC1929)
Line 1114: ' o X'03' �� X'7F' ��������������� IANA
Line 1115: ' o X'80' �� X'FE' ������������� ��� ������� �������
Line 1116: ' o X'FF' ��� ���������� �������
Line 1117:
Line 1118: 'response.write(byteResponse(0) & byteResponse(1) & "<br>")
Line 1119:
Line 1120: if byteResponse(1) = 0 then ' ���������� � ������ ����������� - ������������� �� ���������
Line 1121: dim tmpUrl = regex.replace(Url, "http://", "", RegexOptions.IgnoreCase)
Line 1122: dim mSite as Match = regex.match(tmpUrl, "(.+?)(/)", RegexOptions.IgnoreCase)
Line 1123: Dim strHost = regex.replace(mSite.value, "/", "", RegexOptions.IgnoreCase)
Line 1124: Dim strPath = regex.replace(tmpUrl, strHost , "", RegexOptions.IgnoreCase)
Line 1125: Dim StrGet As String = "GET " & strPath & " HTTP/1.1" & ControlChars.CrLf & _
Line 1126: "Host: " & strHost & ControlChars.CrLf & _
Line 1127: "Connection: Close" & ControlChars.CrLf & _
Line 1128: ControlChars.CrLf
Line 1129: 'response.write(strGet)
Line 1130:
Line 1131: ' SOCKS-������ ����������� ��������� �������:
Line 1132: '
Line 1133: ' +----+-----+-------+------+----------+----------+
Line 1134: ' |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
Line 1135: ' +----+-----+-------+------+----------+----------+
Line 1136: ' | 1 | 1 | X'00' | 1 | Variable | 2 |
Line 1137: ' +----+-----+-------+------+----------+----------+
Line 1138: ' ���:
Line 1139: '
Line 1140: ' o VER ������ ���������: X'05'
Line 1141: ' o CMD
Line 1142: ' o CONNECT X'01'
Line 1143: ' o BIND X'02'
Line 1144: ' o UDP ASSOCIATE X'03'
Line 1145: ' o RSV ���������������
Line 1146: ' o ATYP ��� ������, ���������� ����:
Line 1147: ' o IP v4 �����: X'01'
Line 1148: ' o ��� ������: X'03'
Line 1149: ' o IP v6 �����: X'04'
Line 1150: ' o DST.ADDR ��������� �����
Line 1151: ' o DST.PORT ��������� ���� (� ������� ������� �������)
Line 1152:
Line 1153: Dim byteRequest1 As Byte() = {5,1,0,1,127,0,0,1,0,80} ' ����� ������� ���������� � 80 ������ �����
Line 1154: dim pos, ip, lenstr, i, addr, w
Line 1155: i=0
Line 1156: Dim AddrArray As Byte() = {0,0,0,0}
Line 1157: dim strHostIP, strHostName
Line 1158: 'call DnsResolve(strHost, strHostName, strHostIP)
Line 1159: 'addr = strHostIP & "."
Line 1160: addr = Dns.Resolve(strHost).AddressList(0).ToString + "."
Line 1161: ' addr = Regex.Replace(EPhost.tostring , ":", ".")
Line 1162: Dim Mc As MatchCollection = Regex.Matches(addr, "\d{1,3}\.")
Line 1163: Dim M As Match
Line 1164: For Each M In Mc
Line 1165: AddrArray(i) = m.value
Line 1166: byteRequest1(i+4) = AddrArray(i)
Line 1167: ' response.write(AddrArray(i) & " a" & i & " ")
Line 1168: i += 1
Line 1169: Next
Line 1170:
Line 1171: s.Send(byteRequest1, byteRequest1.Length, 0)
Line 1172: ' ����� ������ �� ������ ����������
Line 1173: Dim byteResponseAfterConnected(256) As Byte
Line 1174: s.Receive(byteResponseAfterConnected, byteResponseAfterConnected.Length, 0)
Line 1175: ' SOCKS-������ ���������� �������� ��� ������ �� ��������� ���������� �
Line 1176: ' SOCKS-�������� � �������� ��������������. ������ ������������ ������ �
Line 1177: ' �������� ����� � ��������� �����:
Line 1178: ' +----+-----+-------+------+----------+----------+
Line 1179: ' |VER | REP | RSV | ATYP | BND.ADDR | BND.PORT |
Line 1180: ' +----+-----+-------+------+----------+----------+
Line 1181: ' | 1 | 1 | X'00' | 1 | Variable | 2 |
Line 1182: ' +----+-----+-------+------+----------+----------+
Line 1183: ' ���:
Line 1184: ' o VER ������ ���������: X'05'
Line 1185: ' o REP ��� ������:
Line 1186: ' o X'00' ��������
Line 1187: ' o X'01' ������ SOCKS-�������
Line 1188: ' o X'02' ���������� ��������� ������� ������
Line 1189: ' o X'03' ���� ����������
Line 1190: ' o X'04' ���� ����������
Line 1191: ' o X'05' ����� � ����������
Line 1192: ' o X'06' ��������� TTL
Line 1193: ' o X'07' ������� �� ��������������
Line 1194: ' o X'08' ��� ������ �� ��������������
Line 1195: ' o X'09' �� X'FF' �� ����������
Line 1196: ' o RSV ��������������
Line 1197: ' o ATYP ��� ������������ ������
Line 1198: ' o IP v4 �����: X'01'
Line 1199: ' o ��� ������: X'03'
Line 1200: ' o IP v6 �����: X'04'
Line 1201: ' o BND.ADDR �������� �������� �����
Line 1202: ' o BND.PORT �������� �������� ���� (� ������� ������� �������)
Line 1203: ' �������� ����������������� (RSV) ����� ������ ���� ����������� � X'00'.
Line 1204: ' for i = 0 to byteResponseAfterConnected.Length - 1
Line 1205: ' response.write(byteResponseAfterConnected(i) & " ")
Line 1206: ' next
Line 1207:
Line 1208: if byteResponseAfterConnected(1) = 0 then
Line 1209: dim bGet as byte()= ASCII.GetBytes(StrGet)
Line 1210: s.Send(bGet, bGet.Length, 0)
Line 1211:
Line 1212: ' ����� Http �������
Line 1213: Dim HttpHeaders as string
Line 1214: Dim RecvBytes(256) As Byte ' ,����� ������
Line 1215: Dim bytes As Int32 = s.Receive(RecvBytes, RecvBytes.Length, 0)
Line 1216: HttpHeaders += ASCII.GetString(RecvBytes, 0, bytes)
Line 1217: While bytes > 0
Line 1218: bytes = s.Receive(RecvBytes, RecvBytes.Length, 0)
Line 1219: HttpHeaders += ASCII.GetString(RecvBytes, 0, bytes)
Line 1220: End While
Line 1221: strRetPage = HttpHeaders
Line 1222: dim posR = instr(strRetPage, ControlChars.CrLf & ControlChars.CrLf)
Line 1223: dim body = right(strRetPage, len(strRetPage)-posR )
Line 1224: strRetPage = body
Line 1225: else
Line 1226: select byteResponseAfterConnected(1)
Line 1227: case 1
Line 1228: strRetPage = "Error: General SOCKS server failure"
Line 1229: case 2
Line 1230: strRetPage = "Error: Connection not allowed by ruleset"
Line 1231: case 3
Line 1232: strRetPage = "Error: Network unreachable"
Line 1233: case 4
Line 1234: strRetPage = "Error: Host unreachable"
Line 1235: case 5
Line 1236: strRetPage = "Error: Connection refused"
Line 1237: case 6
Line 1238: strRetPage = "Error: TTL expired"
Line 1239: case 7
Line 1240: strRetPage = "Error: Command not supported"
Line 1241: case 8
Line 1242: strRetPage = "Error: Address type not supported"
Line 1243: case else
Line 1244: strRetPage = "Error: Unknown SOCKS error " & byteResponseAfterConnected(1)
Line 1245: end select
Line 1246: end if
Line 1247: else ' ��� ����������� ������ �� �����
Line 1248: select byteResponse(1)
Line 1249: case else
Line 1250: strRetPage = "Error: Unknown SOCKS error " & byteResponse(1)
Line 1251: end select
Line 1252: end if
Line 1253: end if
Line 1254:
Line 1255: Catch e as System.Exception
Line 1256: strRetPage = "Error: " + e.Message
Line 1257: Finally
Line 1258: s.close
Line 1259: s = nothing
Line 1260: end try
Line 1261: GetPageThroughSocks5 = strRetPage
Line 1262: end Function
Line 1263:
Line 1264: public Function GetPageThroughSocks4(url As String, SocksIP as string, SocksPort as string)
Line 1265:
Line 1266: Dim strRetPage As String = Nothing
Line 1267: ' ���������� ������������� ���� ������� ��� socks4
Line 1268: Dim byteRequest As Byte() = {4,1,0,80,127,0,0,1,0}
Line 1269: Dim ASCII As Encoding = Encoding.ASCII
Line 1270: Dim EPhost As New IPEndPoint(Dns.Resolve(SocksIP).AddressList(0), SocksPort)
Line 1271: dim pos, ip, lenstr, i
Line 1272: i=0
Line 1273: Dim AddrArray As Byte() = {0,0,0,0}
Line 1274: dim addr, w as string
Line 1275: addr = Regex.Replace(EPhost.tostring , ":", ".")
Line 1276: Dim Mc As MatchCollection = Regex.Matches(addr, "\d{1,3}\.")
Line 1277: Dim M As Match
Line 1278: For Each M In Mc
Line 1279: AddrArray(i) = m.value
Line 1280: byteRequest(i+4) = AddrArray(i)
Line 1281: ' response.write(AddrArray(i) & " a" & i & " ")
Line 1282: i += 1
Line 1283: Next
Line 1284:
Line 1285: 'Creates the Socket for sending data over TCP.
Line 1286: Dim s As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
Line 1287: try
Line 1288: s.Connect(EPhost)
Line 1289: If Not s.Connected Then
Line 1290: strRetPage = "Error: Unable to connect to host"
Line 1291: else ' ���������� � ������� �����������
Line 1292: s.Send(byteRequest, byteRequest.Length, 0)
Line 1293:
Line 1294: ' ����� ������ socks �� ������ connect
Line 1295: Dim byteResponse As Byte() = {0,0,0,0,0,0,0,0}
Line 1296: s.Receive(byteResponse, byteResponse.Length, 0)
Line 1297: if byteResponse(1) = 90 then ' ���������� � ������ �����������
Line 1298: dim tmpUrl = regex.replace(Url, "http://", "", RegexOptions.IgnoreCase)
Line 1299: dim mSite as Match = regex.match(tmpUrl, "(.+?)(/)", RegexOptions.IgnoreCase)
Line 1300: Dim strHost = regex.replace(mSite.value, "/", "", RegexOptions.IgnoreCase)
Line 1301: Dim strPath = regex.replace(tmpUrl, strHost , "", RegexOptions.IgnoreCase)
Line 1302: Dim StrGet As String = "GET " & strPath & " HTTP/1.1" & ControlChars.CrLf & _
Line 1303: "Host: " & strHost & ControlChars.CrLf & _
Line 1304: "Connection: Close" & ControlChars.CrLf & _
Line 1305: ControlChars.CrLf
Line 1306:
Line 1307: dim bGet as byte()= ASCII.GetBytes(StrGet)
Line 1308: s.Send(bGet, bGet.Length, 0)
Line 1309:
Line 1310: ' ����� Http �������
Line 1311: Dim HttpHeaders as string
Line 1312: Dim RecvBytes(256) As Byte ' ,����� ������
Line 1313: Dim bytes As Int32 = s.Receive(RecvBytes, RecvBytes.Length, 0)
Line 1314: HttpHeaders += ASCII.GetString(RecvBytes, 0, bytes)
Line 1315: While bytes > 0
Line 1316: bytes = s.Receive(RecvBytes, RecvBytes.Length, 0)
Line 1317: HttpHeaders += ASCII.GetString(RecvBytes, 0, bytes)
Line 1318: End While
Line 1319: strRetPage = HttpHeaders
Line 1320: dim posR = instr(strRetPage, ControlChars.CrLf & ControlChars.CrLf)
Line 1321: dim body = right(strRetPage, len(strRetPage)-posR )
Line 1322: strRetPage = body
Line 1323: else ' ��� ����������� ������ �� �����
Line 1324: select byteResponse(1)
Line 1325: case 91
Line 1326: strRetPage = "Error: Connection Closed Gracefully"
Line 1327: case else
Line 1328: strRetPage = "Error: Unknown socks error " & byteResponse(1)
Line 1329: end select
Line 1330: end if
Line 1331: end if
Line 1332:
Line 1333: Catch e as System.Exception
Line 1334: strRetPage = "Error: " + e.Message
Line 1335: Finally
Line 1336: s.close
Line 1337: s = nothing
Line 1338: end try
Line 1339: GetPageThroughSocks4 = strRetPage
Line 1340: end Function
Line 1341:
Line 1342: Function GetPageThroughSocks_DLL(url As String, socks as String, port as string, level as string)
Line 1343: Dim timeout = Application("timeout")
Line 1344: Dim agent as string = "Mozilla/4.0 (compatible; MSIE 6.0 AtomInterSoft.com)"
Line 1345: Try
Line 1346: dim objAiS = Server.CreateObject("AiSSimpleSocksFunction.GetPageThroughSocks")
Line 1347: if level = "5"
Line 1348: GetPageThroughSocks_DLL = objAiS.Get(URL, socks, port, "5", agent, timeout)
Line 1349: else
Line 1350: GetPageThroughSocks_DLL = objAiS.Get(URL, socks, port, "4", agent, timeout)
Line 1351: end if
Line 1352: objAiS = nothing
Line 1353: Catch E As Exception
Line 1354: GetPageThroughSocks_DLL = "Error: " & e.message
Line 1355: End Try
Line 1356: End Function
Line 1357:
Line 1358:
Line 1359: public function SocksIpPresentInDB ( strIP ) ' �������� ������� �� �� ����� � �� - ���� ���� �� �� , ��� - 0 20 ��� 2003
Line 1360: SocksIpPresentInDB = ExecSP ( "SocksIdbyIP '" & strIP & "'")
Line 1361: end function
Line 1362:
Line 1363:
Line 1364: public function ExecSPSeparate ( strSQL ) ' ���������� �������� ��������� - ��������� ������ ����������� ��� - select '������������������' as Result - ��� ����� ������� ����� ��� ���������� �� aspx
Line 1365: Dim result as string
Line 1366: Dim myReader As SqlDataReader
Line 1367: Dim myConnection As New SqlConnection(Application("AliveProxyConnectionStrASPX"))
Line 1368: Dim myCommand As New SqlCommand(strSql, myConnection)
Line 1369: try
Line 1370: myConnection.Open()
Line 1371:
Line 1372: myReader = myCommand.ExecuteReader()
Line 1373: try
Line 1374: do while myReader.read()
Line 1375: result += myReader("result")
Line 1376: myReader.NextResult()
Line 1377: loop
Line 1378: Catch e as System.Exception
Line 1379: result = e.ToString()
Line 1380: Finally
Line 1381: myReader.Close()
Line 1382: myConnection.Close()
Line 1383: end try
Line 1384:
Line 1385: Catch e as System.Exception
Line 1386: result = e.ToString()
Line 1387: Finally
Line 1388: end try
Line 1389:
Line 1390: ExecSPSeparate = result
Line 1391: end function
Line 1392:
Line 1393:
Line 1394: public function ExecSP ( strSQL ) ' ���������� �������� ��������� - ��������� ������ ����������� ��� - select '������������������' as Result - ��� ����� ������� ����� ��� ���������� �� aspx
Line 1395: try
Line 1396: Dim Conn As New SqlConnection(Application("AliveProxyConnectionStrASPX"))
Line 1397: Dim CMD As SqlCommand = New SqlCommand(strSQL, Conn)
Line 1398:
Line 1399: Conn.Open()
Line 1400: Dim Reader As SqlDataReader = CMD.ExecuteReader()
Line 1401: Reader.Read()
Line 1402: ExecSP = Reader("result")
Line 1403:
Line 1404: Reader.Close
Line 1405: Conn.Close
Line 1406: Catch E As Exception
Line 1407: ExecSP = "Error in ExecSP: " & e.message
Line 1408: End Try
Line 1409: end function
Line 1410:
Line 1411: public function CountHits (strIP)' ���������� �������� ��������� - ��������� ������ ����������� ��� - select '������������������' as Result - ��� ����� ������� ����� ��� ���������� �� aspx
Line 1412: try
Line 1413: Dim Conn As New SqlConnection(Application("IP-CHECK-CONNECTION"))
Line 1414: Dim CMD As SqlCommand = New SqlCommand("exec IPHits '" & strIP & "'", Conn)
Line 1415:
Line 1416: Conn.Open()
Line 1417: Dim Reader As SqlDataReader = CMD.ExecuteReader()
Line 1418: Reader.Read()
Line 1419: CountHits = Reader("result")
Line 1420:
Line 1421: Reader.Close
Line 1422: Conn.Close
Line 1423: Catch E As Exception
Line 1424: CountHits = -1
Line 1425: End Try
Line 1426: end function
Line 1427:
Line 1428:
Line 1429:
Line 1430: public function ExecSPIntOut ( strSQL )
Line 1431: Dim Conn As New SqlConnection(Application("AliveProxyConnectionStrASPX"))
Line 1432: Dim CMD As SqlCommand = New SqlCommand(strSQL, Conn)
Line 1433: 'CMD.CommandType = CommandType.StoredProcedure
Line 1434:
Line 1435: Dim Parm As SqlParameter
Line 1436: 'Parm = CMD.Parameters.Add("@IP", SqlDbType.NVarChar, 50)
Line 1437: 'Parm.Value = "1.1.1.1"
Line 1438:
Line 1439: 'Parm = CMD.Parameters.Add("@PORT", SqlDbType.NVarChar, 50)
Line 1440: 'Parm.Value = "1111"
Line 1441:
Line 1442: Parm = CMD.Parameters.Add("@iRes", SqlDbType.Int)
Line 1443: Parm.Direction = ParameterDirection.Output
Line 1444:
Line 1445: Conn.Open()
Line 1446:
Line 1447: Dim Reader As SqlDataReader = CMD.ExecuteReader()
Line 1448:
Line 1449: Reader.Read()
Line 1450: response.write(CMD.Parameters("@iRes").Value)
Line 1451: Reader.close
Line 1452: Conn.Close
Line 1453: ExecSPIntOut = 1
Line 1454: end function
Line 1455:
Line 1456:
Line 1457: Public Sub CreateMySqlCommand(myExecuteQuery As String, myConnectionString As String)
Line 1458: try
Line 1459: Dim myConnection As New SqlConnection(myConnectionString)
Line 1460: Dim myCommand As New SqlCommand(myExecuteQuery, myConnection)
Line 1461: myCommand.Connection.Open()
Line 1462: myCommand.ExecuteNonQuery()
Line 1463: MyConnection.Close()
Line 1464: Catch E As Exception
Line 1465:
Line 1466: End Try
Line 1467: End Sub
Line 1468:
Line 1469: public sub ExecSQLCmd(sql, ConnStr)
Line 1470: try
Line 1471: Dim myConnection As New SqlConnection(ConnStr)
Line 1472: Dim myCommand As New SqlCommand(sql, myConnection)
Line 1473: myConnection.Open()
Line 1474: myCommand.ExecuteNonQuery()
Line 1475: MyConnection.Close()
Line 1476: Catch E As Exception
Line 1477:
Line 1478: End Try
Line 1479: end sub
Line 1480:
Line 1481: public sub ExecSQLCommand(sql)
Line 1482: try
Line 1483: Dim myConnection As New SqlConnection(Application("AliveProxyConnectionStrASPX"))
Line 1484: Dim myCommand As New SqlCommand(sql, myConnection)
Line 1485: myConnection.Open()
Line 1486: myCommand.ExecuteNonQuery()
Line 1487: MyConnection.Close()
Line 1488: Catch E As Exception
Line 1489: response.write(e.ToString())
Line 1490: End Try
Line 1491: end sub
Line 1492:
Line 1493:
Line 1494: public sub DnsResolve1(address, ByRef HostName, ByRef HostIP )
Line 1495: try
Line 1496: Dim HostInfo as IPHostEntry = Dns.Resolve(address)
Line 1497: hostname = HostInfo.HostName
Line 1498: dim IPList As IPAddress = HostInfo.AddressList(0)
Line 1499: HostIP = ipList.Tostring
Line 1500: if HostIP = HostName then ' �� � ��� ��������� - ��� ����� ������ ��� ����� � ���..
Line 1501: HostName = "Name unavailable"
Line 1502: end if
Line 1503: Catch e as System.Exception
Line 1504: HostName = e.ToString()
Line 1505: end try
Line 1506: end sub
Line 1507:
Line 1508: Public Function ViewOrdersClick(iProduct, sIp) ' ���������� ����� � ������
Line 1509:
Line 1510: dim result as string = "", strHostName, strHostIP
Line 1511: Dim ConnectionString = Application("AliveProxyConnectionStrASPX")
Line 1512: dim razdelitel = chr(10)
Line 1513:
Line 1514: Dim mySelectQuery As String = "exec ViewOrders " & iProduct & ", '" & sIp & "'"
Line 1515: Dim myConnection As New SqlConnection(ConnectionString)
Line 1516: Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
Line 1517: myConnection.Open()
Line 1518: Dim myReader As SqlDataReader = myCommand.ExecuteReader()
Line 1519: try
Line 1520: do while myReader.Read()
Line 1521: result += myReader("strResult")
Line 1522: loop
Line 1523: Catch e as System.Exception
Line 1524: result = e.ToString()
Line 1525: Finally
Line 1526: myReader.Close()
Line 1527: myConnection.Close()
Line 1528: end try
Line 1529:
Line 1530: if result > "" then
Line 1531: call DnsResolve1( sIp, strHostName, strHostIP )
Line 1532: result = "Host IP: " & strHostIP & " Name: " & strHostName & _
Line 1533: " " & FindProxyOnIP(sIp) & razdelitel & razdelitel & result & razdelitel
Line 1534: result = result & WhoisByIpNew(sIp)
Line 1535: end if
Line 1536:
Line 1537: ViewOrdersClick = result
Line 1538: end function
Line 1539:
Line 1540: Public Function FindProxyOnIP(ip)
Line 1541: Dim ConnectionString = Application("AliveProxyConnectionStrASPX"), alltext
Line 1542:
Line 1543: Dim mySelectQuery As String = "exec ProxyOnIP '" & ip & "'"
Line 1544: Dim myConnection As New SqlConnection(ConnectionString)
Line 1545: Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
Line 1546: myConnection.Open()
Line 1547: Dim myReader As SqlDataReader = myCommand.ExecuteReader()
Line 1548: try
Line 1549: myReader.Read()
Line 1550: AllText += myReader("strResult")
Line 1551: Catch e as System.Exception
Line 1552: alltext = e.ToString()
Line 1553: Finally
Line 1554: myReader.Close()
Line 1555: myConnection.Close()
Line 1556: end try
Line 1557:
Line 1558: FindProxyOnIP = alltext
Line 1559: end function
Line 1560:
Line 1561:
Line 1562: Public Function ReadStringFromFile1(filename) ' ���������� ����� � ������
Line 1563: Dim input As TextReader = File.OpenText(filename)
Line 1564: ReadStringFromFile1 = input.ReadToEnd()
Line 1565: input.Close()
Line 1566: end function
Line 1567:
Line 1568: function ReadStringFromFile(filename)
Line 1569: 'on error resume next
Line 1570: dim fn = Application("ProtectedCatalog") + filename
Line 1571: dim fs = Server.CreateObject("Scripting.FileSystemObject")
Line 1572: dim txtfile = fs.OpenTextFile(fn)
Line 1573: ReadStringFromFile = txtfile.readall
Line 1574: txtfile = nothing
Line 1575: fs = nothing
Line 1576: end function
Line 1577:
Line 1578: Public sub GrabProxyFromUrlOld(ByRef SiteUrl)
Line 1579: Dim ConnStr = Application("AliveProxyConnectionStrASPX")
Line 1580: dim text as string
Line 1581: ' text = GetUrl(SiteUrl)
Line 1582: text = GetPageThroughProxy(SiteUrl, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 1583: 'text = ReadStringFromFile("1.txt")
Line 1584: 'Response.Write(text & "<br><br><br><br>")
Line 1585:
Line 1586: dim i = 1, added = 0, FoundCnt = 0, TextProxy = "", lenstr = len(text), source = text, w
Line 1587: dim pos, ip, port, swhere, ssql, countall, countrecnew, countrec, proxyType, sqltext
Line 1588:
Line 1589: do while i <= lenstr
Line 1590: w = ""
Line 1591: do while (i <= lenstr) and (InStr("0123456789:.", Mid(Source,i,1)) <= 0)
Line 1592: i = i + 1
Line 1593: loop
Line 1594: do while (i <= lenstr) and (InStr("0123456789:.", Mid(Source,i,1)) > 0)
Line 1595: w = w + Mid(Source,i,1)
Line 1596: i = i + 1
Line 1597: loop
Line 1598: if (len(w) > 9) and (InStr(w,":") > 0) and (InStr(w,".") > 0) then ' ��� ����� ������...
Line 1599: FoundCnt = FoundCnt +1
Line 1600: pos = InStr(w,":")
Line 1601: ip = left(w,pos-1)
Line 1602: port = right(w,len(w)-pos )
Line 1603: ' Response.Write(ip & ":" & port & "<br>")
Line 1604: ' proxyType = "Transparent"
Line 1605: countrecnew += ExecSP("exec AddProxyIntoProxyNewTable '" & IP & "', '" & Port & "'")
Line 1606: end if
Line 1607: loop
Line 1608:
Line 1609: call AddStringIntoFile("GrabProxyLog.logx", chr(10) & now() & " URL - "& SiteUrl & " Count find - "& FoundCnt & " Found new count - " & countRecNew )
Line 1610: end sub
Line 1611:
Line 1612: Public sub GrabSocksFromUrl(ByRef SiteUrl)
Line 1613: dim strHost, strHostIP
Line 1614: dim start = timer
Line 1615: Dim ConnStr = Application("AliveProxyConnectionStrASPX")
Line 1616: dim text as string
Line 1617: text = GetPageThroughProxy(SiteUrl, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 1618: 'text = ReadStringFromFile("s1.txt")
Line 1619: response.write("l:" & len(text))
Line 1620: text = Regex.Replace(text , "<[^>]*>", " ")
Line 1621:
Line 1622: dim countall, countrecnew
Line 1623:
Line 1624: Dim Mc As MatchCollection = Regex.Matches(text, "([A-Za-z0-9_\-]+\.){1,}(\w+)") ' Dim Mc As MatchCollection = Regex.Matches(text, "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")
Line 1625: Dim Mc1, M As Match
Line 1626:
Line 1627: If Mc.Count > 0
Line 1628: For Each M In Mc
Line 1629: Mc1 = regex.match(mid(text, instr(text, m.value)+len(m.value)), "\d{2,5}")
Line 1630: if mc1.value > "" then ' ����� ����� ������
Line 1631: strHostIP = m.Value
Line 1632: ' call GetIPHost(strHost, strHostIP)
Line 1633: countall += 1
Line 1634: countrecnew += ExecSP("exec AddSocksIntoSocksNewTable '" & strHostIP & "', '" & mc1.value & "'")
Line 1635: end if
Line 1636: Next
Line 1637: Else
Line 1638: countall = 0
Line 1639: countrecnew = 0
Line 1640: End If
Line 1641:
Line 1642:
Line 1643: Response.Write(" (" & countRecNew & "/" & CountAll & ") " & cdbl(timer-start))
Line 1644:
Line 1645: call AddStringIntoFile("GrabSocksLog.logx", chr(10) & now() & " URL - "& SiteUrl & " Count find - "& CountAll & " Found new count - " & countRecNew )
Line 1646:
Line 1647: end sub
Line 1648:
Line 1649: Public sub GrabProxyFromUrl(ByRef SiteUrl)
Line 1650: dim strHost, strHostIP
Line 1651: dim start = timer
Line 1652: Dim ConnStr = Application("AliveProxyConnectionStrASPX")
Line 1653: dim text as string
Line 1654: text = GetPageThroughProxy(SiteUrl, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 1655: response.write("l:" & len(text))
Line 1656: text = Regex.Replace(text , "<[^>]*>", " ")
Line 1657: 'response.write(text)
Line 1658: 'text = ReadStringFromFile("2.txt")
Line 1659:
Line 1660: dim countall, countrecnew
Line 1661:
Line 1662: Dim Mc As MatchCollection = Regex.Matches(text, "([A-Za-z0-9_\-]+\.){1,}(\w+)")
Line 1663: Dim Mc1, M As Match
Line 1664: dim resSP
Line 1665:
Line 1666: If Mc.Count > 0
Line 1667: For Each M In Mc
Line 1668: Mc1 = regex.match(mid(text, instr(text, m.value)+len(m.value)), "\d{2,5}")
Line 1669: if mc1.value > "" then ' ����� ������ ������
Line 1670: strHostIP = m.Value
Line 1671: ' call GetIPHost(strHost, strHostIP)
Line 1672: countall += 1
Line 1673: try
Line 1674: resSP = ExecSP("exec AddProxyIntoProxyNewTable '" & strHostIP & "', '" & mc1.value & "'")
Line 1675: countrecnew += resSP
Line 1676: Catch E As Exception
Line 1677: response.write(strHostIP & ":" & mc1.value & " Error: " & e.message & " " & resSP)
Line 1678: End Try
Line 1679: end if
Line 1680: Next
Line 1681: Else
Line 1682: countall = 0
Line 1683: countrecnew = 0
Line 1684: End If
Line 1685:
Line 1686: Response.Write(" (" & countRecNew & "/" & CountAll & ") " & cdbl(timer-start))
Line 1687:
Line 1688: ' call AddStringIntoFile("GrabProxyLog.logx", chr(10) & now() & " URL - "& SiteUrl & " Count find - "& CountAll & " Found new count - " & countRecNew )
Line 1689:
Line 1690: end sub
Line 1691:
Line 1692:
Line 1693: Public sub ExtractUrl(ByRef Url)
Line 1694: Dim ConnStr = Application("AliveProxyConnectionStrASPX")
Line 1695: dim text as string
Line 1696: dim strDocument, strSite, tmpUrl
Line 1697:
Line 1698: 'text = GetPageThroughProxy(Url, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 1699: text = GetUrl(Url)
Line 1700:
Line 1701: tmpUrl = regex.replace(Url, "http://", "", RegexOptions.IgnoreCase) ' http:// ������
Line 1702: dim mSite as Match = regex.match(tmpUrl, "(.+?)(/)", RegexOptions.IgnoreCase)
Line 1703: strSite = mSite.value
Line 1704: if strSite = "" then
Line 1705: strSite = tmpUrl
Line 1706: else
Line 1707: strDocument = regex.replace(tmpUrl, strSite, "", RegexOptions.IgnoreCase) ' http:// ������
Line 1708: end if
Line 1709:
Line 1710: ' response.write("Site: " & strSite & " Document: " & strDocument & "<br>")
Line 1711:
Line 1712: dim countall, countrecnew
Line 1713: dim tref, referer, description, alltext
Line 1714: 'text = Regex.Replace(text , "\x22|\x27|x0d\x0a", " ")
Line 1715: 'text = Regex.Replace(text , " {2,}", " ")
Line 1716: text = Regex.Replace(text , "\x0d|\x0a|<img(.*?)>|<(.*?)mailto(.*?)>", " ", RegexOptions.IgnoreCase) '<script(.*?)script>|
Line 1717: call AddStringIntoFile("url.temp", text )
Line 1718:
Line 1719: Dim Mc As MatchCollection = Regex.Matches(text, "<a(.*?)a>", RegexOptions.IgnoreCase) ' ������� ��� ������
Line 1720:
Line 1721:
Line 1722: Dim Mc1, M, mReferer, mDescription As Match
Line 1723: response.write( "Count links in document<strong> " & Url & ": " & Mc.Count & "</strong><br>")
Line 1724:
Line 1725: If Mc.Count > 0
Line 1726: AllText += "<TABLE border=1 cellSpacing=1 width=100%><TR valign=top align=center bgcolor=#7098bd>"
Line 1727: AllText += "<TD><strong><font color=#ffffff>Referer</strong></TD>"
Line 1728: AllText += "<TD><strong><font color=#ffffff>Description</strong></TD>"
Line 1729: AllText += "<TD><strong><font color=#ffffff>Extract URL from this referer</strong></TD>"
Line 1730: AllText += "<TD><strong><font color=#ffffff>Extract proxy from this referer</strong></TD></TR>"
Line 1731:
Line 1732: For Each M In Mc
Line 1733: ' response.write(m.Value & "<br>")
Line 1734:
Line 1735: call AddStringIntoFile("url.temp", "" )
Line 1736: call AddStringIntoFile("url.temp", m.Value )
Line 1737: call AddStringIntoFile("url.temp1", m.Value )
Line 1738:
Line 1739: tref = Regex.Replace(m.Value , "(.*?)href(.*?)=\W*|<(.*?)/(.*?)a(.*?)>|'|\x22", "", RegexOptions.IgnoreCase) ' \x22 = "
Line 1740: ' response.write("tref: " & tref & " ")
Line 1741: call AddStringIntoFile("url.temp", tref )
Line 1742:
Line 1743: mReferer = regex.match(tRef, "(.*)/(S*)>")
Line 1744: referer = Regex.Replace(mReferer.value, "/(S*)>", "", RegexOptions.IgnoreCase)
Line 1745: if InStr(referer,"://") = 0 then ' ��� ��� �� ����(��������� ������) - ������� ��� �������
Line 1746: referer = "http://" & strSite & referer
Line 1747: end if
Line 1748:
Line 1749: mDescription = regex.match(tRef, ">(.*)")
Line 1750: description = Regex.Replace(mDescription.value, ">", "")
Line 1751:
Line 1752: 'response.write("Referer: " & referer & " Description: " & description & "<br><br>")
Line 1753: AllText += "<tr><td align=left>" & referer & "</td>"
Line 1754: AllText += "<td align=left>" & description & "</td>"
Line 1755: AllText += "<td align=left><a href=?u="
Line 1756: AllText += referer & ">Extract URL</a></td>"
Line 1757: AllText += "<td align=left><a href=../proxyextractor/?u="
Line 1758: AllText += referer & ">Extract proxy</a></td></tr>"
Line 1759: Next
Line 1760: alltext = alltext & "</TABLE>"
Line 1761: Else
Line 1762: countall = 0
Line 1763: countrecnew = 0
Line 1764: End If
Line 1765:
Line 1766:
Line 1767: ' Response.Write(countRecNew & "/" & CountAll & "<br>")
Line 1768: Response.Write(alltext)
Line 1769:
Line 1770: call AddStringIntoFile("GrabProxyLog.logx", chr(10) & now() & " URL - "& Url & " Count find - "& CountAll & " Found new count - " & countRecNew )
Line 1771:
Line 1772: end sub
Line 1773:
Line 1774: Public Sub AddStringIntoFile(filename as String, instr as String) ' ������ ������ � ��������� �������
Line 1775: dim fn = Application("ProtectedCatalog") + filename
Line 1776:
Line 1777: Dim w As StreamWriter = File.AppendText(fn)
Line 1778: w.WriteLine(instr)
Line 1779: w.Flush()
Line 1780: w.close()
Line 1781: w = nothing
Line 1782: end sub
Line 1783:
Line 1784: sub WriteStringIntoFile(filename,instr) ' ������ ������ � ���� � ��������� ����������� ����������
Line 1785: dim fn = Application("ProtectedCatalog") + filename
Line 1786: file.delete(fn)
Line 1787: Dim w As StreamWriter = File.AppendText(fn)
Line 1788: w.WriteLine(instr)
Line 1789: w.Flush()
Line 1790: w.close()
Line 1791: w = nothing
Line 1792: end sub
Line 1793:
Line 1794: sub WriteStringIntoFileAbs(filename,instr) ' ������ ������ � ���� � ��������� ����������� ����������
Line 1795: dim fn = filename
Line 1796: file.delete(fn)
Line 1797: Dim w As StreamWriter = File.AppendText(fn)
Line 1798: w.WriteLine(instr)
Line 1799: w.Flush()
Line 1800: w.close()
Line 1801: w = nothing
Line 1802: end sub
Line 1803:
Line 1804: Public function CutFromStringNum(strSource, strStart, count_char) '���������� �� ������ - �� ����� ����� ������� �� ��������...
Line 1805: dim pos_start = instr(strSource, strStart)
Line 1806: if pos_start > 0 then ' ��������� ���� - ������� ��...
Line 1807: CutFromStringNum = mid( strSource, pos_start + len( strStart) , count_char)
Line 1808: else
Line 1809: CutFromStringNum = ""
Line 1810: end if
Line 1811: end function
Line 1812:
Line 1813:
Line 1814: Public Function GetValidCountry(country)
Line 1815: Dim pc
Line 1816: GetValidCountry= ""
Line 1817: country= UCase(trim(country))
Line 1818: if (len(country)=2) then
Line 1819: pc= instr("AD AE AF AG AI AL AM AN AO AQ AR AS AT AU AW AZ BA BB BD BE BF BG BH BI BJ BM BN BO BR BS BT BV BW BY BZ CA CC CF CG CH CI CK CL CM CN CO CR CS CU CV CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR FX GA GB GD GE GF GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IN IO IQ IR IS IT JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NT NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR ST SU SV SY SZ TC TD TF TG TH TJ TK TM TN TO TP TR TT TV TW TZ UA UG UK UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT YU ZA ZM ZR ZW ",country & " ")
Line 1820: if (pc>0) then
Line 1821: GetValidCountry= country
Line 1822: end if
Line 1823: end if
Line 1824: end function
Line 1825:
Line 1826: Public Class CountryLookup
Line 1827:
Line 1828: Public _MemoryStream As MemoryStream
Line 1829:
Line 1830: Private Shared CountryBegin As Long = 16776960
Line 1831: Private Shared CountryName As String() = {"N/A", "Asia/Pacific Region", "Europe", "Andorra", "United Arab Emirates", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Netherlands Antilles", "Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Azerbaijan", "Bosnia and Herzegovina", "Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Bermuda", "Brunei Darussalam", "Bolivia", "Brazil", "Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Canada", "Cocos (Keeling) Islands", "Congo, The Democratic Republic of the", "Central African Republic", "Congo", "Switzerland", "Cote D'Ivoire", "Cook Islands", "Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cape Verde", "Christmas Island", "Cyprus", "Czech Republic", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican Republic", "Algeria", "Ecuador", "Estonia", "Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji", "Falkland Islands (Malvinas)", "Micronesia, Federated States of", "Faroe Islands", "France", "France, Metropolitan", "Gabon", "United Kingdom", "Grenada", "Georgia", "French Guiana", "Ghana", "Gibraltar", "Greenland", "Gambia", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands", "Guatemala", "Guam", "Guinea-Bissau", "Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras", "Croatia", "Haiti", "Hungary", "Indonesia", "Ireland", "Israel", "India", "British Indian Ocean Territory", "Iraq", "Iran, Islamic Republic of", "Iceland", "Italy", "Jamaica", "Jordan", "Japan", "Kenya", "Kyrgyzstan", "Cambodia", "Kiribati", "Comoros", "Saint Kitts and Nevis", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Cayman Islands", "Kazakstan", "Lao People's Democratic Republic", "Lebanon", "Saint Lucia", "Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania", "Luxembourg", "Latvia", "Libyan Arab Jamahiriya", "Morocco", "Monaco", "Moldova, Republic of", "Madagascar", "Marshall Islands", "Macedonia, the Former Yugoslav Republic of", "Mali", "Myanmar", "Mongolia", "Macau", "Northern Mariana Islands", "Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives", "Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia", "Niger", "Norfolk Island", "Nigeria", "Nicaragua", "Netherlands", "Norway", "Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia", "Papua New Guinea", "Philippines", "Pakistan", "Poland", "Saint Pierre and Miquelon", "Pitcairn", "Puerto Rico", "Palestinian Territory, Occupied", "Portugal", "Palau", "Paraguay", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saudi Arabia", "Solomon Islands", "Seychelles", "Sudan", "Sweden", "Singapore", "Saint Helena", "Slovenia", "Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal", "Somalia", "Suriname", "Sao Tome and Principe", "El Salvador", "Syrian Arab Republic", "Swaziland", "Turks and Caicos Islands", "Chad", "French Southern Territories", "Togo", "Thailand", "Tajikistan", "Tokelau", "Turkmenistan", "Tunisia", "Tonga", "East Timor", "Turkey", "Trinidad and Tobago", "Tuvalu", "Taiwan, Province of China", "Tanzania, United Republic of", "Ukraine", "Uganda", "United States Minor Outlying Islands", "United States", "Uruguay", "Uzbekistan", "Holy See (Vatican City State)", "Saint Vincent and the Grenadines", "Venezuela", "Virgin Islands, British", "Virgin Islands, U.S.", "Vietnam", "Vanuatu", "Wallis and Futuna", "Samoa", "Yemen", "Mayotte", "Yugoslavia", "South Africa", "Zambia", "Zaire", "Zimbabwe", "Anonymous Proxy", "Satellite Provider"}
Line 1832: Private Shared CountryCode As String() = {"--", "AP", "EU", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX", "GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TP", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "YU", "ZA", "ZM", "ZR", "ZW", "A1", "A2"}
Line 1833:
Line 1834: Public Sub New(ByVal ms As MemoryStream)
Line 1835:
Line 1836: _MemoryStream = ms
Line 1837:
Line 1838: End Sub
Line 1839:
Line 1840: Public Sub New(ByVal FileLocation As String)
Line 1841:
Line 1842: '------------------------------------------------------------------------------------------------
Line 1843: ' Load the passed in GeoIP Data file to the memorystream
Line 1844: '------------------------------------------------------------------------------------------------
Line 1845:
Line 1846: Dim _FileStream As New FileStream(FileLocation, FileMode.Open, FileAccess.Read)
Line 1847:
Line 1848: _MemoryStream = New MemoryStream()
Line 1849:
Line 1850: Dim _Byte(256) As Byte
Line 1851:
Line 1852: While _FileStream.Read(_Byte, 0, _Byte.Length) <> 0
Line 1853:
Line 1854: _MemoryStream.Write(_Byte, 0, _Byte.Length)
Line 1855:
Line 1856: End While
Line 1857:
Line 1858: _FileStream.Close()
Line 1859:
Line 1860: End Sub
Line 1861:
Line 1862: Private Function ConvertIPAddressToNumber(ByVal _IPAddress As IPAddress) As Long
Line 1863:
Line 1864: '------------------------------------------------------------------------------------------------
Line 1865: ' Convert an IP Address, (e.g. 127.0.0.1), to the numeric equivalent
Line 1866: '------------------------------------------------------------------------------------------------
Line 1867:
Line 1868: Dim _Address() As String = Split(_IPAddress.ToString, ".")
Line 1869:
Line 1870: If UBound(_Address) = 3 Then
Line 1871:
Line 1872: Return CDbl(16777216 * _Address(0) + 65536 * _Address(1) + 256 * _Address(2) + _Address(3))
Line 1873:
Line 1874: Else
Line 1875:
Line 1876: Return 0
Line 1877:
Line 1878: End If
Line 1879:
Line 1880: End Function
Line 1881:
Line 1882: Private Function ConvertIPNumberToAddress(ByVal _IPNumber As Long) As String
Line 1883:
Line 1884: '------------------------------------------------------------------------------------------------
Line 1885: ' Convert an IP Number to the IP Address equivalent
Line 1886: '------------------------------------------------------------------------------------------------
Line 1887:
Line 1888: Dim _IPNumberPart1 As String = CStr(Int(_IPNumber / 16777216) Mod 256)
Line 1889: Dim _IPNumberPart2 As String = CStr(Int(_IPNumber / 65536) Mod 256)
Line 1890: Dim _IPNumberPart3 As String = CStr(Int(_IPNumber / 256) Mod 256)
Line 1891: Dim _IPNumberPart4 As String = CStr(Int(_IPNumber) Mod 256)
Line 1892:
Line 1893: Return _IPNumberPart1 & "." & _IPNumberPart2 & "." & _IPNumberPart3 & "." & _IPNumberPart4
Line 1894:
Line 1895: End Function
Line 1896:
Line 1897: Public Shared Function FileToMemory(ByVal FileLocation As String) As MemoryStream
Line 1898:
Line 1899: '------------------------------------------------------------------------------------------------
Line 1900: ' Read a given file into a Memory Stream to return as the result
Line 1901: '------------------------------------------------------------------------------------------------
Line 1902:
Line 1903: Dim _FileStream As New FileStream(FileLocation, FileMode.Open, FileAccess.Read)
Line 1904: Dim _MemStream As New MemoryStream()
Line 1905:
Line 1906: Dim _Byte(256) As Byte
Line 1907:
Line 1908: While _FileStream.Read(_Byte, 0, _Byte.Length) <> 0
Line 1909:
Line 1910: _MemStream.Write(_Byte, 0, _Byte.Length)
Line 1911:
Line 1912: End While
Line 1913:
Line 1914: _FileStream.Close()
Line 1915:
Line 1916: Return _MemStream
Line 1917:
Line 1918: End Function
Line 1919:
Line 1920: Public Overloads Function LookupCountryCode(ByVal _IPAddress As IPAddress) As String
Line 1921:
Line 1922: '------------------------------------------------------------------------------------------------
Line 1923: ' Look up the country code, e.g. US, for the passed in IP Address
Line 1924: '------------------------------------------------------------------------------------------------
Line 1925:
Line 1926: Return CountryCode(CInt(SeekCountry(0, ConvertIPAddressToNumber(_IPAddress), 31)))
Line 1927:
Line 1928: End Function
Line 1929:
Line 1930: Public Overloads Function LookupCountryCode(ByVal _IPAddress As String) As String
Line 1931:
Line 1932: '------------------------------------------------------------------------------------------------
Line 1933: ' Look up the country code, e.g. US, for the passed in IP Address
Line 1934: '------------------------------------------------------------------------------------------------
Line 1935:
Line 1936: Dim _Address As IPAddress
Line 1937:
Line 1938: Try
Line 1939:
Line 1940: _Address = _Address.Parse(_IPAddress)
Line 1941:
Line 1942: Catch ex As FormatException
Line 1943:
Line 1944: Return "--"
Line 1945:
Line 1946: End Try
Line 1947:
Line 1948: Return LookupCountryCode(_Address)
Line 1949:
Line 1950: End Function
Line 1951:
Line 1952: Public Overloads Function LookupCountryName(ByVal addr As IPAddress) As String
Line 1953:
Line 1954: '------------------------------------------------------------------------------------------------
Line 1955: ' Look up the country name, e.g. United States, for the IP Address
Line 1956: '------------------------------------------------------------------------------------------------
Line 1957:
Line 1958: Return CountryName(CInt(SeekCountry(0, ConvertIPAddressToNumber(addr), 31)))
Line 1959:
Line 1960: End Function
Line 1961:
Line 1962: Public Overloads Function LookupCountryName(ByVal _IPAddress As String) As String
Line 1963:
Line 1964: '------------------------------------------------------------------------------------------------
Line 1965: ' Look up the country name, e.g. United States, for the IP Address
Line 1966: '------------------------------------------------------------------------------------------------
Line 1967:
Line 1968: Dim _Address As IPAddress
Line 1969:
Line 1970: Try
Line 1971:
Line 1972: _Address = IPAddress.Parse(_IPAddress)
Line 1973:
Line 1974: Catch e As FormatException
Line 1975:
Line 1976: Return "N/A"
Line 1977:
Line 1978: End Try
Line 1979:
Line 1980: Return LookupCountryName(_Address)
Line 1981:
Line 1982: End Function
Line 1983:
Line 1984: Private Function vbShiftLeft(ByVal Value As Long, _
Line 1985: ByVal Count As Integer) As Long
Line 1986:
Line 1987: '------------------------------------------------------------------------------------------------
Line 1988: ' Replacement for Bitwise operators which are missing in VB.NET,
Line 1989: ' these functions are present in .NET 1.1, but for developers
Line 1990: ' using 1.0, replacement functions must be implemented
Line 1991: '------------------------------------------------------------------------------------------------
Line 1992:
Line 1993: Dim _Iterator As Integer
Line 1994:
Line 1995: vbShiftLeft = Value
Line 1996:
Line 1997: For _Iterator = 1 To Count
Line 1998:
Line 1999: vbShiftLeft = vbShiftLeft * 2
Line 2000:
Line 2001: Next
Line 2002:
Line 2003: End Function
Line 2004:
Line 2005: Private Function vbShiftRight(ByVal Value As Long, _
Line 2006: ByVal Count As Integer) As Long
Line 2007:
Line 2008: '------------------------------------------------------------------------------------------------
Line 2009: ' Replacement for Bitwise operators which are missing in VB.NET,
Line 2010: ' these functions are present in .NET 1.1, but for developers
Line 2011: ' using 1.0, replacement functions must be implemented
Line 2012: '------------------------------------------------------------------------------------------------
Line 2013:
Line 2014: Dim _Iterator As Integer
Line 2015:
Line 2016: vbShiftRight = Value
Line 2017:
Line 2018: For _Iterator = 1 To Count
Line 2019:
Line 2020: vbShiftRight = vbShiftRight \ 2
Line 2021:
Line 2022: Next
Line 2023:
Line 2024: End Function
Line 2025:
Line 2026: Private Function SeekCountry(ByVal StartOffset As Long, _
Line 2027: ByVal IPNumber As Long, _
Line 2028: ByVal SearchDepth As Integer) As Long
Line 2029:
Line 2030: '------------------------------------------------------------------------------------------------
Line 2031: ' Seek the country position from the GeoIP data in the memory stream
Line 2032: '------------------------------------------------------------------------------------------------
Line 2033:
Line 2034: Dim _Buffer(6) As Byte
Line 2035: Dim x(2) As Long
Line 2036:
Line 2037: If SearchDepth = 0 Then
Line 2038:
Line 2039: End If
Line 2040:
Line 2041: Try
Line 2042:
Line 2043: _MemoryStream.Seek(6 * StartOffset, 0)
Line 2044: _MemoryStream.Read(_Buffer, 0, 6)
Line 2045:
Line 2046: Catch ex As IOException
Line 2047:
Line 2048: End Try
Line 2049:
Line 2050: Dim _Iterator As Integer
Line 2051:
Line 2052: For _Iterator = 0 To 1
Line 2053:
Line 2054: x(_Iterator) = 0
Line 2055:
Line 2056: Dim j As Integer
Line 2057:
Line 2058: For j = 0 To 2
Line 2059:
Line 2060: Dim _Part As Integer = _Buffer((_Iterator * 3 + j))
Line 2061:
Line 2062: If _Part < 0 Then
Line 2063:
Line 2064: _Part += 256
Line 2065: End If
Line 2066:
Line 2067: x(_Iterator) += vbShiftLeft(_Part, (j * 8))
Line 2068:
Line 2069: Next j
Line 2070:
Line 2071: Next _Iterator
Line 2072:
Line 2073: If (IPNumber And vbShiftLeft(1, SearchDepth)) > 0 Then
Line 2074:
Line 2075: If x(1) >= CountryBegin Then
Line 2076:
Line 2077: Return x(1) - CountryBegin
Line 2078:
Line 2079: End If
Line 2080:
Line 2081: Return SeekCountry(x(1), IPNumber, SearchDepth - 1)
Line 2082:
Line 2083: Else
Line 2084:
Line 2085: If x(0) >= CountryBegin Then
Line 2086:
Line 2087: Return x(0) - CountryBegin
Line 2088:
Line 2089: End If
Line 2090:
Line 2091: Return SeekCountry(x(0), IPNumber, SearchDepth - 1)
Line 2092:
Line 2093: End If
Line 2094:
Line 2095: End Function
Line 2096:
Line 2097: End Class
Line 2098:
Line 2099: Public Function GetCountryByIp(hostname)
Line 2100: Dim geoip As CountryLookup = New CountryLookup("C:\AtomInterSoft\GeoIP\GeoIP.dat")
Line 2101: GetCountryByIp = geoip.LookupCountryCode(hostname)
Line 2102: end function
Line 2103:
Line 2104: 'Public Function GetCountryByIp2018(IP)
Line 2105: ' 'Dim geoip As CountryLookup = New CountryLookup("C:\AtomInterSoft\GeoIP\GeoIP.dat")
Line 2106: ' Dim TextResult = GetPageThroughProxy("http://89.208.212.2/phpwhois/ais.php?query=" & IP, "89.208.212.2", 80)
Line 2107: ' GetCountryByIp2018 = GetCountryByIP2018(IP) ' "SANS" 'geoip.LookupCountryCode(hostname)
Line 2108: 'end function
Line 2109:
Line 2110: Public Function WhoIsByIPNew2018(IP)
Line 2111: dim res = ""
Line 2112:
Line 2113: ' response.write(GetPage2018("http://www.whois.com/whois/" & IP))
Line 2114: 'response.write(GetPage2018("http://2whois.ru/?t=whois&data=" & IP))
Line 2115:
Line 2116:
Line 2117: res = GetPageThroughProxy("http://89.208.212.2/phpwhois/ais.php?query=" & IP, "89.208.212.2", 80)
Line 2118: if res = "" then
Line 2119: ' res = GetPageThroughProxy("https://www.whois.com/whois/" & IP, "89.208.212.2", 80)
Line 2120: ' res = GetPageThroughProxy("http://2whois.ru/?t=whois&data=" & IP, "89.208.212.2", 80)
Line 2121: ' res = GetPage2018("http://2whois.ru/?t=whois&data=" & IP)
Line 2122: end if
Line 2123:
Line 2124: WhoIsByIPNew2018 = res
Line 2125: end function
Line 2126:
Line 2127:
Line 2128: Public Function GetCountryByIP2018(pStrDomain)
Line 2129: Dim lStrURL
Line 2130: Dim lObjRegExp
Line 2131: Dim lStrLookUp, country, tcountry, pcountry
Line 2132: Dim pos_start
Line 2133:
Line 2134: pStrDomain= trim(pStrDomain)
Line 2135: If pStrDomain = "" Then Exit Function
Line 2136:
Line 2137: lStrLookUp = ""
Line 2138: country = ""
Line 2139:
Line 2140: lStrLookUp = WhoIsByIPNew2018(pStrDomain)
Line 2141: lStrLookUp = Regex.Replace(lStrLookUp, " ","")
Line 2142: 'response.write(lStrLookUp)
Line 2143:
Line 2144: tcountry = CutFromStringNum( lStrLookUp.ToLower,"country:",2)
Line 2145: if tcountry = "" then tcountry = CutFromStringNum( lStrLookUp.ToLower,"country:",1)
Line 2146: if tcountry = "" then tcountry = CutFromStringNum( lStrLookUp.ToLower,"country:",0)
Line 2147: 'response.write(tcountry)
Line 2148: if tcountry > "" then
Line 2149: country = tcountry
Line 2150: else '���� ��� ���� ��� �������
Line 2151: pos_start = instr(lStrLookUp, " Netname")
Line 2152: 'Response.Write "!!!"&pos_start&"!!!"
Line 2153: if pos_start > 0 then ' ��������� ���� - ������� ��...
Line 2154: tcountry = mid( lStrLookUp, pos_start , 2)
Line 2155: else
Line 2156: tcountry = ""
Line 2157: end if
Line 2158: end if
Line 2159: 'Response.Write "!!!"&tcountry&"!!!"
Line 2160: tcountry = GetValidCountry(tcountry.ToUpper)
Line 2161: if tcountry = "" then tcountry = "--"
Line 2162: GetCountryByIP2018 = tcountry
Line 2163: End Function
Line 2164:
Line 2165:
Line 2166: Public Sub GetCountryNameCodeByIp(byref hostname, byref countrycode, byref countryname)
Line 2167: Dim geoip As CountryLookup = New CountryLookup("C:\AtomInterSoft\GeoIP\GeoIP.dat")
Line 2168: countrycode = geoip.LookupCountryCode(hostname)
Line 2169: countryname = geoip.LookupCountryName(hostname)
Line 2170: end sub
Line 2171:
Line 2172:
Line 2173: Public Function GetCountryByIpOld(pStrDomain)
Line 2174: Dim lStrURL
Line 2175: Dim lObjRegExp
Line 2176: Dim lStrLookUp, country, tcountry, pcountry
Line 2177: Dim pos_start
Line 2178:
Line 2179: pStrDomain= trim(pStrDomain)
Line 2180: If pStrDomain = "" Then Exit Function
Line 2181:
Line 2182: lStrLookUp = ""
Line 2183: country = ""
Line 2184:
Line 2185: lStrLookUp = WhoIsByIPNew(pStrDomain)
Line 2186: lStrLookUp = Regex.Replace(lStrLookUp, " ","")
Line 2187: 'response.write(lStrLookUp)
Line 2188:
Line 2189: tcountry = CutFromStringNum( lStrLookUp.ToLower,"country:",2)
Line 2190: if tcountry = "" then tcountry = CutFromStringNum( lStrLookUp.ToLower,"country:",1)
Line 2191: if tcountry = "" then tcountry = CutFromStringNum( lStrLookUp.ToLower,"country:",0)
Line 2192: 'response.write(tcountry)
Line 2193: if tcountry > "" then
Line 2194: country = tcountry
Line 2195: else '���� ��� ���� ��� �������
Line 2196: pos_start = instr(lStrLookUp, " Netname")
Line 2197: 'Response.Write "!!!"&pos_start&"!!!"
Line 2198: if pos_start > 0 then ' ��������� ���� - ������� ��...
Line 2199: tcountry = mid( lStrLookUp, pos_start , 2)
Line 2200: else
Line 2201: tcountry = ""
Line 2202: end if
Line 2203: end if
Line 2204: 'Response.Write "!!!"&tcountry&"!!!"
Line 2205: tcountry = GetValidCountry(tcountry.ToUpper)
Line 2206: if tcountry = "" then tcountry = "--"
Line 2207: GetCountryByIpOLD = tcountry
Line 2208: End Function
Line 2209:
Line 2210: Function GetPageThroughProxy(url As String, proxy as String, port as integer)
Line 2211: call RefreshMainProxy
Line 2212: Dim timeout = Application("timeout")
Line 2213: Try
Line 2214: Dim proxyObject as WebProxy
Line 2215: Dim req As WebRequest
Line 2216: Dim result As WebResponse
Line 2217: Dim ReceiveStream As Stream
Line 2218: Dim encode As Encoding
Line 2219: Dim sr As StreamReader
Line 2220: Dim StrRes As String
Line 2221: StrRes = ""
Line 2222: proxyObject = new WebProxy(proxy, port)
Line 2223:
Line 2224: ' Disable Proxy use when the host is local i.e. without periods.
Line 2225: proxyObject.BypassProxyOnLocal = true
Line 2226:
Line 2227: ' Now actually take over the global with our new settings, all new requests
Line 2228: ' use this proxy info
Line 2229: GlobalProxySelection.Select = proxyObject
Line 2230:
Line 2231: req = WebRequest.Create(url)
Line 2232: req.timeout = timeout
Line 2233: result = req.GetResponse()
Line 2234: ReceiveStream = result.GetResponseStream()
Line 2235: encode = System.Text.Encoding.GetEncoding("utf-8")
Line 2236: sr = new StreamReader( ReceiveStream, encode )
Line 2237:
Line 2238: Dim read(256) As Char
Line 2239: Dim count As Integer = sr.Read( read, 0, 256 )
Line 2240:
Line 2241: Do While count > 0
Line 2242: Dim str As String = new String(read, 0, count)
Line 2243: StrRes = StrRes & str
Line 2244: count = sr.Read(read, 0, 256)
Line 2245: Loop
Line 2246: GetPageThroughProxy = StrRes
Line 2247: Catch E As Exception
Line 2248: GetPageThroughProxy = "Error: " & e.message
Line 2249: End Try
Line 2250: End Function
Line 2251:
Line 2252:
Line 2253:
Line 2254: Function GetPage2018(url As String)
Line 2255: Dim timeout = Application("timeout")
Line 2256: Try
Line 2257: Dim req As WebRequest
Line 2258: Dim result As WebResponse
Line 2259: Dim ReceiveStream As Stream
Line 2260: Dim encode As Encoding
Line 2261: Dim sr As StreamReader
Line 2262: Dim StrRes As String
Line 2263: StrRes = ""
Line 2264:
Line 2265: req = WebRequest.Create(url)
Line 2266: req.timeout = timeout
Line 2267: result = req.GetResponse()
Line 2268: ReceiveStream = result.GetResponseStream()
Line 2269: encode = System.Text.Encoding.GetEncoding("utf-8")
Line 2270: sr = new StreamReader( ReceiveStream, encode )
Line 2271:
Line 2272: Dim read(256) As Char
Line 2273: Dim count As Integer = sr.Read( read, 0, 256 )
Line 2274:
Line 2275: Do While count > 0
Line 2276: Dim str As String = new String(read, 0, count)
Line 2277: StrRes = StrRes & str
Line 2278: count = sr.Read(read, 0, 256)
Line 2279: Loop
Line 2280: GetPage2018 = StrRes
Line 2281: Catch E As Exception
Line 2282: GetPage2018 = "Error: " & e.message
Line 2283: End Try
Line 2284: End Function
Line 2285:
Line 2286:
Line 2287:
Line 2288: Public Function GetURL(ByRef pStrURL)
Line 2289: Dim timeout = Application("timeout")
Line 2290: Try
Line 2291: Dim req As WebRequest
Line 2292: Dim result As WebResponse
Line 2293: Dim ReceiveStream As Stream
Line 2294: Dim encode As Encoding
Line 2295: Dim sr As StreamReader
Line 2296: Dim StrRes As String
Line 2297: StrRes = ""
Line 2298:
Line 2299: req = WebRequest.Create(pStrURL)
Line 2300: req.timeout = timeout
Line 2301: result = req.GetResponse()
Line 2302: ReceiveStream = result.GetResponseStream()
Line 2303: encode = System.Text.Encoding.GetEncoding("utf-8")
Line 2304: sr = new StreamReader( ReceiveStream, encode )
Line 2305:
Line 2306: Dim read(256) As Char
Line 2307: Dim count As Integer = sr.Read( read, 0, 256 )
Line 2308:
Line 2309: Do While count > 0
Line 2310: Dim str As String = new String(read, 0, count)
Line 2311: StrRes = StrRes & str
Line 2312: count = sr.Read(read, 0, 256)
Line 2313: Loop
Line 2314: GetURL = StrRes
Line 2315: Catch E As Exception
Line 2316: GetURL = "Error: " & e.message
Line 2317: End Try
Line 2318: End Function
Line 2319:
Line 2320:
Line 2321: Public Function md5(Str as String)
Line 2322: md5 = GetURL("http://aliveproxy.com/md5/index.php?str=" & str)
Line 2323:
Line 2324: End Function
Line 2325:
Line 2326:
Line 2327: Public Function GetURL1(ByRef pStrURL)
Line 2328: Dim timeout = Application("timeout")
Line 2329: Try
Line 2330: Dim req As WebRequest
Line 2331: Dim result As WebResponse
Line 2332: Dim ReceiveStream As Stream
Line 2333: Dim encode As Encoding
Line 2334: Dim sr As StreamReader
Line 2335: Dim StrRes As String
Line 2336: StrRes = ""
Line 2337:
Line 2338: req = WebRequest.Create(pStrURL)
Line 2339: req.timeout = timeout
Line 2340: result = req.GetResponse()
Line 2341: ReceiveStream = result.GetResponseStream()
Line 2342: encode = System.Text.Encoding.GetEncoding("utf-8")
Line 2343: sr = new StreamReader( ReceiveStream, encode )
Line 2344:
Line 2345: Dim read(256) As Char
Line 2346: Dim count As Integer = sr.Read( read, 0, 256 )
Line 2347:
Line 2348: Do While count > 0
Line 2349: Dim str As String = new String(read, 0, count)
Line 2350: StrRes = StrRes & str
Line 2351: count = sr.Read(read, 0, 256)
Line 2352: Loop
Line 2353: GetURL1 = StrRes
Line 2354: Catch E As Exception
Line 2355: GetURL1 = "Error: " & e.message
Line 2356: End Try
Line 2357: End Function
Line 2358:
Line 2359: Public function CutFromString(strSource as string, strStart as string, strFinish as string)
Line 2360: dim pos_start as integer = instr(strSource, strStart)
Line 2361: dim pos_finish as integer = instr(strSource, strFinish)
Line 2362: if ((pos_start > 0) and (pos_finish > pos_start)) then ' ��������� ���� - ������� ��...
Line 2363: CutFromString = mid( strSource, pos_start + len( strStart) , pos_finish - pos_start - len(strStart))
Line 2364: else
Line 2365: CutFromString = ""
Line 2366: end if
Line 2367: end function
Line 2368:
Line 2369:
Line 2370: Public Function WhoisByIpNew(pStrDomain)
Line 2371: dim UrlSource
Line 2372: dim whois as string
Line 2373: whois = execSP("exec getWhois '%" & pStrDomain & "%'")
Line 2374: if whois > ""
Line 2375: whoisByIPNew = whois
Line 2376: else
Line 2377: call RefreshMainProxy
Line 2378: 'UrlSource = "http://www.webconnections.net/cgi-bin/whois.cgi?domain=" & Server.URLEncode(pStrDomain) & "&stripheader=1&quiet=1"
Line 2379: UrlSource = "http://www.uwhois.com/cgi/whois.cgi?user=default&query=" & Server.URLEncode(pStrDomain)
Line 2380: 'UrlSource = "http://www.dnsstuff.com/tools/whois.ch?ip=" & Server.URLEncode(pStrDomain)
Line 2381: dim ResStr = GetPageThroughProxy(UrlSource, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 2382: dim tWhois
Line 2383: tWhois = CutFromString(ResStr,"<pre>","</pre>")
Line 2384: ' response.write(tWhois)
Line 2385: ' remove HTML tags
Line 2386: tWhois = Regex.Replace(tWhois, "<[^>]*>", "")
Line 2387: WhoisByIpNew = tWhois
Line 2388: end if
Line 2389: End Function
Line 2390:
Line 2391: Public Function WhoisByIpNew01(pStrDomain)
Line 2392: dim UrlSource
Line 2393: 'UrlSource = "http://www.webconnections.net/cgi-bin/whois.cgi?domain=" & Server.URLEncode(pStrDomain) & "&stripheader=1&quiet=1"
Line 2394: 'UrlSource = "http://www.uwhois.com/cgi/whois.cgi?user=default&query=" & Server.URLEncode(pStrDomain)
Line 2395: UrlSource = "http://www.dnsstuff.com/tools/whois.ch?ip=" & Server.URLEncode(pStrDomain)
Line 2396: dim ResStr = GetPageThroughProxy(UrlSource, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 2397: dim tWhois = CutFromString(ResStr,"<pre>","</pre>")
Line 2398: response.write(tWhois)
Line 2399: ' remove HTML tags
Line 2400: tWhois = Regex.Replace(ResStr, "<[^>]*>", "")
Line 2401: tWhois = regex.replace(tWhois, "(.*?)results\x29\x2e", "///\\\", RegexOptions.Multiline)
Line 2402: tWhois = regex.replace(tWhois, """", "'", RegexOptions.Multiline)
Line 2403: tWhois = regex.replace(tWhois, "status = 'Done!'", "\\\///", RegexOptions.Multiline)
Line 2404: tWhois = CutFromString(tWhois,"///\\\","\\\///")
Line 2405:
Line 2406: if tWhois = "!!!"
Line 2407: UrlSource = "http://www.webconnections.net/cgi-bin/whois.cgi?domain=" & Server.URLEncode(pStrDomain) & "&stripheader=1&quiet=1"
Line 2408: ResStr = GetPageThroughProxy(UrlSource, Application("MainProxyAddress"), Application("MainProxyPort") )
Line 2409: tWhois = CutFromString(ResStr,"<pre>","</pre>")
Line 2410: 'response.write(tWhois)
Line 2411: ' remove HTML tags
Line 2412: tWhois = Regex.Replace(ResStr, "<[^>]*>", "")
Line 2413: end if
Line 2414:
Line 2415: WhoisByIpNew01 = tWhois
Line 2416:
Line 2417: End Function
Line 2418:
Line 2419: Public Function Traceroute(pStrDomain, URL, CropAfter, CropBefore)
Line 2420:
Line 2421: Dim lStrURL
Line 2422: Dim lObjRegExp
Line 2423: Dim lStrLookUp
Line 2424:
Line 2425: If pStrDomain = "" Then Exit Function
Line 2426:
Line 2427: lStrLookUp = ""
Line 2428:
Line 2429: lStrLookUp = GetURL(URL & Server.URLEncode(pStrDomain))
Line 2430:
Line 2431: Dim lLngStart
Line 2432: Dim lLngEnd
Line 2433:
Line 2434: If Not(CropAfter = "" Or CropBefore = "") Then
Line 2435: lLngStart = InStr(1, lStrLookUp, CropAfter, vbTextCompare)
Line 2436: If lLngStart = 0 Then
Line 2437: lStrLookUp = ""
Line 2438: Else
Line 2439: lLngStart = lLngStart + Len(CropAfter) + 1
Line 2440: lLngEnd = InStr(lLngStart, lStrLookUp, CropBefore, vbTextCompare)
Line 2441: If lLngEnd = 0 Then
Line 2442: lStrLookUp = ""
Line 2443: Else
Line 2444: lLngEnd = lLngEnd - lLngStart
Line 2445: lStrLookUp = Mid(lStrLookUp, lLngStart, lLngEnd)
Line 2446: End If
Line 2447: End If
Line 2448: End If
Line 2449:
Line 2450: ' remove HTML tags
Line 2451: lStrLookUp = Regex.Replace(lStrLookUp, "<[^>]*>","")
Line 2452:
Line 2453: Traceroute = lStrLookUp
Line 2454:
Line 2455: End Function
Line 2456:
Line 2457:
Line 2458: function ProxyFindByIP(IP as string) ' ����� ���� � ���� � ������� ������ �� ������ IP
Line 2459: Dim start = timer
Line 2460: Dim myConnectionString As String = Application("AliveProxyConnectionStrASPX")
Line 2461: ' Dim myConnection As SqlConnection = New SqlConnection(myConnectionString)
Line 2462: Dim myConnection As SqlConnection = New SqlConnection(myConnectionString)
Line 2463: myConnection.Open()
Line 2464:
Line 2465: Dim mySelect As String = "select ip, (ip+':'+port) as aport, port, type, lastcheck, country, name, goodcheck, allcheck from proxylist where ip like '" & IP & "'"
Line 2466: ' Dim myCommand As SqlCommand= New SqlCommand(mySelect, myConnection)
Line 2467: Dim myCommand As SqlCommand= New SqlCommand(mySelect, myConnection)
Line 2468: ' dim myReader As SqlDataReader = myCommand.ExecuteReader()
Line 2469: dim myReader As SqlDataReader = myCommand.ExecuteReader()
Line 2470:
Line 2471: dim alltext = "", l__ip = "", recdisplay = 50, cnt = 1, sss = 1, uptime = 0
Line 2472:
Line 2473: AllText = alltext & "<TABLE border=0 cellSpacing=1 width=700><TR valign=top align=center bgcolor=#7098bd><TD><strong><font color=#ffffff>#</strong></TD><TD><strong><font color=#ffffff>IP:Port</strong><TD><strong><font color=#ffffff>Name<br>host</strong></TD></TD><TD><strong><font color=#ffffff>Proxy type</TD><TD><strong><font color=#ffffff>Last check<br><font size=1>(GMT-05:00)</font></TD><TD><strong><font color=#ffffff>%<BR>Uptime</font></TD><TD><strong><font color=#ffffff>Hosting<br>country</font></TD><TD><strong><font color=#ffffff>Check<br>now</TD><TD><strong><font color=#ffffff>Whois</TD><TD><strong><font color=#ffffff>Smart<br>traceroute</TD></TR>"
Line 2474:
Line 2475:
Line 2476: for cnt=1 to recdisplay
Line 2477: if not myReader.Read() then
Line 2478: Exit For
Line 2479: end if
Line 2480:
Line 2481: uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 2482: l__ip= myReader("ip")
Line 2483: AllText = AllText & "<tr valign=top><td>" & cnt & " </td><td>"
Line 2484: AllText = AllText & myReader("aport") & "</td><td>"
Line 2485: AllText = AllText & myReader("name") & "</td><td align=center>"
Line 2486: AllText = AllText & myReader("type") & "</td><td align=center>"
Line 2487: AllText = AllText & myReader("lastcheck") & "</td><td align=center>"
Line 2488: ' AllText = AllText & myReader("speed") & "</td><td align=center>"
Line 2489: AllText = AllText & uptime & "</td>"
Line 2490: AllText = AllText & "<td align=right>" & myReader("country") & "</td>"
Line 2491: AllText = AllText & "<td align=right><a href=../online-proxy-checker/?i="
Line 2492: AllText = AllText & myReader("IP") & "&p="& myReader("port") & " target=_blank> check </a></td><td align=right><a href=../whois/?i="
Line 2493: AllText = AllText & l__ip & " target=_blank> whois </a></td><td align=right><a href=../smart-traceroute/?i="
Line 2494: AllText = AllText & l__ip & " target=_blank> traceroute </a></td></tr>"
Line 2495: next
Line 2496: alltext = alltext & "</TABLE>"
Line 2497: alltext = alltext & "<center>Time of search - " & cdbl((timer-start)) & " second</center>"
Line 2498:
Line 2499:
Line 2500: myConnection.Close()
Line 2501: myReader.Close()
Line 2502: ProxyFindByIP = alltext
Line 2503: end function
Line 2504:
Line 2505:
Line 2506: public function GetIdInsert(tableName as string, ConnStr as string) as Integer
Line 2507: Dim mySelectQuery As String = "select max(id) as mid from " & tableName
Line 2508: Dim myConnection As New SqlConnection(ConnStr)
Line 2509: Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
Line 2510: dim id
Line 2511: myConnection.Open()
Line 2512: Dim myReader As SqlDataReader = myCommand.ExecuteReader()
Line 2513: try
Line 2514: myReader.Read()
Line 2515: id = myReader("mid")
Line 2516: GetIdInsert = myReader("mid") + 1
Line 2517: Catch e as System.Exception
Line 2518: GetIdInsert = 1
Line 2519: Finally
Line 2520: myReader.Close()
Line 2521: myConnection.Close()
Line 2522: end try
Line 2523: end Function
Line 2524:
Line 2525: public function InformationAboutIP(IP as string) ' ����� ���� � ���� � ������� ������ �� ������ IP
Line 2526:
Line 2527: Dim myConnection As SqlConnection
Line 2528: Dim myCommand As SqlCommand
Line 2529: Dim myReader As SqlDataReader
Line 2530: Dim start
Line 2531: start = timer
Line 2532: Dim mySelect As String = "select ip, (ip+':'+port) as aport, type, lastcheck, country, name from proxylist where ip='" & IP &"'"
Line 2533: Dim myConnectionString As String = Application("AliveProxyConnectionStrASPX")
Line 2534:
Line 2535: myConnection = New SqlConnection(myConnectionString)
Line 2536: myConnection.Open()
Line 2537: myCommand = New SqlCommand(mySelect, myConnection)
Line 2538: myReader = myCommand.ExecuteReader()
Line 2539:
Line 2540: dim alltext = ""
Line 2541: dim recdisplay = 50
Line 2542: dim cnt = 1
Line 2543: dim uptime = 0
Line 2544: dim l__ip = ""
Line 2545: dim pageno = 1
Line 2546:
Line 2547:
Line 2548: AllText += "---------Begin information from AtomInterSoft AliveProxy database--------"& chr(10)
Line 2549:
Line 2550: for cnt=1 to recdisplay
Line 2551: if not myReader.Read() then
Line 2552: Exit For
Line 2553: end if
Line 2554:
Line 2555: ' uptime = left( (myReader("goodcheck")/myReader("allcheck"))*100 , 5)
Line 2556:
Line 2557: AllText = AllText & "-----Proxy #" & str(cnt) & " from ?-----"&chr(10)
Line 2558: AllText = AllText & "Proxy IP:Port - " & myReader("aport") & chr(10)
Line 2559: AllText = AllText & "Proxy name - " & myReader("name") & chr(10)
Line 2560: AllText = AllText & "Hosting country - " & myReader("country") & chr(10)
Line 2561: AllText = AllText & "Proxy type - " & myReader("type") & chr(10)
Line 2562: ' AllText = AllText & "% UpTime - " & uptime & chr(10)
Line 2563: AllText = AllText & "Last check - " & myReader("lastcheck") & chr(10) & chr(10)
Line 2564: next
Line 2565: alltext = alltext
Line 2566:
Line 2567: alltext = alltext & "Time of search - " & cdbl((timer-start)) & " second"&chr(10)
Line 2568: alltext=alltext & "---------End information from AtomInterSoft AliveProxy database--------"&chr(10)
Line 2569:
Line 2570: InformationAboutIP = alltext
Line 2571: myReader.close
Line 2572: myReader = Nothing
Line 2573:
Line 2574: MyConnection.Close()
Line 2575: myConnection = Nothing
Line 2576: end function
Line 2577:
Line 2578: Public Function GetCountryNameByCode1(code as string)
Line 2579:
Line 2580: dim n=""
Line 2581: select case code.ToLower
Line 2582: case "ae"
Line 2583: n = "United Arab Emirates"
Line 2584: case "ad"
Line 2585: n = "Andorra"
Line 2586: case "af"
Line 2587: n = "Afghanistan"
Line 2588: case "ag"
Line 2589: n = "Antigua and Barbuda"
Line 2590: case "ai"
Line 2591: n = "Anguilla"
Line 2592: case "al"
Line 2593: n = "Albania"
Line 2594: case "am"
Line 2595: n = "Armenia"
Line 2596: case "an"
Line 2597: n = "Netherlands Antilles"
Line 2598: case "ao"
Line 2599: n = "Angola"
Line 2600: case "aq"
Line 2601: n = "Antarctica"
Line 2602: case "ar"
Line 2603: n = "Argentina"
Line 2604: case "arpa"
Line 2605: n = "Old style Arpanet"
Line 2606: case "as"
Line 2607: n = "American Samoa"
Line 2608: case "at"
Line 2609: n = "Austria"
Line 2610: case "au"
Line 2611: n = "Australia"
Line 2612: case "aw"
Line 2613: n="Aruba"
Line 2614: case "az"
Line 2615: n="Azerbaidjan"
Line 2616: case "ba"
Line 2617: n="Bosnia-Herzegovina"
Line 2618: case "bb"
Line 2619: n="Barbados"
Line 2620: case "bd"
Line 2621: n="Bangladesh"
Line 2622: case "be"
Line 2623: n="Belgium"
Line 2624: case "bf"
Line 2625: n="Burkina Faso"
Line 2626: case "bg"
Line 2627: n="Bulgaria"
Line 2628: case "bh"
Line 2629: n="Bahrain"
Line 2630: case "bi"
Line 2631: n="Burundi"
Line 2632: case "bj"
Line 2633: n="Benin"
Line 2634: case "bm"
Line 2635: n="Bermuda"
Line 2636: case "bn"
Line 2637: n="Brunei Darussalam"
Line 2638: case "bo"
Line 2639: n="Bolivia"
Line 2640: case "br"
Line 2641: n="Brazil"
Line 2642: case "bs"
Line 2643: n="Bahamas"
Line 2644: case "bt"
Line 2645: n="Bhutan"
Line 2646: case "bv"
Line 2647: n="Bouvet Island"
Line 2648: case "bw"
Line 2649: n="Botswana"
Line 2650: case "by"
Line 2651: n="Belarus"
Line 2652: case "bz"
Line 2653: n="Belize"
Line 2654: case "ca"
Line 2655: n="Canada"
Line 2656: case "cc"
Line 2657: n="Cocos (Keeling) Islands"
Line 2658: case "cf"
Line 2659: n="Central African Republic"
Line 2660: case "cg"
Line 2661: n="Congo"
Line 2662: case "ch"
Line 2663: n="Switzerland"
Line 2664: case "ci"
Line 2665: n="Ivory Coast (Cote D'Ivoire)"
Line 2666: case "ck"
Line 2667: n="Cook Islands"
Line 2668: case "cl"
Line 2669: n="Chile"
Line 2670: case "cm"
Line 2671: n="Cameroon"
Line 2672: case "cn"
Line 2673: n="China"
Line 2674: case "co"
Line 2675: n="Colombia"
Line 2676: case "com"
Line 2677: n="Commercial"
Line 2678: case "cr"
Line 2679: n="Costa Rica"
Line 2680: case "cs"
Line 2681: n="Former Czechoslovakia"
Line 2682: case "cu"
Line 2683: n="Cuba"
Line 2684: case "cv"
Line 2685: n="Cape Verde"
Line 2686: case "cx"
Line 2687: n="Christmas Island"
Line 2688: case "cy"
Line 2689: n="Cyprus"
Line 2690: case "cz"
Line 2691: n="Czech Republic"
Line 2692: case "de"
Line 2693: n="Germany"
Line 2694: case "dj"
Line 2695: n="Djibouti"
Line 2696: case "dk"
Line 2697: n="Denmark"
Line 2698: case "dm"
Line 2699: n="Dominica"
Line 2700: case "do"
Line 2701: n="Dominican Republic"
Line 2702: case "dz"
Line 2703: n="Algeria"
Line 2704: case "ec"
Line 2705: n="Ecuador"
Line 2706: case "edu"
Line 2707: n="Educational"
Line 2708: case "ee"
Line 2709: n="Estonia"
Line 2710: case "eg"
Line 2711: n="Egypt"
Line 2712: case "eh"
Line 2713: n="Western Sahara"
Line 2714: case "es"
Line 2715: n="Spain"
Line 2716: case "et"
Line 2717: n="Ethiopia"
Line 2718: case "fi"
Line 2719: n="Finland"
Line 2720: case "fj"
Line 2721: n="Fiji"
Line 2722: case "fk"
Line 2723: n="Falkland Islands"
Line 2724: case "fm"
Line 2725: n="Micronesia"
Line 2726: case "fo"
Line 2727: n="Faroe Islands"
Line 2728: case "fr"
Line 2729: n="France"
Line 2730: case "fx"
Line 2731: n="France (European Territory)"
Line 2732: case "ga"
Line 2733: n="Gabon"
Line 2734: case "gb"
Line 2735: n="Great Britain"
Line 2736: case "gd"
Line 2737: n="Grenada"
Line 2738: case "ge"
Line 2739: n="Georgia"
Line 2740: case "gf"
Line 2741: n="French Guyana"
Line 2742: case "gh"
Line 2743: n="Ghana"
Line 2744: case "gi"
Line 2745: n="Gibraltar"
Line 2746: case "gl"
Line 2747: n="Greenland"
Line 2748: case "gm"
Line 2749: n="Gambia"
Line 2750: case "gn"
Line 2751: n="Guinea"
Line 2752: case "gov"
Line 2753: n="USA Government"
Line 2754: case "gp"
Line 2755: n="Guadeloupe (French)"
Line 2756: case "gq"
Line 2757: n="Equatorial Guinea"
Line 2758: case "gr"
Line 2759: n="Greece"
Line 2760: case "gs"
Line 2761: n="S. Georgia & S. Sandwich Isls."
Line 2762: case "gt"
Line 2763: n="Guatemala"
Line 2764: case "gu"
Line 2765: n="Guam (USA)"
Line 2766: case "gw"
Line 2767: n="Guinea Bissau"
Line 2768: case "gy"
Line 2769: n="Guyana"
Line 2770: case "hk"
Line 2771: n="Hong Kong"
Line 2772: case "hm"
Line 2773: n="Heard and McDonald Islands"
Line 2774: case "hn"
Line 2775: n="Honduras"
Line 2776: case "hr"
Line 2777: n="Croatia"
Line 2778: case "ht"
Line 2779: n="Haiti"
Line 2780: case "hu"
Line 2781: n="Hungary"
Line 2782: case "id"
Line 2783: n="Indonesia"
Line 2784: case "ie"
Line 2785: n="Ireland"
Line 2786: case "il"
Line 2787: n="Israel"
Line 2788: case "in"
Line 2789: n="India"
Line 2790: case "int"
Line 2791: n="International"
Line 2792: case "io"
Line 2793: n="British Indian Ocean Territory"
Line 2794: case "iq"
Line 2795: n="Iraq"
Line 2796: case "ir"
Line 2797: n="Iran"
Line 2798: case "is"
Line 2799: n="Iceland"
Line 2800: case "it"
Line 2801: n="Italy"
Line 2802: case "jm"
Line 2803: n="Jamaica"
Line 2804: case "jo"
Line 2805: n="Jordan"
Line 2806: case "jp"
Line 2807: n="Japan"
Line 2808: case "ke"
Line 2809: n="Kenya"
Line 2810: case "kg"
Line 2811: n="Kyrgyzstan"
Line 2812: case "kh"
Line 2813: n="Cambodia"
Line 2814: case "ki"
Line 2815: n="Kiribati"
Line 2816: case "km"
Line 2817: n="Comoros"
Line 2818: case "kn"
Line 2819: n="Saint Kitts and Nevis Anguilla"
Line 2820: case "kp"
Line 2821: n="North Korea"
Line 2822: case "kr"
Line 2823: n="South Korea"
Line 2824: case "kw"
Line 2825: n="Kuwait"
Line 2826: case "ky"
Line 2827: n="Cayman Islands"
Line 2828: case "kz"
Line 2829: n="Kazakhstan"
Line 2830: case "la"
Line 2831: n="Laos"
Line 2832: case "lb"
Line 2833: n="Lebanon"
Line 2834: case "lc"
Line 2835: n="Saint Lucia"
Line 2836: case "li"
Line 2837: n="Liechtenstein"
Line 2838: case "lk"
Line 2839: n="Sri Lanka"
Line 2840: case "lr"
Line 2841: n="Liberia"
Line 2842: case "ls"
Line 2843: n="Lesotho"
Line 2844: case "lt"
Line 2845: n="Lithuania"
Line 2846: case "lu"
Line 2847: n="Luxembourg"
Line 2848: case "lv"
Line 2849: n="Latvia"
Line 2850: case "ly"
Line 2851: n="Libya"
Line 2852: case "ma"
Line 2853: n="Morocco"
Line 2854: case "mc"
Line 2855: n="Monaco"
Line 2856: case "md"
Line 2857: n="Moldavia"
Line 2858: case "mg"
Line 2859: n="Madagascar"
Line 2860: case "mh"
Line 2861: n="Marshall Islands"
Line 2862: case "mil"
Line 2863: n="USA Military"
Line 2864: case "mk"
Line 2865: n="Macedonia"
Line 2866: case "ml"
Line 2867: n="Mali"
Line 2868: case "mm"
Line 2869: n="Myanmar"
Line 2870: case "mn"
Line 2871: n="Mongolia"
Line 2872: case "mo"
Line 2873: n="Macau"
Line 2874: case "mp"
Line 2875: n="Northern Mariana Islands"
Line 2876: case "mq"
Line 2877: n="Martinique (French)"
Line 2878: case "mr"
Line 2879: n="Mauritania"
Line 2880: case "ms"
Line 2881: n="Montserrat"
Line 2882: case "mt"
Line 2883: n="Malta"
Line 2884: case "mu"
Line 2885: n="Mauritius"
Line 2886: case "mv"
Line 2887: n="Maldives"
Line 2888: case "mw"
Line 2889: n="Malawi"
Line 2890: case "mx"
Line 2891: n="Mexico"
Line 2892: case "my"
Line 2893: n="Malaysia"
Line 2894: case "mz"
Line 2895: n="Mozambique"
Line 2896: case "na"
Line 2897: n="Namibia"
Line 2898: case "nato"
Line 2899: n="NATO (purged in '96-see hq.nato.int)"
Line 2900: case "nc"
Line 2901: n="New Caledonia (French)"
Line 2902: case "ne"
Line 2903: n="Niger"
Line 2904: case "net"
Line 2905: n="Network"
Line 2906: case "nf"
Line 2907: n="Norfolk Island"
Line 2908: case "ng"
Line 2909: n="Nigeria"
Line 2910: case "ni"
Line 2911: n="Nicaragua"
Line 2912: case "nl"
Line 2913: n="Netherlands"
Line 2914: case "no"
Line 2915: n="Norway"
Line 2916: case "np"
Line 2917: n="Nepal"
Line 2918: case "nr"
Line 2919: n="Nauru"
Line 2920: case "nt"
Line 2921: n="Neutral Zone"
Line 2922: case "nu"
Line 2923: n="Niue"
Line 2924: case "nz"
Line 2925: n="New Zealand"
Line 2926: case "om"
Line 2927: n="Oman"
Line 2928: case "org"
Line 2929: n="Non-Profit Organisations"
Line 2930: case "pa"
Line 2931: n="Panama"
Line 2932: case "pe"
Line 2933: n="Peru"
Line 2934: case "pf"
Line 2935: n="Polynesia (French)"
Line 2936: case "pg"
Line 2937: n="Papua New Guinea"
Line 2938: case "ph"
Line 2939: n="Philippines"
Line 2940: case "pk"
Line 2941: n="Pakistan"
Line 2942: case "pl"
Line 2943: n="Poland"
Line 2944: case "pm"
Line 2945: n="Saint Pierre and Miquelon"
Line 2946: case "pn"
Line 2947: n="Pitcairn Island"
Line 2948: case "pr"
Line 2949: n="Puerto Rico"
Line 2950: case "pt"
Line 2951: n="Portugal"
Line 2952: case "pw"
Line 2953: n="Palau"
Line 2954: case "py"
Line 2955: n="Paraguay"
Line 2956: case "qa"
Line 2957: n="Qatar"
Line 2958: case "re"
Line 2959: n="Reunion (French)"
Line 2960: case "ro"
Line 2961: n="Romania"
Line 2962: case "ru"
Line 2963: n="Russian Federation"
Line 2964: case "rw"
Line 2965: n="Rwanda"
Line 2966: case "sa"
Line 2967: n="Saudi Arabia"
Line 2968: case "sb"
Line 2969: n="Solomon Islands"
Line 2970: case "sc"
Line 2971: n="Seychelles"
Line 2972: case "sd"
Line 2973: n="Sudan"
Line 2974: case "se"
Line 2975: n="Sweden"
Line 2976: case "sg"
Line 2977: n="Singapore"
Line 2978: case "sh"
Line 2979: n="Saint Helena"
Line 2980: case "si"
Line 2981: n="Slovenia"
Line 2982: case "sj"
Line 2983: n="Svalbard and Jan Mayen Islands"
Line 2984: case "sk"
Line 2985: n="Slovak Republic"
Line 2986: case "sl"
Line 2987: n="Sierra Leone"
Line 2988: case "sm"
Line 2989: n="San Marino"
Line 2990: case "sn"
Line 2991: n="Senegal"
Line 2992: case "so"
Line 2993: n="Somalia"
Line 2994: case "sr"
Line 2995: n="Suriname"
Line 2996: case "st"
Line 2997: n="Saint Tome (Sao Tome) and Principe"
Line 2998: case "su"
Line 2999: n="Former USSR"
Line 3000: case "sv"
Line 3001: n="El Salvador"
Line 3002: case "sy"
Line 3003: n="Syria"
Line 3004: case "sz"
Line 3005: n="Swaziland"
Line 3006: case "tc"
Line 3007: n="Turks and Caicos Islands"
Line 3008: case "td"
Line 3009: n="Chad"
Line 3010: case "tf"
Line 3011: n="French Southern Territories"
Line 3012: case "tg"
Line 3013: n="Togo"
Line 3014: case "th"
Line 3015: n="Thailand"
Line 3016: case "tj"
Line 3017: n="Tadjikistan"
Line 3018: case "tk"
Line 3019: n="Tokelau"
Line 3020: case "tm"
Line 3021: n="Turkmenistan"
Line 3022: case "tn"
Line 3023: n="Tunisia"
Line 3024: case "to"
Line 3025: n="Tonga"
Line 3026: case "tp"
Line 3027: n="East Timor"
Line 3028: case "tr"
Line 3029: n="Turkey"
Line 3030: case "tt"
Line 3031: n="Trinidad and Tobago"
Line 3032: case "tv"
Line 3033: n="Tuvalu"
Line 3034: case "tw"
Line 3035: n="Taiwan"
Line 3036: case "tz"
Line 3037: n="Tanzania"
Line 3038: case "ua"
Line 3039: n="Ukraine"
Line 3040: case "ug"
Line 3041: n="Uganda"
Line 3042: case "uk"
Line 3043: n="United Kingdom"
Line 3044: case "um"
Line 3045: n="USA Minor Outlying Islands"
Line 3046: case "us"
Line 3047: n="United States"
Line 3048: case "uy"
Line 3049: n="Uruguay"
Line 3050: case "uz"
Line 3051: n="Uzbekistan"
Line 3052: case "va"
Line 3053: n="Vatican City State"
Line 3054: case "vc"
Line 3055: n="Saint Vincent & Grenadines"
Line 3056: case "ve"
Line 3057: n="Venezuela"
Line 3058: case "vg"
Line 3059: n="Virgin Islands (British)"
Line 3060: case "vi"
Line 3061: n="Virgin Islands (USA)"
Line 3062: case "vn"
Line 3063: n="Vietnam"
Line 3064: case "vu"
Line 3065: n="Vanuatu"
Line 3066: case "wf"
Line 3067: n="Wallis and Futuna Islands"
Line 3068: case "ws"
Line 3069: n="Samoa"
Line 3070: case "ye"
Line 3071: n="Yemen"
Line 3072: case "yt"
Line 3073: n="Mayotte"
Line 3074: case "yu"
Line 3075: n="Yugoslavia"
Line 3076: case "za"
Line 3077: n="South Africa"
Line 3078: case "zm"
Line 3079: n="Zambia"
Line 3080: case "zr"
Line 3081: n="Zaire"
Line 3082: case "zw"
Line 3083: n="Zimbabwe"
Line 3084: case else
Line 3085: n=""
Line 3086: end select
Line 3087: GetCountryNameByCode1 = n
Line 3088: end function
Line 3089:
Line 3090:
Line 3091: </script>
Line 3092:
|