FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Booster in Bonus pack and partial spyware support by Qup42 · Pull Request #15 · OlympicCode/vHackAPI-Java · GitHub

This repository was archived by the owner on Nov 24, 2018. It is now read-only.
/ vHackAPI-Java Public archive
4 changes: 2 additions & 2 deletions README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# vHackAPI-Java
[![Discord](https://img.shields.io/badge/Chat-%20on%20Discord-738bd7.svg)](https://discord.gg/PHgESQn) [![Build Status](https://travis-ci.org/vHack-API/vHackAPI-Java.svg?branch=master)](https://travis-ci.org/vHack-API/vHackAPI-Java) [![Downloads](https://img.shields.io/github/downloads/vHack-API/vHackAPI-Java/total.svg)]() [![GitHub release](https://img.shields.io/github/release/vHackAPI/vHackAPI-Java.svg)]()

### Contributors: [@Checkium](https://github.com/checkium), [@dude24760](https://github.com/dude24760), [@angelbirth](https://github.com/angelbirth)
### Contributors: [@Checkium](https://github.com/checkium), [@dude24760](https://github.com/dude24760), [@angelbirth](https://github.com/angelbirth), [@Qup42](https://github.com/Qup42)
###### Don't forget to add your name here when you pull request.
Current feature list:
- Ability to scan the network for IP addresses.
- Scan IP addresses for stats.
- Execute a trTransfer on an IP and retrieve the results.
- Upload adware to a target IP.
- Upload spyware to a target IP and get Infos about the spyware you have installed on remote IPs.
- Upgrade software/hardware.
- Abort tasks/finish tasks with netcoin.
- Open free packages.
Expand Down
75 changes: 75 additions & 0 deletions src/me/checkium/vhackapi/Spyware/Spyware.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package me.checkium.vhackapi.Spyware;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.json.JSONObject;

public class Spyware {

protected final Pattern pattern = Pattern.compile("(\\d\\d)m, (\\d\\d)s.");

protected int av;
protected int fw;
protected int money;
protected int spam;
protected int next;
protected String ip;
protected String username;

public Spyware (JSONObject json) {
av = json.getInt("av");
fw = json.getInt("fw");
money = json.getInt("money");
spam = json.getInt("spam");
ip = json.getString("ip");
username = json.getString("user");

String nextString = json.getString("next");
if ("now.".equals(next))
{
next = 0;
}
else
{
Matcher matcher = pattern.matcher(nextString);
if(matcher.matches())
{
next = Integer.valueOf(matcher.group(1)) * 60 + Integer.valueOf(matcher.group(2));
}
else
{
next = 3600;
}
}
}

public int getAv() {
return av;
}

public int getFw() {
return fw;
}

public int getMoney() {
return money;
}

public int getSpam() {
return spam;
}

public int getNext() {
return next;
}

public String getIp() {
return ip;
}

public String getUsername() {
return username;
}

}
41 changes: 41 additions & 0 deletions src/me/checkium/vhackapi/Spyware/SpywareManager.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package me.checkium.vhackapi.Spyware;

import java.util.ArrayList;

import org.json.JSONArray;
import org.json.JSONObject;

import me.checkium.vhackapi.Utils;
import me.checkium.vhackapi.console.ScannedNode;

public class SpywareManager {

protected String password;
protected String username;
protected String userHash;

public SpywareManager(String user, String pass, String uHash) {
username = user;
password = pass;
userHash = uHash;
}

public SpywareUploadResult uploadSpywareTo(ScannedNode node)
{
String returnString = Utils.StringRequest("user::::pass::::uhash::::target", username + "::::" + password + "::::" + userHash + "::::" + node.getIP(), "vh_spywareUpload.php");
return new SpywareUploadResult(returnString);
}

public ArrayList<Spyware> getActiveSpyware()
{
ArrayList<Spyware> list = new ArrayList<>();
JSONObject json = Utils.JSONRequest("user::::pass::::uhash", username + "::::" + password + "::::" + userHash, "vh_spywareInfo.php");
JSONArray jsonArray = json.getJSONArray("data");
for (int i = 0; i < jsonArray.length(); i++)
{
Spyware spyware = new Spyware(jsonArray.getJSONObject(i));
list.add(spyware);
}
return list;
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package me.checkium.vhackapi.Spyware;

public class SpywareUploadResult {

protected boolean success;
protected SpywareUploadResultEnum result;

public SpywareUploadResult(String resultString)
{
switch (resultString){
case "0":
result = SpywareUploadResultEnum.success;
success = true;
break;
case "7":
result = SpywareUploadResultEnum.ip_does_not_exists;
break;
case "11":
result = SpywareUploadResultEnum.spyware_already_uploaded;
break;
case "14":
result = SpywareUploadResultEnum.all_spyware_slots_full;
break;
}
}

public SpywareUploadResultEnum getResult()
{
return result;
}

public boolean wasSuccessfull()
{
return success;
}

}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package me.checkium.vhackapi.Spyware;

public enum SpywareUploadResultEnum {
success, ip_does_not_exists, spyware_already_uploaded, all_spyware_slots_full
}
2 changes: 1 addition & 1 deletion src/me/checkium/vhackapi/Stats.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

public enum Stats {

money, ip, inet, hdd, cpu, ram, fw, av, sdk, ipsp, spam, scan, adw, netcoins, bonus, elo, hash, id, uhash
money, ip, inet, hdd, cpu, ram, fw, av, sdk, ipsp, spam, scan, adw, netcoins, bonus, elo, hash, id, uhash, score, boost, clusterID, position, rank, actspyware

}
48 changes: 27 additions & 21 deletions src/me/checkium/vhackapi/Utils.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,37 @@ public static String readJson(Reader rd) throws IOException {
}

public static JSONObject JSONRequest(String format, String data, String php){
System.setProperty("http.agent", "Chrome");
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, Utils.trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (GeneralSecurityException e) {
}

JSONObject json = null;
InputStream is;
try {
is = new URL(Utils.generateURL(format, data, php)).openStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
String jsonText = Utils.readJson(rd);
if (jsonText.length() == 1) {
return null;
}
json = new JSONObject(jsonText);
} catch (IOException e) {
e.printStackTrace();
JSONObject json = null;
String jsonText = StringRequest(format, data, php);
if (jsonText.length() == 1) {
return null;
}
json = new JSONObject(jsonText);
return json;
}

public static String StringRequest(String format, String data, String php)
{
System.setProperty("http.agent", "Chrome");
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, Utils.trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (GeneralSecurityException e) {
}

String jsonText = null;
InputStream is;
try {
is = new URL(Utils.generateURL(format, data, php)).openStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
jsonText = Utils.readJson(rd);
} catch (IOException e) {
e.printStackTrace();
}
return jsonText;
}

//I sometimes get "Request Failed"
private static byte[] m9179a(byte[] arrby, int n2, int n3, byte[] arrby2, int n4, byte[] arrby3) {
int n5 = n3 > 0 ? arrby[n2] << 24 >>> 8 : 0;
int n6 = n3 > 1 ? arrby[n2 + 1] << 24 >>> 16 : 0;
Expand Down
4 changes: 0 additions & 4 deletions src/me/checkium/vhackapi/console/Console.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,5 @@ public String[] ReadBigStringIn(BufferedReader buffIn) throws IOException {
}
return string;
}





}
6 changes: 6 additions & 0 deletions src/me/checkium/vhackapi/others/Others.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ public PackageResult openPackage() {
//Bot net pc
result = new PackageResult(PackageResultEnum.btntpc, json.getInt("win"));
return result;
case 4:
//Booster

//you seem to get only one per package max.
//my test had win: null and lvl: 0 in the result both times i tested it
result = new PackageResult(PackageResultEnum.boost, 1);
return result;
}
return result;
}
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

public enum PackageResultEnum {

money, netcoins, av, fw, ipsp, btntpc, sdk, spam, scan, adw
money, netcoins, av, fw, ipsp, btntpc, sdk, spam, scan, adw, boost
}
2 changes: 2 additions & 0 deletions src/me/checkium/vhackapi/vHackAPI.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public String humanizeString(String unumanized) {
return "ID";
case "btntpc":
return "Botnet PC";
case "boost":
return "Booster";
default:
return null;
}
Expand Down

Back | FazBrowse Home | New Git URL