问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

他们是如何检测我的IP的呢?

发布网友 发布时间:2022-04-24 14:29

我来回答

3个回答

热心网友 时间:2022-07-12 09:11

保存为.asp文件。加一个IP数据库就OK了
非常简单
调用代码
----------------------
<%
session.codepage="936"

'==================================
'文件名:qmipv2.0.asp
'描述:签名显IP来源 V2.0
'作者:/、Screen khhx@vip.qq.com
'更新日期:2008-10-26
'=================================
dim ReqIP,User_Agent
ReqIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ReqIP = "" Or IsNull(ReqIP) Then ReqIP = Request.ServerVariables("REMOTE_ADDR")
User_Agent = Request.ServerVariables("HTTP_USER_AGENT")

Response.ContentType = "image/gif"'定义输出类型
dim bb,MyJpeg

Dim LocalFile
LocalFile = Server.MapPath("IpImg.gif") '注意修改背景图片的位置。
Dim Jpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
If -2147221005=Err then
Response.write "没有这个组件,请安装!" '检查是否安装AspJpeg组件
Response.End()
End If
Jpeg.Open (LocalFile) '打开图片
If err.number then
Response.write"打开图片失败,请检查路径!"
Response.End()
End if
Dim aa
aa=Jpeg.Binary '将原始数据赋给aa

'=========加文字水印=================
Jpeg.Canvas.Font.Color = &Hff0000 '水印文字颜色
Jpeg.Canvas.Font.Family = "宋体" '字体
Jpeg.Canvas.Font.Bold = False '是否加粗
Jpeg.Canvas.Font.Size = 12 '字体大小
Jpeg.Canvas.Font.ShadowColor = &Hffffff '阴影色彩
Jpeg.Canvas.Font.ShadowYOffset = 1
Jpeg.Canvas.Font.ShadowXOffset = 1
Jpeg.Canvas.Brush.Solid = False
Jpeg.Canvas.Font.Quality = 10 ' '输出质量

Jpeg.Canvas.PrintText 20, 18, "资料搜索完毕:"
Jpeg.Canvas.PrintText 180, 18, "/、Screen"
Jpeg.Canvas.PrintText 20, 26, "--------------------------------------"
Jpeg.Canvas.PrintText 24, 36, "IP地址: " & ReqIP
Jpeg.Canvas.PrintText 24, 52, "IP定位: " & Look_Ip(ReqIP)
Jpeg.Canvas.PrintText 24, 68, "操作系统: " & ClientInfo(0)
Jpeg.Canvas.PrintText 24, 84, "浏览器: " & ClientInfo(1)
Jpeg.Canvas.PrintText 20, 100, "--------------------------------------"
Jpeg.Canvas.PrintText 20, 116, "欢迎使用/、Screen IP定位系统"
Jpeg.Canvas.PrintText 20, 132, "声明: 不能保证IP定位的100%正确"
Jpeg.Canvas.PrintText 20, 148, " 有一定的误差。以上仅供测试"
bb=Jpeg.Binary '将文字水印处理后的值赋给bb,这时,文字水印没有不透明度
'============调整文字透明度================
Set MyJpeg = Server.CreateObject("Persits.Jpeg")
MyJpeg.OpenBinary aa

dim Logo1,cc
Set Logo1 = Server.CreateObject("Persits.Jpeg")
Logo1.OpenBinary bb
MyJpeg.DrawImage 0,0, Logo1, 0.9 '0.9是透明度
cc=MyJpeg.Binary '将最终结果赋值给cc,这时也可以生成目标图片了
Response.BinaryWrite cc '将二进输出给浏览器
set aa=nothing
set bb=nothing
set cc=nothing
Jpeg.close : Set Jpeg = Nothing
MyJpeg.Close : Set MyJpeg = Nothing
Logo1.Close : Set Logo1 = Nothing

' ============================================
' 返回IP地址信息
' ============================================
Function Look_Ip(IP)
Dim Wry, IPType, QQWryVersion, IpCounter
' 设置类对象
Set Wry = New TQQWry
' 开始搜索,并返回搜索结果
' 您可以根据 QQWry(IP) 返回值来判断该IP地址在数据库中是否存在,如果不存在可以执行其他的一些操作
' 比如您自建一个数据库作为追捕等,这里我就不详细说明了
IPType = Wry.QQWry(IP)
' Country:国家地区字段
' LocalStr:省市及其他信息字段
Look_Ip = Wry.Country & " " & Wry.LocalStr
End Function

' ============================================
' 返回操作系统及浏览器
' ============================================
Function ClientInfo(sType)
If sType = 0 Then
If InStr(User_Agent, "Windows 98") Then
ClientInfo = "Windows 98"
ElseIf InStr(User_Agent, "Win 9x 4.90") Then
ClientInfo = "Windows ME"
ElseIf InStr(User_Agent, "Windows NT 5.0") Then
ClientInfo = "Windows 2000"
ElseIf InStr(User_Agent, "Windows NT 5.1") Then
ClientInfo = "Windows XP"
ElseIf InStr(User_Agent, "Windows NT 5.2") Then
ClientInfo = "Windows 2003"
ElseIf InStr(User_Agent, "Windows NT") Then
ClientInfo = "Windows NT"
ElseIf InStr(User_Agent, "unix") Or InStr(User_Agent, "Linux") Or InStr(User_Agent, "SunOS") Or InStr(User_Agent, "BSD") Then
ClientInfo = "Unix & Linux"
Else
ClientInfo = "Other"
End If
ElseIf sType = 1 Then
If InStr(User_Agent, "MSIE 8") Then
ClientInfo = "Microsoft® Internet Explorer 8.0"
ElseIf InStr(User_Agent, "MSIE 7") Then
ClientInfo = "Microsoft® Internet Explorer 7.0"
ElseIf InStr(User_Agent, "MSIE 6") Then
ClientInfo = "Microsoft® Internet Explorer 6.0"
ElseIf InStr(User_Agent, "MSIE 5") Then
ClientInfo = "Microsoft® Internet Explorer 5.0"
ElseIf InStr(User_Agent, "MSIE 4") Then
ClientInfo = "Microsoft®> Internet Explorer 4.0"
ElseIf InStr(User_Agent, "Netscape") Then
ClientInfo = "Netscape®"
ElseIf InStr(User_Agent, "Opera") Then
ClientInfo = "Opera®"
Else
ClientInfo = "Other"
End If
End If
End Function

' ============================================
' ScreenIP物理定位搜索类
' ============================================
Class TQQWry
' ============================================
' 变量声名
' ============================================
Dim Country, LocalStr, Buf, OffSet
Private StartIP, EndIP, CountryFlag
Public QQWryFile
Public FirstStartIP, LastStartIP, RecordCount
Private Stream, EndIPOff
' ============================================
' 类模块初始化
' ============================================
Private Sub Class_Initialize
Country = ""
LocalStr = ""
StartIP = 0
EndIP = 0
CountryFlag = 0
FirstStartIP = 0
LastStartIP = 0
EndIPOff = 0
QQWryFile = Server.MapPath("QQWry.dat") 'QQ IP库路径,要转换成物理路径
End Sub
' ============================================
' IP地址转换成整数
' ============================================
Function IPToInt(IP)
Dim IPArray, i
IPArray = Split(IP, ".", -1)
FOr i = 0 to 3
If Not IsNumeric(IPArray(i)) Then IPArray(i) = 0
If CInt(IPArray(i)) < 0 Then IPArray(i) = Abs(CInt(IPArray(i)))
If CInt(IPArray(i)) > 255 Then IPArray(i) = 255
Next
IPToInt = (CInt(IPArray(0))*256*256*256) + (CInt(IPArray(1))*256*256) + (CInt(IPArray(2))*256) + CInt(IPArray(3))
End Function
' ============================================
' 整数逆转IP地址
' ============================================
Function IntToIP(IntValue)
p4 = IntValue - Fix(IntValue/256)*256
IntValue = (IntValue-p4)/256
p3 = IntValue - Fix(IntValue/256)*256
IntValue = (IntValue-p3)/256
p2 = IntValue - Fix(IntValue/256)*256
IntValue = (IntValue - p2)/256
p1 = IntValue
IntToIP = Cstr(p1) & "." & Cstr(p2) & "." & Cstr(p3) & "." & Cstr(p4)
End Function
' ============================================
' 获取开始IP位置
' ============================================
Private Function GetStartIP(RecNo)
OffSet = FirstStartIP + RecNo * 7
Stream.Position = OffSet
Buf = Stream.Read(7)

EndIPOff = AscB(MidB(Buf, 5, 1)) + (AscB(MidB(Buf, 6, 1))*256) + (AscB(MidB(Buf, 7, 1))*256*256)
StartIP = AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2, 1))*256) + (AscB(MidB(Buf, 3, 1))*256*256) + (AscB(MidB(Buf, 4, 1))*256*256*256)
GetStartIP = StartIP
End Function
' ============================================
' 获取结束IP位置
' ============================================
Private Function GetEndIP()
Stream.Position = EndIPOff
Buf = Stream.Read(5)
EndIP = AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2, 1))*256) + (AscB(MidB(Buf, 3, 1))*256*256) + (AscB(MidB(Buf, 4, 1))*256*256*256)
CountryFlag = AscB(MidB(Buf, 5, 1))
GetEndIP = EndIP
End Function
' ============================================
' 获取地域信息,包含国家和和省市
' ============================================
Private Sub GetCountry(IP)
If (CountryFlag = 1 Or CountryFlag = 2) Then
Country = GetFlagStr(EndIPOff + 4)
If CountryFlag = 1 Then
LocalStr = GetFlagStr(Stream.Position)
' 以下用来获取数据库版本信息
If IP >= IPToInt("255.255.255.0") And IP <= IPToInt("255.255.255.255") Then
LocalStr = GetFlagStr(EndIPOff + 21)
Country = GetFlagStr(EndIPOff + 12)
End If
Else
LocalStr = GetFlagStr(EndIPOff + 8)
End If
Else
Country = GetFlagStr(EndIPOff + 4)
LocalStr = GetFlagStr(Stream.Position)
End If
' 过滤数据库中的无用信息
Country = Trim(Country)
LocalStr = Trim(LocalStr)
If InStr(Country, "CZ88.NET") Then Country = "LeoYung.COM"
If InStr(LocalStr, "CZ88.NET") Then LocalStr = "LeoYung.COM"
End Sub
' ============================================
' 获取IP地址标识符
' ============================================
Private Function GetFlagStr(OffSet)
Dim Flag
Flag = 0
Do While (True)
Stream.Position = OffSet
Flag = AscB(Stream.Read(1))
If(Flag = 1 Or Flag = 2 ) Then
Buf = Stream.Read(3)
If (Flag = 2 ) Then
CountryFlag = 2
EndIPOff = OffSet - 4
End If
OffSet = AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2, 1))*256) + (AscB(MidB(Buf, 3, 1))*256*256)
Else
Exit Do
End If
Loop

If (OffSet < 12 ) Then
GetFlagStr = ""
Else
Stream.Position = OffSet
GetFlagStr = GetStr()
End If
End Function
' ============================================
' 获取字串信息
' ============================================
Private Function GetStr()
Dim c
GetStr = ""
Do While (True)
c = AscB(Stream.Read(1))
If (c = 0) Then Exit Do

'如果是双字节,就进行高字节在结合低字节合成一个字符
If c > 127 Then
If Stream.EOS Then Exit Do
GetStr = GetStr & Chr(AscW(ChrB(AscB(Stream.Read(1))) & ChrB(C)))
Else
GetStr = GetStr & Chr(c)
End If
Loop
End Function
' ============================================
' 核心函数,执行IP搜索
' ============================================
Public Function QQWry(DotIP)
Dim IP, nRet
Dim RangB, RangE, RecNo

IP = IPToInt (DotIP)

Set Stream = CreateObject("ADodb.Stream")
Stream.Mode = 3
Stream.Type = 1
Stream.Open
Stream.LoadFromFile QQWryFile
Stream.Position = 0
Buf = Stream.Read(8)

FirstStartIP = AscB(MidB(Buf, 1, 1)) + (AscB(MidB(Buf, 2, 1))*256) + (AscB(MidB(Buf, 3, 1))*256*256) + (AscB(MidB(Buf, 4, 1))*256*256*256)
LastStartIP = AscB(MidB(Buf, 5, 1)) + (AscB(MidB(Buf, 6, 1))*256) + (AscB(MidB(Buf, 7, 1))*256*256) + (AscB(MidB(Buf, 8, 1))*256*256*256)
RecordCount = Int((LastStartIP - FirstStartIP)/7)
' 在数据库中找不到任何IP地址
If (RecordCount <= 1) Then
Country = "未知"
QQWry = 2
Exit Function
End If

RangB = 0
RangE = RecordCount

Do While (RangB < (RangE - 1))
RecNo = Int((RangB + RangE)/2)
Call GetStartIP (RecNo)
If (IP = StartIP) Then
RangB = RecNo
Exit Do
End If
If (IP > StartIP) Then
RangB = RecNo
Else
RangE = RecNo
End If
Loop

Call GetStartIP(RangB)
Call GetEndIP()

If (StartIP <= IP) And ( EndIP >= IP) Then
' 没有找到
nRet = 0
Else
' 正常
nRet = 3
End If
Call GetCountry(IP)

QQWry = nRet
End Function
' ============================================
' 类终结

' ============================================
Private Sub Class_Terminate
On ErrOr Resume Next
Stream.Close
If Err Then Err.Clear
Set Stream = Nothing
End Sub
End Class
%>

参考资料:www.heck.tk

热心网友 时间:2022-07-12 09:11

她的网址自动检测的

热心网友 时间:2022-07-12 09:12

百度就能搜索得到,
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
什么车险可以分期花呗 请问“有几个虫子怕什么"改为陈述句是"有几个虫子不可怕"。为什么要加... 一只狼身边有一只羊为什么狼不吃羊? 路边有一只羊,过来一只狼,却没有吃羊,为什么? ...有没有一个厂叫【福高】厂的,是做电子产品的。。3Q 明道冒险王百度云如何下载 冒险王2cps联系谁? 350分到400分的二本大学 廊坊高考400分能上什么学校 河北2023年高考400分左右能上什么大学 怎样用生活边的东西制作小黑板?可以用纸吗?要可以写和擦得,(制作工具要便宜的)谢谢~~~ 求如何测试各地到某个具体IP的连接速度 怎么测试自己ip和网速 网络ip地址测试是否正常,时间(毫秒)数值怎么看是否正常范围是多少? 什么是ip等级?如何测试 如何测试外网ip? 如何自制一个小黑板 各路大神帮忙告诉我这片鱼塘适合全部养虾吗? 南美白对虾可以和白鲢混养吗? 谁知道纳米养虾的技术的?&lt;详细点的....&gt; 大面积湖泊养虾,可草太多。怎样除草 草缸里有虾不能养什么鱼 养虾用牛粪有些什么作用? 我只有一片池塘,可又想养鱼又想养虾的,他们可以养在一起吗?鱼会不会把虾吃了? 养鱼沟怎么把鱼赶到一边分开养虾 草鱼吃不吃小虾? 淡水养虾的产量和经济价值 虾塘为什么不能放鱼 草鱼和虾同养在一个池里,好吗 养虾可以放草鱼吗 ping 127.0.0.1和ping本地ip分别测试什么? ping 127.0.0.1和ping本地ip分别测试什么? 给我一个海岛奇兵的账号密码。免费的。 linux 运行中文界面 皮卡堂过家家免费账号密码 求一个免费的OPPO账号密码 怎样在Linux的命令行界面下使用中文 appleid免费账号密码 Linux系统设置中文之后界面什么的都出现乱码 有免费的账号密码吗? linux ubuntu如何设置中文界面 suse linux10怎么把界面弄成汉语的 red hat enterprise linux 怎么把GNOME界面英文设置成中文? 跪求一个账号密码。免费的 linux zhcon无法输入汉字 免费apple id账号密码 cdlinux如何显示中文 永远的七日之都,免费账号密码 linux 无法自动启动图形界面,并且无法设置中文 如何设置linux系统启动后在命令行界面上输出自己设置的文字?