Moving checking EP to localhost (v3 is port in hex)
@@ -63,16 +63,19 @@
.line 508
new-instance v1, Lch/boye/httpclientandroidlib/HttpHost;
- const-string v2, "www.vionika.com"
+ #const-string v2, "www.vionika.com"
+ const-string v2, "localhost"
- const/16 v3, 0x50
+ #const/16 v3, 0x50
+ const/16 v3, 0x1F40
invoke-direct {v1, v2, v3}, Lch/boye/httpclientandroidlib/HttpHost;-><init>(Ljava/lang/String;I)V
.line 510
new-instance v2, Lch/boye/httpclientandroidlib/client/methods/HttpPost;
- const-string v3, "http://www.vionika.com/services/examine/domain"
+# const-string v3, "http://www.vionika.com/services/examine/domain"
+ const-string v3, "http://localhost:8000/check"
Delete the catch. Now if the localhost server is down (or bugging) each query will crash the app (on navigation).
So default is to crash unless we get valid JSON response.
@@ -145,7 +148,7 @@
invoke-virtual {v0, v1, v2, v3}, Lch/boye/httpclientandroidlib/impl/client/DefaultHttpClient;->execute(Lch/boye/httpclientandroidlib/HttpHost;Lch/boye/httpclientandroidlib/HttpRequest;Lch/boye/httpclientandroidlib/client/ResponseHandler;)Ljava/lang/Object;
:try_end_1
- .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
+# Fail if not online .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
.catch Ljava/security/KeyManagementException; {:try_start_1 .. :try_end_1} :catch_3
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_2
.catch Ljava/io/UnsupportedEncodingException; {:try_start_1 .. :try_end_1} :catch_1
Reversed flow: