Creating Generator Scripts

Creating Generator Scripts
0

#1

Hi, I found some websites online that offer Free Robux or Free PSN Codes and stuff. So, apparently I found that these sites are fake and probably a scam.

I just wanted to know on which platform they work. I sensed some PHP and JS but I am not a coder. Can you help me out?


#2

They could be (backend) using absolutely any programming language, it is impossible for for us to know as each site is a unique thing and we can’t see it - sorry to be a bit blunt, but it’s like you saying “I saw an animal today, can you tell me what type of animal it was?”. That question can’t be answered, we need more context. Frontend, for any scripting it has to be JS as that’s the only thing it can be. If there’s no scripting, then no programming language, just HTML/CSS (possibly generated by the backend).


#3

Yes, I was a little vague about the description but I don’t know much about coding and stuff. I am actually trying to figure out how much cost it would take to develop such websites.


#4

You can’t figure out these generators cost because it depends on the developer how much he or she will charge. But if you share some website, then I’ll try to find out which platform they are using.


#5

Okay! So I came across a few fake generators actually. But I found this website to be having both generators and guides. I figured out that the main CMS is WordPress but I am not sure about the generators on this site.


#6

It just grabs some random characters from a string and concats them.

function makeId(length) {
  var text = "";
  var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  for (var i = 0; i < length; i++)
    text += possible.charAt(Math.floor(Math.random() * possible.length));
  return text
}
function generateUserEmailPassword() {
  const email = makeId(4) + "-" + makeId(4) + "-" + makeId(4) + "-" + makeId(4);
  const passwordField = makeId(4) + "-" + makeId(4) + "-" + makeId(4) + "-" + makeId(4);
  console.log('email', email, 'passwordField', passwordField)
}

generateUserEmailPassword();

Full version, there is some setInterval nonsense here as well.

Summary
https://prizelava.com/wp-content/cache/min/1/df563c74113e35873fe3ff19a0ae0490.js

function initGenerator() {
  function makeId(length) {
    var text = '';
    var possible =
      'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    for (var i = 0; i < length; i++)
      text += possible.charAt(Math.floor(Math.random() * possible.length));
    return text;
  }
  function generateUserEmailPassword(displayArea) {
    console.log(displayArea);
    var emailField = document.getElementById('custom-field-1');
    var passwordField = document.getElementById('custom-field-2');
    displayArea.style.height = '200px';
    emailField.innerText =
      makeId(4) + '-' + makeId(4) + '-' + makeId(4) + '-' + makeId(4);
    passwordField.innerText =
      makeId(4) + '-' + makeId(4) + '-' + makeId(4) + '-' + makeId(4);
  }
  function startLoading(ctx) {
    var displayArea = document.getElementById('custom-user-data-area');
    var elem = document.getElementById('custom-username-generator');
    var loader = document.getElementById('loader-custom');
    var loadingPercentage = elem.children[0];
    var current = 0;
    var duration = 59;
    displayArea.style.height = '0px';
    loadingPercentage.innerText = '0%';
    loadingPercentage.style.color = 'black';
    loader.style.animationDuration = duration + 's';
    ctx.style.display = 'none';
    loader.classList.add('animation-loader-custom');
    var interval = setInterval(function() {
      current += 1;
      loadingPercentage.innerText = current + '%';
      loader.style.width = current + '%';
      if (current >= 100) {
        clearInterval(interval);
        generateUserEmailPassword(displayArea);
        ctx.style.display = 'inline';
        loader.style.width = '100%';
        loader.classList.remove('animation-loader-custom');
      } else if (current >= 48) {
        loadingPercentage.style.color = 'white';
      }
    }, duration * 10);
  }
  document
    .getElementById('generator-button')
    .addEventListener('click', function() {
      startLoading(this);
    });
}
document.addEventListener('DOMContentLoaded', function(event) {
  initGenerator();
});

Anyway, that link should/might probably be seen as spam I would think.


#7

Thanks for this :smile:


#8

How would you identify the website if you’d mark it as spam. I mean, you got the script code by checking the site only, no?