All pastes #2133672 Raw Edit

Anonymous

public text v1 · immutable
#2133672 ·published 2012-03-30 00:05 UTC
rendered paste body
IP = GetIP()
MsgBox("Your original IP is: " & IP & "")
arrOctets = Split(IP, ".")
secondOctet = InputBox("What would you like to change the second octet to")
NewAddress = arrOctets(0) & "." & secondOctet & "." & arrOctets(2) & "." & arrOctets(3)
MsgBox("Your new IP is: " & newAddress & "")   

Function getIp()
Set objShell = CreateObject("WScript.Shell")	
Set objWshScriptExec = objShell.Exec("ipconfig")	
Set objStdOut = objWshScriptExec.StdOut	
	
While Not objStdOut.AtEndOfStream
   strLine = objStdOut.ReadLine
   If InStr(strLine,"IP Address") Then
	   ipAddr = right(strLine, Len(strLine)-44)
   End If
Wend
	
GetIp = ipAddr
End Function