This was a little tool i wrote for use with the crowdgaming plugin however it might be useful to someone else.
If you need to get the local IP address of your computer running C2 for whatever reason in code
This little tool in adds your local IP address to a txt file and stores it in the same location as where you ran it from.
1) Copy the GetIP.exe file i've included and put it in the same folder as your exported NW.JS project .exe file (https://dl.dropboxusercontent.com/u/403350/LocalIP/GetIP.exe)
Then checkout the capx i've included to see how to execute and read the IP into your project.
Edit: Also, if you are Testing using NW.JS for previewing, put the GetIP.exe also in your C:\Program Files\NWjsForC2\win32 folder
I have to point out, running an unsigned compiled Windows executable is an incredibly risky thing for anybody to do. I think it's possible for WebRTC to determine the local IP, perhaps there should be a C2 feature for this.
Ashley - I'm all for an easier solution
https://dl.dropboxusercontent.com/u/139 ... tIPc2.capx
Develop games in your browser. Powerful, performant & highly capable.
Noncentz705 - Sweet ! Thanks so much! I knew there had to be an easier way of finding it. Does this work if the computer is offline as well?
It seems to return a 127 address when offline.