![]() |
|
[Shell] How to get Local IP and MAC address ? - 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] How to get Local IP and MAC address ? (/showthread.php?tid=5569722) |
How to get Local IP and MAC address ? - Hackoo - Mar 8, 2017 Hi ✌ I want to share with you what i have tested on my PC with Windows 7 32 bits (French Machine) and of course i wonder if this same script will work or not on other machines (English, German and so on .....) Here is the script : Get_IP_MAC.bat Spoiler (Click to View) So, i'm waiting for your testing and your feed back 👍 Thank you ✌ * - b00st3d - Mar 8, 2017 It works but you have a typo in the ping command. Should be ping -4 * - motherfawker666 - Mar 8, 2017 Too few people (myself included) take advantage of the usefulness of FOR statements. Error catching would be a solid idea. * - Hackoo - Mar 8, 2017 (Mar 8, 2017 04:56 PM)b00st3d Wrote: It works but you have a typo in the ping command. Should be ping -4Thank you for the remark ! Yes i edit my post and i correct it ✌ * - Advertisement - Mar 20, 2017 Sorry do you mean public IP address or ipv4? Can't you just use ipconfig and findstr? * - b00st3d - Mar 20, 2017 (Mar 20, 2017 07:09 PM)Advertisement Wrote: Sorry do you mean public IP address or ipv4? Can't you just use ipconfig and findstr? Yes ipconfig is the proper way of doing this. I didn't look at the values before, but you're showing me the wrong IP address and MAC. ipconfig /all will take a little work to pull the correct IP. In my case, I have a virtualBox Host-Only adapter and a Local Area Connection both with different IP addresses. I also have 5 additional interfaces with ipv6 for VPN. |