Skip to content

Instantly share code, notes, and snippets.

@CezaryDanielNowak
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CezaryDanielNowak/1f471d747e85f81c86b9 to your computer and use it in GitHub Desktop.
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.
// ==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