怎样篡改IP地址,求高手解答
cmd吧
全部回复
仅看楼主
level 3
無奈丿圝 楼主
2013年12月09日 14点12分 1
level 14
同求
2013年12月13日 07点12分 2
level 1
我也要 楼主知道了要@我!!!!
2013年12月14日 08点12分 3
level 11
arp/?
2013年12月15日 10点12分 4
这是绑定ip
2013年12月15日 10点12分
level 1
MAC地址能改么,锐捷网络没钱了用同学的账号和密码连接后,锐捷客户端提示MAC地址错误,请问能修改MAC地址吗?
2014年01月04日 10点01分 5
level 11
网上有mac地址修改器下载
2014年01月04日 15点01分 7
level 10
不懂啊
2014年01月05日 00点01分 8
level 11
同球。
2014年01月05日 04点01分 9
level 3
無奈丿圝 楼主

2014年01月11日 12点01分 10
level 12
我靠 你妹啊
你们是在玩什么啊 ??? ++
2014年01月24日 14点01分 11
level 12
@echo off
title Change IP Address Tool v3
color 2f
@rem 通过标题检测管理员身份
setlocal EnableDELAYEDEXPANSION
set UAC=0
For /f "usebackq delims==" %%i In (`tasklist /fi "WINDOWTITLE eq 管理员: Change IP Address Tool v3"`) Do (
set "cmdline=%%i"
set "cmdline=!cmdline:~0,7!"
if "!cmdline!" == "cmd.exe" (
set UAC=1
)
)
if not "%UAC%"=="1" (
echo 请以管理员身份运行
echo 按任意键退出...
pause>nul
exit
)
@rem 设置需要使用的代理服务器地址===========================================
set ProxyServerValue=127.0.0.1:8087
@rem 无需使用代理服务器的地址,注意:","表示激活无需使用的地址,一定要保留
set ProxyOverrideValue="10.*,"
@rem 这里设置第1个IP的信息==================================================
set MyIP1=192.168.11.222
set MyGateWay1=192.168.11.1
set MyMask1=255.255.255.0
set DNS11=218.85.152.99
set DNS21=218.85.157.99
@rem 这里设置第2个IP的信息==================================================
set MyIP2=192.168.1.222
set MyGateWay2=192.168.1.1
set MyMask2=255.255.255.0
set DNS12=218.85.152.99
set DNS22=218.85.157.99
@rem 这里设置第3个IP的信息==================================================
set MyIP3=2.2.2.22
set MyGateWay3=222.222.222.222
set MyMask3=255.255.255.0
set DNS13=222.222.222.222
set DNS23=222.222.222.221
@rem 设置需要测试的IP地址===================================================
set TestIPc="218.85.152.99"
051
@rem 设置需要测试的IP地址===================================================
052
set TestIPm="222.222.222.222"
053
@rem 设置需要测试的IP地址===================================================
054
set TestIPl="192.168.1.1"
055
056
@rem 获取网卡名称===========================================================
057
FOR /F "tokens=2*" %%i IN ('ipconfig/all^|find /i "以太网适配器 "') DO set lanname=%%i
058
FOR /F "tokens=1* delims=:" %%i in ("%lanname%") do set Lan=%%i
059
060
FOR /F "tokens=2*" %%i IN ('ipconfig/all^|find /i "无线局域网适配器 "') DO set wlanname=%%i
061
FOR /F "tokens=1* delims=:" %%i in ("%wlanname%") do set wLan=%%i
062
063
if not "%Lan%"=="" (if not "%wLan%"=="" (goto :Begin) else (set NetConf="%Lan%"&set confLan=%Lan%&goto :Menu)) else (if not "%wLan%"=="" (set NetConf="%wLan%"&set confLan=%wLan%&goto :Menu) else (echo.&echo 未发现网卡.&echo.&echo 按任意键退出...&pause>nul&exit))
064
065
:Begin
066
cls
067
echo.
068
echo +------------------------------------------------------------------------------
069
echo ^|
070
echo ^| Change IP Address Tool v1
071
echo ^|
072
echo ^| 1 %Lan%
073
echo ^| 2 %wLan%
074
echo ^|
075
echo ^| Q 退出
076
echo ^|
077
echo +------------------------------------------------------------------------------
078
2014年01月24日 14点01分 12
level 12
echo.
079
set /p NetC=请选择需要设置的网络(默认设置-%wLan%):
080
if "%NetC%"=="1" (if not "%Lan%"=="" (set NetConf="%Lan%"&set confLan=%Lan%&goto :Menu) else (set NetC=&goto :Begin))
081
if "%NetC%"=="2" (if not "%wLan%"=="" (set NetConf="%wLan%"&set confLan=%wLan%&goto :Menu) else (set NetC=&goto :Begin))
082
if /i "%NetC%"=="q" exit
083
if not "%wLan%"=="" (set NetConf="%wLan%"&set confLan=%wLan%&goto :Menu) else (set NetC=&goto :Begin)
084
085
086
@rem ==============================================================================
087
:Menu
088
cls
089
echo ###############################################################################
090
echo # #
091
echo # Change IP Address Tool v1 #
092
echo # #
093
echo # 1 XM Office #
094
echo # 2 192.168.1.222/1 #
095
echo # 3 doobom(2.2.2.22/222) #
096
echo # #
097
echo # 0 自动获得IP #
098
echo # 9 手动设置IP #
099
echo # #
100
echo # P 使用GAE代理 #
101
echo # N 不使用代理 #
102
echo # #
103
echo # C 测试218.85.152.99 #
104
echo # M 测试doobom(222.222.222.222) #
105
echo # L 测试192.168.1.1 #
106
echo # #
107
echo # R 选择网卡 #
108
echo # #
109
echo # Q 退出 #
110
echo # #
111
echo ###############################################################################
112
echo.
113
set /p input=(-%confLan%-)请输入选择的代码[eg:1,H...]:
114
if "%input%"=="0" goto IP_0
115
if "%input%"=="1" goto IP_1
116
if "%input%"=="2" goto IP_2
117
if "%input%"=="3" goto IP_3
118
if "%input%"=="9" goto IP_9
119
if /i "%input%"=="P" goto IP_P
120
if /i "%input%"=="n" goto IP_N
121
if /i "%input%"=="c" set testIP=%TestIPc%&goto IP_C
122
if /i "%input%"=="m" set testIP=%TestIPm%&goto IP_C
123
if /i "%input%"=="l" set testIP=%TestIPl%&goto IP_C
124
if /i "%input%"=="r" set NetC=&set input=&goto Begin
125
if /i "%input%"=="q" exit
126
goto Menu
127
128
@rem ==============================================================================
129
:IP_1
130
set MyIP=%MyIP1%
131
set MyGateWay=%MyGateWay1%
132
set MyMask=%MyMask1%
133
set DNS1=%DNS11%
134
set DNS2=%DNS21%
135
goto end
136
@rem ==============================================================================
137
:IP_2
138
set MyIP=%MyIP2%
139
set MyGateWay=%MyGateWay2%
140
set MyMask=%MyMask2%
141
set DNS1=%DNS12%
142
set DNS2=%DNS22%
143
goto end
144
@rem ==============================================================================
145
:IP_3
146
set MyIP=%MyIP3%
147
set MyGateWay=%MyGateWay3%
148
set MyMask=%MyMask3%
149
set DNS1=%DNS13%
150
set DNS2=%DNS23%
151
goto end
152
153
@rem ==============================================================================
154
:IP_9
155
cls
156
echo 手动设置%confLan%的IP地址:
157
set /p MyIP=[ip:192.168.1.22]
158
if /i "%MyIP%"=="" set MyIP=192.168.1.22
159
set /p MyMask=[Mask:255.255.255.0]
160
if /i "%MyMask%"=="" set MyMask=255.255.255.0
161
set /p MyGateWay=[GateWay:192.168.1.1]
2014年01月24日 14点01分 13
level 12
162
if /i "%MyGateWay%"=="" set MyGateWay=192.168.1.1
163
set /p DNS1=[DNS1:111.68.8.179]
164
if /i "%DNS1%"=="" set DNS1=111.68.8.179
165
set /p DNS2=[DNS2:218.85.152.99]
166
if /i "%DNS2%"=="" set DNS2=218.85.152.99
167
goto end
168
169
@rem ==============================================================================
170
:IP_P
171
cls
172
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t reg_sz /d %ProxyServerValue% /f
173
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t reg_sz /d %ProxyOverrideValue% /f
174
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t reg_dword /d 00000001 /f
175
echo 设置代理完成(需重启浏览器)...
176
pause>nul
177
set input=
178
goto :Menu
179
180
@rem ==============================================================================
181
:IP_N
182
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t reg_dword /d 00000000 /f
183
echo 取消代理完成(需重启浏览器)...
184
pause>nul
185
set input=
186
goto :Menu
187
188
@rem ==============================================================================
189
:IP_C
190
cls
191
ping %testIP%
192
pause
193
cls
194
set input=
195
goto Menu
196
197
@rem ==============================================================================
198
:IP_0
199
cls
200
echo 正在设置(-%confLan%-)的IP地址:
201
netsh interface ip set address name=%NetConf% source=dhcp
202
echo ip:DHCP
203
netsh interface ip set dns name=%NetConf% source=dhcp
204
echo.
205
echo dns:DHCP
206
echo.
207
echo 操作完成...
208
pause>nul
209
set input=
210
goto Menu
211
212
@rem ==============================================================================
213
:end
214
cls
215
echo 正在设置(-%confLan%-)的IP地址:
216
netsh interface ip set address name=%NetConf% source=static address=%MyIP% mask=%MyMask% gateway=%MyGateWay% gwmetric=0
217
echo ip:%MyIP%
218
echo mask:%MyMask%
219
echo gateway:%MyGateWay%
220
netsh interface ip set dns %NetConf% static %DNS1% primary
221
echo.
222
echo dns1:%DNS1%
223
netsh interface ip add dns name=%NetConf% address=%DNS2%
224
echo dns2:%DNS2%
225
netsh interface ip set wins name=%NetConf% source=static address=none
226
echo.
227
echo 操作完成...
228
pause>nul
229
set input=
230
goto Menu
2014年01月24日 14点01分 14
level 12
复制到记事本去掉行序号(编辑器上的无关代码)在保存运行
2014年01月24日 14点01分 15
level 12
'/////主程序
dim msginf,machname'定义变量:对话框,机器名
msginf=msgbox("该程序只能执行1次,请在XP系统硬件安装完毕后执行!" &chr(13) & "是否继续?",65,"修改机器网络配置") '信息提示
if msginf=1 then ' 如果按确定,则
machname=inputon() ' 用函数inputon()分析
if machname<>"quit" then ' 如果返回值不等于"quit",则
wmitoip(machname) ' 运行函数wmitoip()设置机器信息
mreboot()'重启机器
end if
end if
'///重启机器
sub mreboot()
dim fso,f1,f2
Set fso = CreateObject("Scripting.FileSystemObject")
'删除启动组
if fso.fileexists("C:\Documents and Settings\Administrator\「开始」菜单\程序\启动\fxp.lnk") then
set f1=fso.getfile("C:\Documents and Settings\Administrator\「开始」菜单\程序\启动\fxp.lnk")
f1.delete
end if
'删除vbs文件
if fso.fileexists("e:\fxp.vbs") then
set f2=fso.getfile("e:\fxp.vbs")
f2.delete
end if
Set WshShell = Wscript.CreateObject("Wscript.Shell")
'WshShell.Run ("shutdown.exe -r -t 5") ' 重启
end sub
'///生成计算机名
function inputon() ' 函数inputon()
dim t ' 变量
while true ' 循环直到退出函数
t=inputbox("按一下规则输入:" & chr(13) & chr(13) & "第1位代表机房号" & chr(13) & "第2、3位代表机器号" & chr(13) & "教师机用00代表" & chr(13) & "如:123代表1号机房23号机" & chr(13) & "请确保输入正确!!","请输入3位机器标识!","") ' 输入机算机名,默认值为空
if t="" then ' 如果t等于空(按了取消键),则
inputon="quit" ' 返回值为"quit"
exit function ' 退出程序
end if
if len(t)=3 then ' 计算机号的长度为3位
if Cint(t)>=100 and Cint(t)<580 then ' 验证
inputon=t ' 返回需要的计算机名
exit function
end if
end if
wend
end function
'///修改机器ip、掩码、网关、工作组、机器名
sub wmitoip(t)
strComputer="."
strmask="255.255.255.0"
Dim lt,rt' 变量
dim ipv,gateway,lan 'ip,网关,工作组
lt=cint(left(t,1))'机号左1位数字值
rt=cint(right(t,2)) ' 机号右两位数字值
if lt=1 or lt=2 then'判断网关
gateway="192.168.1.254"
else
gateway="192.168.3.254"
end if
if lt=1 then '1号机房
lan="S01"
ipv="192.168.1."
if rt=0 then '教师机
ipv=ipv+"100"
else'学生机
ipv=ipv+Cstr(rt)
end if
end if
if lt=2 then '2号机房
lan="S02"
ipv="192.168.1."
if rt=0 then '教师机
ipv=ipv+"200"
else'学生机
rt=rt+100
ipv=ipv+Cstr(rt)
end if
end if
if lt=3 then '3号机房
lan="S03"
ipv="192.168.3."
if rt=0 then '教师机
ipv=ipv+"80"
else'学生机
ipv=ipv+Cstr(rt)
end if
end if
if lt=4 then '4号机房
lan="S04"
ipv="192.168.3."
if rt=0 then '教师机
ipv=ipv+"160"
else'学生机
rt=rt+80
ipv=ipv+Cstr(rt)
end if
end if
if lt=5 then '5号机房
lan="S05"
ipv="192.168.3."
if rt=0 then '教师机
ipv=ipv+"240"
else'学生机
rt=rt+160
ipv=ipv+Cstr(rt)
end if
end if
Set objWMIService=GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters=objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
strIPAddress=Array(ipv)
strSubnetMask=Array(strmask)
strGateway = Array(gateway) '修改网关
'strGatewayMetric = Array(1) '跃点数
strDNS=Array("61.134.1.4")
For Each objNetAdapter in colNetAdapters
errEnable=objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)'ip,掩码
errGateways = objNetAdapter.SetGateways(strGateway) '网关
errDns=objNetAdapter.SetDNSServerSearchOrder(strDNS)'dns
Next
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colComputers = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colComputers
err = ObjComputer.Rename("No_" & t)'机器名
ReturnValue = objComputer.JoinDomainOrWorkGroup("S0" & left(t,1))'工作组
Next
end sub
2014年01月24日 14点01分 16
保存为vbs运行 电脑室用
2014年01月24日 14点01分
回复 命幽 :只能叹息了,一堆代码,完全看不懂,膜拜啊
2014年01月24日 16点01分
回复 黄山小方0 :额。。。你放心 全部是我写的。。。。。
2014年01月24日 16点01分
回复 命幽 :完全不是我写的
2014年01月24日 16点01分
1