伪造ip办法 投票假ip生成 ip欺骗

http.SetRequestHeader "X-Forwarded-For", ghostip

, , , ,

vbs获取本机外网ip

Function getmyip()
	Dim ie,regEx
	Set ie=CreateObject("internetexplorer.application")
	ie.navigate("http://www.ip138.com/ip2city.asp")
	ie.Visible=False
	While ie.busy Or ie.readystate <> 4
	Wend
	Set regEx = New RegExp 
	regEx.Pattern ="\d.*\d"
	Set Matches = regEx.Execute(ie.document.body.innerhtml)
	ie.Quit : Set ie=Nothing
	For Each Match in Matches
		getmyip=Match.Value
	Next
End Function
 
Function getmyip()
	Dim http,regEx
	Set http = CreateObject("WinHttp.WinHttpRequest.5.1")
    http.setTimeouts 10000, 10000, 10000, 10000
    http.Open "get","http://www.ip138.com/ip2city.asp", False
    http.Send
    If http.Status="200" Then
    	Set regEx = New RegExp 
		regEx.Pattern ="\[(.*?)\]"
		Set Matches = regEx.Execute(http.ResponseText)
		For Each Match in Matches
			getmyip=Match.Submatches(0)
		Next
	End If
	Set http=Nothing 
End Function 
 
'另外再说下怎么使用wmi获取本地网卡信息
strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_NetworkAdapterConfiguration where IPEnabled=true and MACAddress<>''",,48) 
For Each objItem in colItems
	WScript.Echo objitem.IPAddress(0)	'IP地址
	WScript.Echo objitem.IPSubnet(0)	'子网掩码
	WScript.Echo objitem.DNSServerSearchOrder(0)	'默认DNS
	WScript.Echo objitem.DNSServerSearchOrder(1)	'备用DNS
	WScript.Echo objitem.DefaultIPGateway(0)		'网关
	WScript.Echo objitem.DNSHostName	'计算机名
	WScript.Echo objitem.Description	'网卡名字
	WScript.Echo objitem.MACAddress		'MAC地址
next

, , , ,

在线ping将域名转换为IP地址

其实很简单,只需要一句代码,我想看得懂吧,使用方法 http://www.suntw.com/demo/domtoip.php?dom=www.163.com

<?echo gethostbyname( $_REQUEST['dom'] );?>

, ,

检查ip是否在一个指定的段内

函数详见内页,可以检查ip是否在一个段内,例如
iparrall=”192.168.*.5,8.8.*.*,61.139.2.100-61.139.10.254,4.4.4.4″

, , ,

VBS修改本地网卡网络属性

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objNetAdapter in colNetAdapters
	'更新IP地址和子网掩码
    objNetAdapter.EnableStatic Array("192.168.0.252"), Array("255.255.255.0")
    '更新网关
    objNetAdapter.SetGateways Array("192.168.0.1") '设置网关
    '更新DNS配置
    objNetAdapter.SetDNSServerSearchOrder Array("61.139.2.69","8.8.8.8")
Next

, , , , , , ,

关于CDN获取真实IP的办法

现在不少网站都用了CDN吧,你ping域名到的ip并不是网站所在服务器,而是一台配置了CDN网络服务器,我们如何知道这个域名所对应的真实ip是多少呢,据我研究是不能直接得到的,你如果有权上传文件,可以用下面第一行ASP代码查看到。

Request.ServerVariables("LOCAL_ADDR")'得到服务器的IP地址 
Request.ServerVariables("REMOTE_ADDR")'得到客户端的IP地址
request.ServerVariables("HTTP_X_FORWARDED_FOR")'得到代理ip(这个可以伪造)

, , ,