This commit is contained in:
Ubujira 2022-07-06 00:38:23 +02:00
parent fdd3435d4d
commit f9bcf2ef4e
Signed by: Ubujira
GPG Key ID: 0AE21133AB421B0B
3 changed files with 24 additions and 5 deletions

View File

@ -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
}
}
}

2
settings.gradle Normal file
View File

@ -0,0 +1,2 @@
rootProject.name = 'AuthObtainer'

View File

@ -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();
}
} }