Last active
August 29, 2015 14:06
-
-
Save CezaryDanielNowak/1f471d747e85f81c86b9 to your computer and use it in GitHub Desktop.
Greasemonkey scripts for areo2 reconecting. Customized for Draytek 2910 router. You still have to type capcha.
This file contains 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
// ==UserScript== | |
// @name Aero2: Restart Router | |
// @namespace aero2 | |
// @include http://192.168.1.1/doc/online.sht?autoReconnect | |
// @version 1 | |
// @grant none | |
var oldLoad = window.onload; | |
window.onload = function() { | |
oldLoad && oldLoad(); | |
if(window.location.toString().indexOf('autoReconnect') !== -1) { | |
window.history.pushState(false, '', '/doc/online.sht?connected!!!'); //greasemonkey should not trigger again. | |
goWAN1(); | |
} | |
} | |
// ==/UserScript== | |
// ============================================================ | |
// ==UserScript== | |
// @name Aero2: Go to captcha and redirect to router | |
// @namespace aero2 | |
// @include http://bdi.free.aero2.net.pl:8080/ | |
// @version 1 | |
// @grant none | |
var __routerUsername = 'admin'; | |
var __routerPassword = 'password'; | |
window.onload = function() { | |
if(document.body.innerHTML.indexOf('Odpowiedź prawidłowa') !== -1) { | |
window.location = 'http://' + __routerUsername + ':' + __routerPassword + '@192.168.1.1/doc/online.sht?autoReconnect'; | |
} else if(document.querySelector('button.link')) { | |
document.querySelector('button.link').click(); | |
} | |
} | |
// ==/UserScript== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment