Skip to content

Commit

Permalink
Set IP back to localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminUrquhart committed Mar 15, 2020
1 parent 480fb32 commit bd77cc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/arptell/dhcpcord/DHCPCord.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class DHCPCord extends ListenerAdapter{
private static DHCPConnectionHandler conn = null;
private static final String PREFIX = "dhcp.";

public DHCPCord() throws Exception {
public DHCPCord(String ip) throws Exception {
// Constructor!
Scanner sc = new Scanner(new File("token.txt"));
try {
Expand All @@ -57,7 +57,7 @@ public DHCPCord() throws Exception {
System.err.println("Could not read token: " + e);
System.exit(666);
}
conn = new DHCPConnectionHandler("trash.local", 47606);
conn = new DHCPConnectionHandler(ip, 47606);
}

public void run() throws Exception {
Expand All @@ -71,7 +71,7 @@ public void run() throws Exception {
}

public static void main(String[] args) throws Exception {
new DHCPCord().run();
new DHCPCord(args.length > 0 ? args[0] : "localhost").run();
}
public DHCPConnectionHandler getConnHandler() {
return conn;
Expand Down

0 comments on commit bd77cc3

Please sign in to comment.