Hack Forums
[Shell] Get_IP_MAC_Funny_Script.bat by Hackoo - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Shell] Get_IP_MAC_Funny_Script.bat by Hackoo (/showthread.php?tid=5657507)



Get_IP_MAC_Funny_Script.bat by Hackoo - Hackoo - Jun 28, 2017

Hi ✌
Someone ask me this :
Quote:Can you make me a batch file which creates a new .vbs file on the desktop that can not be deleted? In the vbs file that gets created on to the desktop, it will have this inside it.


Description and explanation of this new script :
  • This an hybrid script (Batch/Vbscript) ==> means that the batch file can create a vbscript file and execute it !

  • The vbscript file when it will execute; it show you the LAN IP ,WAN IP and MAC address in a MsgBox !

  • The funny thing in this script is to create a folder on your desktop named Hackoo where the vbscript is saved inside with hidden mode and change its icon in a (Padlock icon) and it's hard for a normal user to delete it by the simple way !



Here is the source code of Get_IP_MAC_Funny_Script.bat
Get_IP_MAC_Funny_Script.bat (Click to View)


* - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Jun 28, 2017

Very creative hackoo! Great usage of findstr and ping ^-^

I had one question!!!

is this
Code
@For /f %%b in ('echo %%a') do (

different than this?
Code
@For /f %%b in ("%%a") do (

P.s your signature is flattering!


* - Hackoo - Jun 29, 2017

(Jun 28, 2017 07:22 PM)ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ Wrote:  Very creative hackoo! Great usage of findstr and ping ^-^

I had one question!!!

is this
Code
@For /f %%b in ('echo %%a') do (

different than this?
Code
@For /f %%b in ("%%a") do (

P.s your signature is flattering!
Thank you for the testing bro 👍 ✌
It give me the same result 😉


* - ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™ - Jun 29, 2017

My reasoning is to avoid the echo command. You see 'echo %%a' you parse the output of echo, but using "%%a" avoids that because you're parsing the value instead.


* - Leroy Jethro Gibbs - Jun 29, 2017

Fuckkkk. How do i delete this shit lmao.


* - Hackoo - Jun 29, 2017

(Jun 29, 2017 08:34 PM)Leroy Jethro Gibbs Wrote:  Fuckkkk. How do i delete this shit lmao.
Like i said before it is not easy to delete it by the simple way ! 😧
This what i called the funny part of the script 🤗
This can be deleted easily if you look carefully inside the code, you will find which command can be used there ! 👍
PM me if you still not found any solution for it 🤣


* - Leroy Jethro Gibbs - Jun 29, 2017

(Jun 29, 2017 09:03 PM)Hackoo Wrote:  Like i said before it is not easy to delete it by the simple way ! 😧
This what i called the funny part of the script 🤗
This can be deleted easily if you look carefully inside the code, you will find which command can be used there ! 👍
PM me if you still not found any solution for it 🤣

This is why I am a skid lmao. Give me a few to look at the code.


RE: Get_IP_MAC_Funny_Script.bat by Hackoo - Hackoo - Dec 1, 2017

Hi  ✌
I just modified this script for simple use and i get rid for the funny stuff  😉
PHP Code

<?php 
@echo off
Title Get 
(LAN ,Public) (IP) and MAC Addresses by Hackoo 2017
mode con cols
=80 lines=5 & Color 9E
echo( & echo(
echo   Please Wait a While ... Searching for (LAN ,Public)(IP) and MAC addresses ...
Set "LogFile=%~dpn0.txt"
@for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %ComputerName% ^| findstr [') do (
    set "LAN_IP=%%a"
)

for /
f "tokens=3 delims== " %%A in (
  'nslookup -debug myip.opendns.com. resolver1.opendns.com 2^>NUL^|find "internet address"'
) Do set ExtIP=%%A


@For /f %%a in ('getmac /NH /FO Table') do  (
    @For /f %%b in ("%%a") do (
        If /I NOT "%%b"=="N/A" (
            Set "MY_MAC=%%b"
        )
    )
)
    
Cls 
    
echo(
    
echo                My Private LAN IP       : %LAN_IP%
    
echo                My External Public IP   : %ExtIP%
    
echo                MAC Address             : %MY_MAC%
    
(
    echo 
My Private LAN IP      : %LAN_IP%
    echo 
My External Public IP  : %ExtIP%
    echo 
MAC Address            : %MY_MAC%

)>
"%LogFile%"
Timeout /T 5 /NoBreak>nul
Start 
"" "%LogFile%" 
Enjoy it  😝  👍


RE: Get_IP_MAC_Funny_Script.bat by Hackoo - OTF RENJI - Feb 18, 2018

i cant remove the folder that was download on my desktop