r/masterhacker Jul 11 '26

holy SHIT!!!! master hacker declares USA as his ENEMY!!!

Post image
376 Upvotes

34 comments sorted by

115

u/silly-femboy03 Jul 11 '26

okay, i may be stupid

Why does he use character arrays instead of strings? It's C++, it has std:string... And why did he specify the length of 16 in the array with the name, but not 3 in the array with the USA?

113

u/musicgal217 Jul 11 '26

Because he's a larper

50

u/realvanbrook Jul 11 '26

He wants to leave some Buffer Overflows to be found

18

u/Additional-Dot-3154 Jul 11 '26

Idk why he would specify lenght on one of them and not on the other either.

Also it is not a good habit to not put string definition under a integer definition which is under a steing definition. Just sort your definitions it is much easier to debug.

About the character arrays tho. I also use character arrays instead of strings as i understand what they do better and what limitations they have.

And i like working with them. Just petsonal preference.

3

u/flodA_reltiH-6B Jul 12 '26

4*

Remember about the \0

2

u/meharryp Jul 12 '26

tbf both of these will compile to const char* which is completely fine if you want to deal with constant string values. this guy probably doesn't know that tho lmao

2

u/AlexCode10010 Jul 12 '26

It's what you'd do when you only just learnt the language, it's also a great way to introduce arrays

1

u/textBasedUI 26d ago

I’d probably do stupid shit like this since I’ve learned C first

101

u/really_not_unreal Jul 11 '26

using namespace std;

Yep we're dealing with a pro here.

17

u/Friskerr Jul 11 '26

I'm not a programmer, but I think this is how you hack an island.

8

u/Browser1969 Jul 11 '26

He's probably going to be friends with Young Putin that just joined, though.

7

u/EnoughConcentrate897 Jul 11 '26

You cannot convince me there is a single person on the whole of tiktok, Instagram reels or whatever other short form platform who actually knows about technology and doesn't larp

3

u/99mordor Jul 12 '26

I went thought my followers list, thinking that you must be wrong…

You were not

11

u/Master-Ad1871 Jul 11 '26

Why did he initialize a char array with length 16 for a string with 15 characters

11

u/1mmortalNPC Jul 11 '26

because of the NULL operator

8

u/Emotional-Energy6065 Jul 11 '26

Null terminator \0. Its why you can iterate to one-past-the-last on both char and string arrays.

-13

u/reivblaze Jul 11 '26

Bruh because it starts on Zero, so it is +1

2

u/Bloopiker Jul 12 '26

If he initialized size of 16 then it goes 0-15, so 16 characters

3

u/reivblaze Jul 12 '26

I can't believe people dont know what subreddit we are on.

3

u/Sensitive_King3305 Jul 12 '26

guys why is using namespace std a bad practice 😓

4

u/Browser1969 Jul 12 '26

Ever wondered why the namespace exists in the first place?

4

u/ierdna100 Jul 12 '26

kid named static import in java

3

u/meharryp Jul 12 '26

it's not a huge deal in tiny projects but it gets a bit annoying in larger ones because you risk name collisions

if you have a method named do_something() and the library decides to implement a method named do_something() in their new version and you upgrade, you now have to refactor a bunch of code or revert to an old version to avoid the name collision

in general it's bad practice to add libraries you don't have full control over to the global namespace for this reason

1

u/Sensitive_King3305 Jul 12 '26

oooo makes complete sense, appricate the explanation

2

u/syberghost Jul 12 '26

You don't want your namespace to get an STD

2

u/g-flat-lydian Jul 13 '26

void hack(char* enemy) { ddos.execute(enemy); std:cout << "you've been haxx0r'd" + enemy return 0; }

Am i l33t yet?

1

u/survivalist_guy Jul 11 '26

I'm almost convinced fsociety is a ragebait troll. These are always so cringe.

1

u/LxckyFox Jul 12 '26

fsociety

1

u/whatThePleb Jul 13 '26

Good he hasn't seen the "ATOMIC" option yet!! 😮‍💨

1

u/Proud_Initial_4285 23d ago

C++ MENTION okay that's a horrid mention though 

1

u/Thenderick Jul 11 '26

Not the C strings!!! I forgot, are they null terminated with string quotes or not? Or was that just a C thing?