forked from OlympicCode/vHackAPI-Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsoleExample.java
More file actions
33 lines (26 loc) · 1.08 KB
/
ConsoleExample.java
File metadata and controls
33 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package examples;
import java.util.ArrayList;
import me.checkium.vhackapi.vHackAPI;
import me.checkium.vhackapi.vHackAPIBuilder;
import me.checkium.vhackapi.console.ScanResult;
import me.checkium.vhackapi.console.TransferResult;
public class ConsoleExample {
public void hackExample(){
vHackAPI api = new vHackAPIBuilder().password("pass").username("user").getAPI();
ArrayList<String> ip = api.getConsole().getIPs(1, false, false);
ArrayList<ScanResult> stats = api.getConsole().scanIPs(ip);
if(stats.get(0).getSuccessRate() <= 90 && stats.get(0).anonymous()) {
ArrayList<TransferResult> transfer = api.getConsole().trTransferIPs(ip);
if(transfer.get(0).getSuccess()){
System.out.println("Got $" + transfer.get(0).getMoneyAmount());
System.out.println("Gained " + transfer.get(0).getRepGained() + " rep.");
}
if(api.getAdwareManager().uploadAdware(ip.get(0))){
System.out.println("Adware uploaded successfully.");
}
else{
System.out.println("Failed to upload Adware.");
}
}
}
}