Libraryless. Compilation Failed (3080L/21K).
1 | !7 |
2 | |
3 | p {
|
4 | S ip = gateway(); |
5 | S url = "http://" + ip + ":7777"; |
6 | S html = loadPage(url); |
7 | |
8 | if (containsIC(html, "Phone server")) |
9 | print("Phone server running (no password)");
|
10 | else if (match("No", html)) {
|
11 | print("Phone server running, but password-protected");
|
12 | S pw = loadSecretTextFile("phone-server-password");
|
13 | if (empty(pw)) print("I have no password for the server.");
|
14 | else {
|
15 | print("Trying password.");
|
16 | S html = loadPage(url + "/" + htmlQuery(password := pw)); |
17 | if (containsIC(html, "Phone server")) |
18 | print("SUCCESS: Phone server running & I have the password!");
|
19 | else if (match("No", html))
|
20 | print("Phone server running, but I ain't got the password.");
|
21 | else |
22 | print("No idea what's up: " + html);
|
23 | } |
24 | } |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007073 |
| Snippet name: | Test if "Phone Server" is running on gateway |
| Eternal ID of this version: | #1007073/2 |
| Text MD5: | 5a2f97d36a60a0b2e72ce0228897f26d |
| Transpilation MD5: | d76f2ba68bce46ec959163808a7388bb |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-03-02 16:30:59 |
| Source code size: | 811 bytes / 25 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 647 / 769 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |