Coder Social home page Coder Social logo

vhackapi-java's Introduction

vHackAPI-Java

OUTDATED

The vHack API is currently being rewritten, if you want to access the old code, check the old branch.

Discord Downloads

Current API progress:
  • Base request system
  • Basic status retrieving
  • Searching, scanning & attacking
  • Upgrading and task management
  • Cluster joining, managing & attacking
  • Notepad IP and text management
  • Botnet building and career management
  • Ranking retrieving
  • Log retrieving
  • Email reading
  • Mission collecting and retrieving
  • Package opening and buying

Thanks @Qup42, @C0mm4nd, @dude24760, @angelbirth, @tr0teK, and everyone else involved on making the 1.0 version, I hope you had fun.

vhackapi-java's People

Contributors

angelbirth avatar dude24760 avatar itsfolf avatar notanullpointer avatar qup42 avatar yannice92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vhackapi-java's Issues

vHack API version

Explanation of Issue:
After I synced the latest git I still get an issue:
Exception in thread "main" org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:451) at org.json.JSONObject.<init>(JSONObject.java:195) at org.json.JSONObject.<init>(JSONObject.java:319) at me.checkium.vhackapi.vHackAPI.getStats(vHackAPI.java:52) at me.checkium.vhackapi.vHackAPI.<init>(vHackAPI.java:81) at me.checkium.vhackapi.vHackAPIBuilder.getAPI(vHackAPIBuilder.java:55) at examples.ConsoleExample.main(ConsoleExample.java:10)

How can I recreate this issue:
Sync latest git repository in Eclipse or any IDE fill in user details and then run.

API Version:
https://api.vhack.cc/v/9/ (I updated today, so whatever the latest one is)

java.io.FileNotFoundException

If you scan or transfer on more than one ip the application crashes. I figured out that if you manually use the http request in your browser and spamming F5 you get a 404 Response. However if you delay for exactly 3000ms after every single scan + transfer and loop it, it works fine.

Any way to fix this or is it a thing with the vhack servers ?

here is a little trash example for console:
http://pastebin.com/tC50epND

invalid json respond

i think the respond is changed again... tried sometimes and got same invalid error

Upload adware response

I have been tinkering with your code, but I got false positive every time I uploadAdware (returns false but actually uploaded). In the code it says "return true if the response contains 11"
My question, what is this "11"? Some kind of magic number?

New Api url

Api url changed to api.vhack.cc please update it.... And i think this code need to updated based on current vhack app

NullPointerException

Explanation:
During a run of the API, there are spontaneous NullPointerExceptions from the line:
if(scanned.getSuccessRate() >= 70) {
with error message:
Exception in thread "main" java.lang.NullPointerException at examples.ConsoleExample.main(ConsoleExample.java:17)

Recreation:
You can recreate this through running the API compiled straight from this git repo, could be on the first run or second or 100th run.

API Version:
https://api.vhack.cc/v/8/ - Believe I could say it's version 8 of the API?
Or if not that then V1.41.

Still NullPointerException with current TimeOuts

Explanation of issue:

Since the new API was released I tried to recreate and adapt my code from the past to the current one.
When I change everything from a single IP to multiple IPs I still get the FileNotFoundException, followed by the NullPointerException.
I changed the sleep times but still the same issue remains. Already tried 2 seconds sleep between every scan, because the last bot worked just fine with that configuration and still after an amount of scans I get the Exception.

Exception:

java.io.FileNotFoundException: https://api.vhack.cc/v/2/vh_scan.php?user=YOURUSERHASH&pass=YOURPASSHASH
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
	at java.net.URL.openStream(Unknown Source)
	at me.checkium.vhackapi.Utils.StringRequest(Utils.java:115)
	at me.checkium.vhackapi.console.Console.scanIP(Console.java:91)
	at me.checkium.vhackapi.console.Console.lambda$0(Console.java:100)
	at java.util.ArrayList.forEach(Unknown Source)
	at me.checkium.vhackapi.console.Console.scanIPs(Console.java:100)
	at examples.ConsoleExample.newCode(ConsoleExample.java:34)
	at examples.ConsoleExample.main(ConsoleExample.java:20)
Exception in thread "main" java.lang.NullPointerException
	at java.io.StringReader.<init>(Unknown Source)
	at me.checkium.vhackapi.console.Console.parseScanResult(Console.java:127)
	at me.checkium.vhackapi.console.Console.scanIP(Console.java:91)
	at me.checkium.vhackapi.console.Console.lambda$0(Console.java:100)
	at java.util.ArrayList.forEach(Unknown Source)
	at me.checkium.vhackapi.console.Console.scanIPs(Console.java:100)
	at examples.ConsoleExample.newCode(ConsoleExample.java:34)
	at examples.ConsoleExample.main(ConsoleExample.java:20)

# How to recreate this issue:

With this peace of code:

ArrayList<String> ip = api.getConsole().getIPs(12, false, false);
//Scan the IP
ArrayList<ScannedNode> scanned = api.getConsole().scanIPs(ip);
				 
	for(ScannedNode scan:scanned)
		if(scan.getSuccessRate() >= 70) {
			//if the success rate is bigger or equals 70 then transfer trojan
			TransferResult transfer = api.getConsole().transferTrojanTo(scan);
			if(transfer.getSuccess()){
			         // if transfer is successfull
				System.out.println("Got $" + transfer.getMoneyAmount());
				System.out.println("Gained " + transfer.getRepGained() + " rep.");
			}			   
		}

API Version:

Current API Version

Need help with looping and getIPs()

i tried to loop the console command but after 4 loops it gave error
java.io.FileNotFoundException: https://api.vhack.cc/v/8/vh_network***
Exception in thread "main" java.lang.NullPointerException
at me.checkium.vhackapi.Utils.JSONRequest(Utils.java:43)
at me.checkium.vhackapi.console.Console.getIP(Console.java:41)
at console.console.main(console.java:15)
Also how do i implement getIPs? tried but no luck.

JSON Exception

Exception in thread "main" org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1] at org.json.JSONTokener.syntaxError(JSONTokener.java:451) at org.json.JSONObject.<init>(JSONObject.java:195) at org.json.JSONObject.<init>(JSONObject.java:319) at me.checkium.vhackapi.vHackAPI.getStats(vHackAPI.java:52) at me.checkium.vhackapi.vHackAPI.<init>(vHackAPI.java:81) at me.checkium.vhackapi.vHackAPIBuilder.getAPI(vHackAPIBuilder.java:55) at examples.ConsoleExample.main(ConsoleExample.java:11)
I"m new to java and coding in general and would like to know where I'm going wrong and what to do with regards to getting this compiled and working.

Noob question

How do you use this? Thanks in advance and sorry for the question.

Multiple instances?

Can (may) I run it on multiple instance? I think I got banned, it says "Connection refused". Do you know any restriction on the API?

Check my upgrade level

Is there any way to see my current upgrade levels? (SDK, AV, fw, etc)
I want my bot to do automatic upgrades, and possibly raising the scanning threshold automatically (e.g. only attack nodes with av level < my sdk level)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.