0

I had a chrome extension made on Freelancer, but due to an oversight of me I didn't notice that the freelancer 'forget' or just didn't think to put a variable for the email required for a task.

 var url = 'https://www.example.com/api/register/' + user;
            //var data = 'op=reg&user=' + encodeURIComponent(user) + '&passwd=' + encodeURIComponent(pass) + '&passwd2=' + encodeURIComponent(pass) + '&email=&api_type=json';
            var data = 'op=reg&dest=https://www.example.com/&user=' + encodeURIComponent(user) + '&passwd=' + encodeURIComponent(pass) + '&passwd2=' + encodeURIComponent(pass) + '&email=User12345@gmail.com&g-recaptcha-response=' + grecaptchares + '&api_type=json';
            var req = new XMLHttpRequest();
            req.onreadystatechange = function ()

'&email=User12345@example.com is now a static, and every think created gets that email as their default, and also gets a confirmation mail, which shouldn't happen.

The site doesn't require to give an email to create an account, so it can either be removed or should be a random variable.

But honestly I don't know how to procceed.

I would be delighted if someone know help me out.

1 Answers1

0

If the email really isn't required, you can remove &email=User12345@gmail.com without any problem. Just make sure you leave the apostrophe before the ampersand.

If it does end up being required, you can generate a random integer to append to the email.

function getRandomEmail() {
    const randomNumber = Math.floor(Math.random() * 200000)+1;
    return `User${randomNumber}@gmail.com`
}

Then, replace the email with a call to getRandomEmail()

&email='+getRandomEmail()+'&g-recaptcha-response

Caveat - the random email generator is limited to 200000 emails, there is a potential for the same email being generated. I don't know how much of a risk that is for you.

Trenton Trama
  • 4,890
  • 1
  • 22
  • 27