ye 2
This commit is contained in:
parent
fdd3435d4d
commit
f9bcf2ef4e
13
build.gradle
13
build.gradle
|
@ -2,6 +2,7 @@ plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'application'
|
id 'application'
|
||||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||||
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'dev.ubujira.ps3d'
|
group 'dev.ubujira.ps3d'
|
||||||
|
@ -28,3 +29,15 @@ dependencies {
|
||||||
implementation 'org.pcap4j:pcap4j-core:2.0.0-alpha.6'
|
implementation 'org.pcap4j:pcap4j-core:2.0.0-alpha.6'
|
||||||
implementation 'org.pcap4j:pcap4j-packetfactory-static:2.0.0-alpha.6'
|
implementation 'org.pcap4j:pcap4j-packetfactory-static:2.0.0-alpha.6'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
groupId = 'dev.ubujira.ps3d'
|
||||||
|
artifactId = 'AuthObtainer'
|
||||||
|
version = '1.1'
|
||||||
|
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
rootProject.name = 'AuthObtainer'
|
||||||
|
|
|
@ -10,10 +10,10 @@ import java.util.List;
|
||||||
|
|
||||||
public class AuthObtainer {
|
public class AuthObtainer {
|
||||||
|
|
||||||
static String sessionTicket = "";
|
public String sessionTicket = "";
|
||||||
static String playFabId = "";
|
public String playFabId = "";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public AuthObtainer() {
|
||||||
//First find Wi-Fi / Ethernet Interface
|
//First find Wi-Fi / Ethernet Interface
|
||||||
List<PcapNetworkInterface> allDevices = null;
|
List<PcapNetworkInterface> allDevices = null;
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ public class AuthObtainer {
|
||||||
try {
|
try {
|
||||||
InetAddress address = InetAddress.getLocalHost();
|
InetAddress address = InetAddress.getLocalHost();
|
||||||
|
|
||||||
for(PcapAddress pcapAddress : d.getAddresses()) {
|
for (PcapAddress pcapAddress : d.getAddresses()) {
|
||||||
if(pcapAddress.getAddress().getHostAddress().equals(address.getHostAddress())) {
|
if (pcapAddress.getAddress().getHostAddress().equals(address.getHostAddress())) {
|
||||||
device = d;
|
device = d;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -88,4 +88,8 @@ public class AuthObtainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
new AuthObtainer();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue