Re: Lazy Man's IPChecker
Hi. Thanks for that man
Fun thing is yesterday I made something similar and came here to share and you have just made one too.
As always, your is better so I think I will use yours.
Anyway here is the code (found on net) for the bat file I made: Code: FOR /F "tokens=1,2 delims= " %%A IN ('nslookup myip.opendns.com resolver1.opendns.com') DO IF "%%A"=="Address:" SET EXTIP=%%B
set /p=%EXTIP%<NUL|clip
msg * /time:5 "The external IP ("%EXTIP%") has been copied to the clipboard."
I also made a basic rubbish menu for myself to help with my work:
Line 1 shows current folder username
Line 2 date ebay/paypal (firefox) was last accessed
Line 3 current date
The rest is the menu options which I can change to anything I want.
Check proxy option opens an internet page of my choice just to make sure I am not on a proxy/OR
Menu option 5 changeip runs a program I made that changes my ip automatically. My ip changes in about 20-30 seconds Code: @echo off
rem folder name start
for %%* in (.) do echo %%~nx*
rem folder name end
rem last access start
for %%a in (FirefoxPortable\data\settings\FirefoxPortableSettings.ini) do set filedate=%%~ta
echo %FileDate:~-16%
rem last access end
rem date & time start
For /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set mydate=%%a/%%b/%%c)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a:%%b)
echo %mydate% %mytime%
rem date & time end
:BEGIN
CHOICE /N /C:1234567 /M "[1]CHECK PROXY [2]KILL IE [3]KILL FF [4]COPY IP [5]CHANGE IP [6]EXIT [7]START FF"%1
IF ERRORLEVEL ==7 GOTO SEVEN
IF ERRORLEVEL ==6 GOTO SIX
IF ERRORLEVEL ==5 GOTO FIVE
IF ERRORLEVEL ==4 GOTO FOUR
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END
:SEVEN
start FirefoxPortable\FirefoxPortable.exe
GOTO END
:SIX
echo byebye
GOTO END
:FIVE
start changeip.com
GOTO BEGIN
:FOUR
@echo off
FOR /F "tokens=1,2 delims= " %%A IN ('nslookup myip.opendns.com resolver1.opendns.com') DO IF "%%A"=="Address:" SET EXTIP=%%B
set /p=%EXTIP%<NUL|clip
msg * /time:5 "external IP ("%EXTIP%") copied to clipboard."
cls
GOTO BEGIN
:THREE
cls
taskkill /f /im firefoxportable.exe /im firefox.exe
GOTO BEGIN
:TWO
cls
taskkill /f /im iexplore.exe
GOTO BEGIN
:ONE
start iexplore "https://whoer.net/"
GOTO BEGIN
:END
Last edited by easy.bake.oven; 12-12-2016 at 09:36 PM.
|