Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

Commit 7284c01

Browse files
committed
Added the uhash param to the requests.
1 parent 98b0b51 commit 7284c01

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/me/checkium/vhackapi/console/Console.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ public class Console {
2020

2121
protected String password;
2222
protected String username;
23+
protected String userHash;
2324

24-
public Console(String user, String pass) {
25+
public Console(String user, String pass, String uHash) {
2526
username = user;
2627
password = pass;
28+
userHash = uHash;
2729
//return this;
2830
}
2931

@@ -44,7 +46,7 @@ public ArrayList<String> getIPs(int number, boolean attacked, boolean global){
4446
}
4547
if (number > 10) {
4648
for (int i = 10; i <= number + 9; i = i + 10) {
47-
JSONObject json = Utils.JSONRequest("user::::pass::::global", username + "::::" + password + "::::" + Integer.toString(globali), "vh_network.php");
49+
JSONObject json = Utils.JSONRequest("user::::pass::::uhash::::global", username + "::::" + password + "::::" + userHash + "::::" + Integer.toString(globali), "vh_network.php");
4850
JSONArray jSONArray = json.getJSONArray("data");
4951
for (int j = 0; j <= jSONArray.length() - 1; j++) {
5052
JSONObject ip = jSONArray.getJSONObject(j);
@@ -56,7 +58,7 @@ public ArrayList<String> getIPs(int number, boolean attacked, boolean global){
5658
result.add(temporary.get(k));
5759
}
5860
} else {
59-
JSONObject json = Utils.JSONRequest("user::::pass::::global", username + "::::" + password + "::::" + Integer.toString(globali), "vh_network.php");
61+
JSONObject json = Utils.JSONRequest("user::::pass::::uhash::::global", username + "::::" + password + "::::" + userHash + "::::" + Integer.toString(globali), "vh_network.php");
6062
JSONArray jSONArray = json.getJSONArray("data");
6163
for (int k = 0; k < number; k++) {
6264
result.add(jSONArray.getJSONObject(k).getString("ip"));
@@ -89,7 +91,7 @@ public List<ScannedNode> scanIPs(List<String> ips) {
8991
}
9092

9193
public TransferResult transferTrojanTo(ScannedNode node) throws JSONException {
92-
JSONObject json = Utils.JSONRequest("user::::pass::::target", username + "::::" + password + "::::" + node.getIP(), "vh_trTransfer.php");
94+
JSONObject json = Utils.JSONRequest("user::::pass::::uhash::::target", username + "::::" + password + "::::" + userHash + "::::" + node.getIP(), "vh_trTransfer.php");
9395
return new TransferResult(json, node.getIP());
9496
}
9597

@@ -99,7 +101,7 @@ public ArrayList<TransferResult> trTransferIPs(ArrayList<String> ips) {
99101
TransferResult result;
100102
for (int j = 0; j < ips.size(); j++) {
101103

102-
JSONObject json = Utils.JSONRequest("user::::pass::::target", username + "::::" + password + "::::" + ips.get(j), "vh_trTransfer.php");
104+
JSONObject json = Utils.JSONRequest("user::::pass::::uhash::::target", username + "::::" + password + "::::" + userHash + "::::" + ips.get(j), "vh_trTransfer.php");
103105
result = new TransferResult(json, ips.get(j));
104106
array.add(result);
105107
}

src/me/checkium/vhackapi/others/Others.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
public class Others {
1010
protected String username;
1111
protected String password;
12-
public Others(String user, String pass) {
12+
protected String userHash;
13+
public Others(String user, String pass, String uhash) {
1314
username = user;
1415
password = pass;
16+
userHash = uhash;
1517
}
1618
public PackageResult openPackage() {
1719

@@ -25,7 +27,7 @@ public PackageResult openPackage() {
2527

2628

2729

28-
JSONObject json = Utils.JSONRequest("user::::pass", username + "::::" + password, "vh_openFreeBonus.php");
30+
JSONObject json = Utils.JSONRequest("user::::pass::::uhash", username + "::::" + password + "::::" + userHash, "vh_openFreeBonus.php");
2931
if (json == null) {
3032
return result;
3133
}

0 commit comments

Comments
 (0)