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 77import java .io .Reader ;
88import java .net .URL ;
99import java .nio .charset .Charset ;
10+ import java .security .GeneralSecurityException ;
1011import java .security .MessageDigest ;
1112import java .security .NoSuchAlgorithmException ;
1213import java .security .cert .X509Certificate ;
1314
15+ import javax .net .ssl .HttpsURLConnection ;
16+ import javax .net .ssl .SSLContext ;
1417import javax .net .ssl .TrustManager ;
1518import javax .net .ssl .X509TrustManager ;
1619
@@ -43,13 +46,13 @@ public static String readJson(Reader rd) throws IOException {
4346
4447 public static JSONObject JSONRequest (String format , String data , String php ){
4548 System .setProperty ("http.agent" , "Chrome" );
46- /* try {
49+ try {
4750 SSLContext sc = SSLContext .getInstance ("SSL" );
4851 sc .init (null , Utils .trustAllCerts , new java .security .SecureRandom ());
4952 HttpsURLConnection .setDefaultSSLSocketFactory (sc .getSocketFactory ());
5053 } catch (GeneralSecurityException e ) {
5154 }
52- */
55+
5356 JSONObject json = null ;
5457 InputStream is ;
5558 try {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public vHackAPIBuilder email(String email) {
2424 }
2525
2626 public vHackAPIBuilder register () {
27+
2728 JSONObject json = Utils .JSONRequest ("user::::pass::::email" , username + "::::" + password + "::::" + email , "vh_register.php" );
2829
2930 if (json .getString ("result" ) != "0" ) {
@@ -32,6 +33,9 @@ public vHackAPIBuilder register() {
3233 return this ;
3334 }
3435 }
36+
37+
38+
3539 public vHackAPI getAPI () {
3640
3741 vHackAPI api = new vHackAPI (username , password );
You can’t perform that action at this time.
0 commit comments