Tuesday 15 March 2011

rdp - How to decrypt or decode weird local IP -


I recently purchased and RDP and everything went well, and I made a small script. Here) which range for my local IP, like 192.168.42.1, but when I tried to do this on another rdp, I found out that, a very weird IP, someone can tell me how it comes and How to fix it (General Local IP is back 192.168.xx)

Thank you.

looks like an IPv6 address, so converting them back into IPv4 (eg 127.0.0.1) Not possible at all times, so snapet here is in Javascript that can help you:

But keep in mind that it's not always possible!

  & lt; Script & gt; Function parseIp6 (str) {// init var ar = new array; For (var i = 0; i & lt; 8; i ++) r [i] = 0; // Check for frivolous IP if (str == "::") comes back; // parse var sar = str.split (':'); Var slen = sar.length; If (slen & gt; 8) slen = 8; Var j = 0; (Var i = 0; i & lt; slen; i ++) {// This is a "::", switch to end-stop mode if (i & s [i] == "" ) {J = 9-ssln + ii; Released;} r [j] = parseint ("0x0" + sir [ii]); J ++; } Returned; } Function ipcnvfrom6 (ip6) {var ip6 = parseIp6 (ip6); Var ip4 = (IP6 [6] & gt; 8) + "." + (IP6 [6] and 0xff) + "." + (IP6 [7] & gt; 8) + "." + (Ip6 [7] in & amp; 0xff); Return IP4; } Warning (ipcnvfrom6 (":: C0A8: 4A07")); & Lt; / Script & gt;  

No comments:

Post a Comment