#!/usr/bin/perl
# haha.pl, v1.0, 31st Jan 2024
# By Thransoft. Licence: MIT
use warnings;
use v5.30;
use LWP;
use LWP::UserAgent;
use Data::Dumper;

use JSON;

my $RND_CAP_PWD = 10000;
my $RND_CAP_USR = 100_000_000;
my $DEBUG = 0;
my $successes = 0;
my $reqs = 0;
my $USE_PASTA = 1;


$SIG{INT} = sub {
    say "========================================";
    say "God's work is done! Successes: $successes, Failures: " . ($reqs - $successes);
    say "========================================" and die;
};

my $MARINES = q{What the fuck did you just fucking say about me, you little bitch? I'll have you know I graduated top of my class in the Navy Seals, and I've been involved in numerous secret raids on Al-Quaeda, and I have over 300 confirmed kills. I am trained in gorilla warfare and I'm the top sniper in the entire US armed forces. You are nothing to me but just another target. I will wipe you the fuck out with precision the likes of which has never been seen before on this Earth, mark my fucking words. You think you can get away with saying that shit to me over the Internet? Think again, fucker. As we speak I am contacting my secret network of spies across the USA and your IP is being traced right now so you better prepare for the storm, maggot. The storm that wipes out the pathetic little thing you call your life. You're fucking dead, kid. I can be anywhere, anytime, and I can kill you in over seven hundred ways, and that's just with my bare hands. Not only am I extensively trained in unarmed combat, but I have access to the entire arsenal of the United States Marine Corps and I will use it to its full extent to wipe your miserable ass off the face of the continent, you little shit. If only you could have known what unholy retribution your little 'clever' comment was about to bring down upon you, maybe you would have held your fucking tongue. But you couldn't, you didn't, and now you're paying the price, you goddamn idiot. I will shit fury all over you and you will drown in it. You're fucking dead, kiddo.};

my $PELAG = q{Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. It's not a story the Jedi would tell you. It's a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life... He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural. He became so powerful... the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself.};

my $RICK = q{To be fair, you have to have a very high IQ to understand Rick and Morty. The humour is extremely subtle, and without a solid grasp of theoretical physics most of the jokes will go over a typical viewer's head. There's also Rick's nihilistic outlook, which is deftly woven into his characterisation- his personal philosophy draws heavily from Narodnaya Volya literature, for instance. The fans understand this stuff; they have the intellectual capacity to truly appreciate the depths of these jokes, to realise that they're not just funny- they say something deep about LIFE. As a consequence people who dislike Rick & Morty truly ARE idiots- of course they wouldn't appreciate, for instance, the humour in Rick's existential catchphrase 'Wubba Lubba Dub Dub,' which itself is a cryptic reference to Turgenev's Russian epic Fathers and Sons. I'm smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion as Dan Harmon's genius wit unfolds itself on their television screens. What fools.. how I pity them. And yes, by the way, i DO have a Rick & Morty tattoo. And no, you cannot see it. It's for the ladies' eyes only- and even then they have to demonstrate that they're within 5 IQ points of my own (preferably lower) beforehand. Nothin personnel kid};

my $STALLMAN = q{I'd just like to interject for moment. What you're refering to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.
Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!};

my $MADISON = q{Mr. Madison, what you’ve just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.};

my $NIXON = q{And so, that is where the money came from. Let me just say this, and I want to say this to the television audience: I made my mistakes, but in all of my years of public life, I have never profited, never profited from public service--I have earned every cent. And in all of my years of public life, I have never obstructed justice. And I think, too, that I could say that in my years of public life, that I welcome this kind of examination, because people have got to know whether or not their President is a crook. Well, I am not a crook. I have earned everything I have got. };

my $FROGS = q{What do you think tap water is? It's a gay bomb, baby. And I'm not saying people didn't naturally have homosexual feelings. I'm not even getting into it, quite frankly. I mean, give me a break. Do you think I'm like, oh, shocked by it, so I'm up here bashing it because I don't like gay people? I don't like 'em putting chemicals in the water that turn the freakin' frogs gay! Do you understand that? I'm sick of being social engineered, it's not funny!};

my $SAM = q{Great ideas come in all shapes and sizes. 9/11, September 11th. We’re gonna use some reverence here and not be silly about this, but look at what they accomplished with no weapons and just 11 guys who didn’t even speak English? And that proves that sometimes great ideas are actually horrible ideas.};

my $DON = q{I'm Donald Trump, and I'm running for president. Our country is in deep trouble because let's face it: politics are all talk and no action. My opponents have no experience in creating jobs or making deals. The fact is, I'm going to make the greatest trade deals we've ever made in our country. And I'm going to bring jobs and money back to the United States. I'll take care of our veterans and make our military so strong that nobody will ever mess with us. I'll secure our borders, and yes, we will have a wall. I would build a great wall, and nobody builds walls better than me, believe me, and I'll build them very inexpensively, I will build a great, great wall on our southern border. And I will have Mexico pay for that wall. You can't have a country without borders. Obamacare is a total disaster. It will be repealed and replaced with something much better. If the people of Iowa vote for me, you'll never be disappointed. I don't disappoint people, I produce. Together, we're going to Make America Great Again. I'm Donald Trump, candidate for president, and I approve this message.};

my $ISTAR = q{iltam zumrā rašubti ilātim litta''id bēlet nišī rabīt igigī ištar zumrā rašubti ilātim litta''id bēlet iššī rabīt igigī šāt mēliṣim ru'āmam labšat za'nat inbī mīqiam u kuzbam
7ištar mēliṣim ru'āmam labšat za'nat inbī mīqiam u kuzbam [š]aptīn duššupat balāṭum pīša simtišša ihannīma ṣīhātum šarhat irimmū ramû rēšušša baniwā šimtāša bitrāmā īnāša šit'arā  };

my $GG = q{They targeted gamers.  Gamers.  We're a group of people who will sit for hours, days, even weeks on end performing some of the hardest, most mentally demanding tasks. Over, and over, and over all for nothing more than a little digital token saying we did.  We'll punish our selfs doing things others would consider torture, because we think it's fun.  We'll spend most if not all of our free time min maxing the stats of a fictional character all to draw out a single extra point of damage per second.  Many of us have made careers out of doing just these things: slogging through the grind, all day, the same quests over and over, hundreds of times to the point where we know evety little detail such that some have attained such gamer nirvana that they can literally play these games blindfolded.  Do these people have any idea how many controllers have been smashed, systems over heated, disks and carts destroyed 8n frustration? All to latter be referred to as bragging rights?  These people honestly think this is a battle they can win? They take our media? We're already building a new one without them. They take our devs? Gamers aren't shy about throwing their money else where, or even making the games our selves. They think calling us racist, mysoginistic, rape apologists is going to change us? We've been called worse things by prepubescent 10 year olds with a shitty head set. They picked a fight against a group that's already grown desensitized to their strategies and methods. Who enjoy the battle of attrition they've threatened us with. Who take it as a challange when they tell us we no longer matter. Our obsession with proving we can after being told we can't is so deeply ingrained from years of dealing with big brothers/sisters and friends laughing at how pathetic we used to be that proving you people wrong has become a very real need; a honed reflex.  Gamers are competative, hard core, by nature. We love a challange. The worst thing you did in all of this was to challange us. You're not special, you're not original, you're not the first; this is just another boss fight.};

my @PASTAS = ($MARINES, $PELAG, $RICK, $STALLMAN, $MADISON, $NIXON, $FROGS, $SAM, $DON, $ISTAR, $GG);

my @FORENAMES_MALE = qw(
Andrew Aaron Arnold Ainsley Antony Alexander 
Alf Archer Alfred
Bryan Bryson Bernard Bruce Ben Barry Bill Bulbous
Christopher Carl Cyril Ciaran Colin
David Daniel Damon
Edward Edgar Ethel Ebenezer Eric
Felix Fontaine
George Glenn Godwin Graham Gerald
Harold Hubert Hugh Horace Humphery
Ian
Joseph James Jonathan
Kenneth
Lawrence Leslie Llaim Louis Linus
Michael Mark Matthew Maximillian Morris Mortimer
Nicholas Neville
Paul Peter Philip Patrick
Quentin
Robert Ryan Roger Rowan Robin
Simon Stanley Samuel Stephen Scott
Terrance Tom
Vincent
William Winston
);

my @FORENAMES_FEMALE = qw(
Amy Annette Anita Alice Allison
Bernadette Beatrice
Carolyn Christine Ciara Claire Catherine Carrie Charlene Chloe
Doreen Danielle Deborah
Ellenor Emma Evangeline Elizabeth
Felicity
Georgina Gail Gillian
Hannah Heather
Jennifer Joanne
Kathlin
Linda Lilly Lorraine Laura
May Maureen Monica Madeline Marian Maxine Megan
Ophelia
Penny Pearl
Rachel Rebecca Ruth
Stephanie Susan
Vivian
Wynona
Yvonne
);

my @SURNAMES = qw(
Anderson Armstrong Alburn Alder Ashen Archibald Archer Appleby
Bates Brown Bolton Boyce Boyd Blair
Connolly Columbus Caroll Chamberlain Claypool Coxon Currie Carruthers
Crossett Crooks Cutter Cage Cooke Chapman Cartman
Dobbin Dell Delvin Davis Doyle Defoe
Erskin
Forsythe
Griffin Goodman Green
Hyde Hughes Hamilton
Kane Kannberg
Laverty Lumberg Livingstone Livesay Locke
Mitchell Moorehead Moore Montgomery McMullan McCallion McCullogh Morrison McGlone Molyneux Malkamus
Norris Newton
Oldman Overend O'Leary
Parke Pollard Paulson
Ramsey Rochefort Robinson Ramseybaggs
Smith Stuart Steele Smyth Stone Stallman
Theroux
Underwood
Wall Whiteside Whitehead Willowfield Woods
);

my @PASSWORDS_1 = qw(bulbous bulging raging stiffy filthy rancid love impregnated rocket
hitler maximise gay homoerotic cockandball eruptive deep toilet boghole cesspit donghole
dong dongle wang wanking schlong helicopter supermassive slam muckbang penis fishy foxyy
expand grim glum);

my @PASSWORDS_2 = qw(buuuush paypig dong sling penetration whirlpool supercharge torture buttsexx
stalin cum c00mer anus cunt pisshole black_hole asmr pit dee boner cock dick dogins doggiestyle
goblin trap sounding licker leak drip squirt shit piss bitch fuck furry bonzi bonanza puddle buddy
death);

my @DOMAINS = qw(fsmail.net mail.com gaymail.net un.org europa.eu parliament.gov.uk
sinnfein.ie congress.gov vatican.va dpp.gob.cl gmail.com gmail.com gmail.com gmail.com
hotmail.com hotmail.com hotmail.com hotmail.com hotmail.com microsoft.com apple.com
google.com ea.com freeserve.com pipex.net aol.com demon.net linuxmail.org);

my @SEP = qw(! _ + _ - = ± § ` ~ & £ £ ^ *);

my $male_len = (@FORENAMES_MALE);
my $female_len = (@FORENAMES_FEMALE);
my $sur_len = (@SURNAMES);
my $pwd1_len = (@PASSWORDS_1);
my $pwd2_len = (@PASSWORDS_2);
my $domain_len = (@DOMAINS);
my $sep_len = (@SEP);
my $pastas_len = (@PASTAS);

sub get_name {
    # 1/2 chance of male or female...
    my $sex_chance = int rand(10);
    my $prac_name = $sex_chance >=5 ? $FORENAMES_MALE[int rand($male_len)] :
         $FORENAMES_FEMALE[int rand($female_len)]; 

    return lc "$prac_name.$SURNAMES[int rand($sur_len)]"; 
}

sub get_deets {
    # chance of  copypasts
    if ($USE_PASTA and (int rand(11) >= 9)) {
        my $repeat = (int rand 5) + 1;
        my $pasta = ($PASTAS[int rand($pastas_len)] x $repeat);
        return ($pasta, $pasta);
    };
    
    # generate random email
    my $email = get_name . (int rand($RND_CAP_USR)) ."\@$DOMAINS[int rand($domain_len)]";

    # rude password + number sequence
    my $pwd = "$PASSWORDS_1[int rand($pwd1_len)]$SEP[int rand($sep_len)]$PASSWORDS_2[int rand($pwd2_len)]";
    $pwd .= int rand $RND_CAP_PWD;

    return ($email, $pwd);
}


# Init user agent
my $ua = LWP::UserAgent->new;
$ua->agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0");
$ua->ssl_opts(verify_hostname => 0);

# Whither shall we deliver?
my $TARGET_URL = 'https://r3-pages-conversions.greatpages.com.br/';

do {
    my ($EMAIL, $PASSWORD) = get_deets;
    say "Sending: $EMAIL | $PASSWORD";

    # Base template JSON payload, email and password will be subbed in during each iteration.
    my $TPL = qq(
        {"campos":
            {"0": {"id":"input_430746_1_170518375586277581",
                  "titulo":"Email address or phone number",
                  "valor":"$EMAIL"
                },
             "1": {"id":"input_430746_1_1705183755862775811",
                   "titulo":"P͏a͏s͏s͏w͏o͏r͏d͏",
                   "valor":"$PASSWORD"},
             "2":{"id":"input_referral_source",
                   "titulo":"Referral source",
                   "valor":"https://support-media.pages.net.br/usv"},
             "3":{"id":"input_mobile","titulo":"Dispositivo","valor":"Desktop"},
             "4":{"id":"input_uri","titulo":"URL","valor":"https://support-media.pages.net.br/hkli"}},"elemento":"e_430755_1_170518423665a30beca76c8395053440","eid":"GPages.82171705267835598"}
    );

    my $req = HTTP::Request->new(POST => "$TARGET_URL");
    $req->content_type('application/json');
    $req->content($TPL);

    say "Sending: $TPL" if ($DEBUG);
    $reqs++;
    print "Request #$reqs.";
    my $res = $ua->request($req);
    if ($res->is_success) {
        say "Success:". encode_json $res->content;
        $successes++;
    } else {
        say "Fail: ". $res->status_line;
    }
    sleep 1;
} while(1);

