Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <div id="t"></div>
- </body>
- <script>
- function sleep(ms) {
- return new Promise(resolve => setTimeout(resolve, ms));
- }
- function makeid(length) {
- var result = '';
- var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- var charactersLength = characters.length;
- for ( var i = 0; i < length; i++ ) {
- result += characters.charAt(Math.floor(Math.random() * charactersLength));
- }
- return result;
- }
- async function create() {
- var http = new XMLHttpRequest();
- var url = 'new_account.php';
- // Sleep in loop
- while(true) {
- await sleep(500);
- var params = ''.concat('firstname=', makeid(5), "&username=", makeid(5), "&password=", makeid(5));
- http.open('POST', url, true);
- //Send the proper header information along with the request
- http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
- http.onreadystatechange = function() {//Call a function when the state changes.
- if(http.readyState == 4 && http.status == 200) {
- document.getElementById('t').innerHTML += http.responseText;
- }
- }
- http.send(params);
- await sleep(500);
- }
- }
- create();
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement