This repository was archived by the owner on Nov 24, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 7
7
import java .io .Reader ;
8
8
import java .net .URL ;
9
9
import java .nio .charset .Charset ;
10
+ import java .security .GeneralSecurityException ;
10
11
import java .security .MessageDigest ;
11
12
import java .security .NoSuchAlgorithmException ;
12
13
import java .security .cert .X509Certificate ;
13
14
15
+ import javax .net .ssl .HttpsURLConnection ;
16
+ import javax .net .ssl .SSLContext ;
14
17
import javax .net .ssl .TrustManager ;
15
18
import javax .net .ssl .X509TrustManager ;
16
19
@@ -43,13 +46,13 @@ public static String readJson(Reader rd) throws IOException {
43
46
44
47
public static JSONObject JSONRequest (String format , String data , String php ){
45
48
System .setProperty ("http.agent" , "Chrome" );
46
- /* try {
49
+ try {
47
50
SSLContext sc = SSLContext .getInstance ("SSL" );
48
51
sc .init (null , Utils .trustAllCerts , new java .security .SecureRandom ());
49
52
HttpsURLConnection .setDefaultSSLSocketFactory (sc .getSocketFactory ());
50
53
} catch (GeneralSecurityException e ) {
51
54
}
52
- */
55
+
53
56
JSONObject json = null ;
54
57
InputStream is ;
55
58
try {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public vHackAPIBuilder email(String email) {
24
24
}
25
25
26
26
public vHackAPIBuilder register () {
27
+
27
28
JSONObject json = Utils .JSONRequest ("user::::pass::::email" , username + "::::" + password + "::::" + email , "vh_register.php" );
28
29
29
30
if (json .getString ("result" ) != "0" ) {
@@ -32,6 +33,9 @@ public vHackAPIBuilder register() {
32
33
return this ;
33
34
}
34
35
}
36
+
37
+
38
+
35
39
public vHackAPI getAPI () {
36
40
37
41
vHackAPI api = new vHackAPI (username , password );
You can’t perform that action at this time.
0 commit comments