haterapps / fake-data

Fake Data - A form filler you won't hate
39 stars 2 forks source link

[FEATURE] Add Email DOT and PLUS options + Logs of generated data #7

Closed ghost closed 3 years ago

ghost commented 3 years ago

Add email DOT and PLUS options since so many site allow us to register as much account as we want by using one email DOT ( . ) OR PLUS ( + ) trick Example i can register many accounts on mega.nz by 1 gmail account using dot trick.

So i want you add a option instantly in which we give our gmail and when it generate email its randomly added dot between it i give example below: OUR EMAIL GIVEN TO FAKE DATA: johndoe393@gmail.com

and now when we generate email its should be like below: joh.ndoe393@gmail.com johnd.oe393@gmail.com jo.hndoe3.93@gmail.com

randomly DOTs added more about if you don't get means see this link: https://missingtricks.net/gmail-dot/ and so on also a option where they keeps logs of generated so we dont see duplicates whenever we generate

2nd Add Data logs of generated data in FAKE DATA like 7 days or 30 days log which delete after our selected period of time logs like below:

[fieldname]domain@mail.com TIME&DATE URL:example.com [fieldname]12345 TIME&DATE URL:example.com

I know 2nd option bit complicated but try to add first one as soon as possible

haterapps commented 3 years ago

Hello,

For the first request, you can do this with the following custom code inside the email generator:

var email = "your.email@gmail.com";

var email_split = email.split('@');
var result_email = '';

for (var i = 0; i < email_split[0].length; i++) {
    if (email_split[0][i] == '.') continue;

    if (i != 0) {
        result_email += Math.floor(Math.random() * 2) ? '.' : '';
    }

    result_email += email_split[0][i];
}

return result_email+'@'+email_split[1];

Or if you want both dots (.) and plus (+) sign:

var email = "your.email@gmail.com";

var email_split = email.split('@');
var result_email = '';

for (var i = 0; i < email_split[0].length; i++) {
    if (email_split[0][i] == '.') continue;

    if (i != 0) {
        result_email += Math.floor(Math.random() * 2) ? '.' : '';
    }

    result_email += email_split[0][i];
}

var min = 10000;
var max = 99990;
var rand = Math.floor(Math.random() * (max - min + 1)) + min;

return result_email+'+fakedata'+rand+'@'+email_split[1];

For the second request, I will have to think about it, to see if I can find a way to implement it and make it useful and easy to use, and without consuming a lot of storage, which is very limited on extensions. No promises though.

ghost commented 3 years ago

Thank You, You always helped whenever feature etc i needed, Sure take time