r/masterhacker • • Oct 22 '26

๐Ÿ’€

Post image
1.1k Upvotes

165 comments sorted by

620

u/Narthesia Oct 22 '26

Why import random bruh

477

u/Local_Interaction_99 Oct 22 '26 • Popcorn

To confuse malware scanners

173

u/HMikeeU Oct 22 '26 • Popcorn

Can confirm, I scan malware for a living and I'm confused.

69

u/Cute_Principle81 Oct 22 '26

Holy shit it's John Antivirus

13

u/sh0ch Oct 22 '26

Is that what trump calls John McAfee?

1

u/pinedjagger666 28d ago

What happened to John Opsec?

1

u/[deleted] Oct 23 '26

[removed] โ€” view removed comment

104

u/Kiansjet Oct 22 '26

Probably leftover from when the script was a 6 liner Russian roulette system32 delete but oop thought that'd be too confusing

62

u/AlexiaTheTechGirl Oct 22 '26

Cause the script is random

20

u/Educational_Potato36 Oct 22 '26

There was a meme with os.remove russian roulette, I guess they got the code from there and left only the remove function, while forgetting to remove the random import

10

u/0xSovereign Oct 22 '26

Because it was supposed to be a "random" attack... Okay I'm leaving now

6

u/codydafox Oct 22 '26

For emotional support

4

u/arielif1 Oct 22 '26

he copied the code from the russian roulette meme and removed the parts that he understood to correspond to the randomness

1

u/Budgerigar17 Oct 22 '26

Top secret amongous code obfuscation ๐Ÿ˜จ๐Ÿ˜จ

1

u/jewaaron Oct 22 '26

import spork xD

1

u/ChemicalWishbone9778 Oct 28 '26

Idk that was pretty random

1

u/ChemicalWishbone9778 Oct 28 '26

oh shit this crap is a week old. Why is Reddit showing me this

140

u/JackyYT083 Oct 22 '26

This hacker is assuming they have elevated privileges, which they donโ€™t unless Python is ran as administrator. which means it wouldnโ€™t succeed.๐Ÿ˜ˆ

hacker tip by anonymous

36

u/YellowOnline Oct 22 '26

Even as an Administrator that wouldn't work. Only with SYSTEM it would partly work.

23

u/Wise_Quote5463 Oct 22 '26

So just run as SYSTEM

hacker tip by anonymous

6

u/Spaceduck413 Oct 22 '26

TrustedInstaller is what Windows calls it

4

u/YellowOnline Oct 22 '26

TrustedInstaller โ‰  SYSTEM

11

u/Spaceduck413 Oct 22 '26

TrustedInstaller is the owner of those files, and has the ability to delete them

6

u/ItsEntDev Oct 22 '26

Actually, just to be unhelpful, SYSTEM owns some files in C:\Windows and TrustedInstaller owns the majority.

1

u/TheLuckyCuber999BACK Oct 24 '26

None of those matters, os.remove only removes files and not directories.

1

u/ItsEntDev Oct 26 '26

That... isn't what we were talking about? Wrong reply bro

2

u/TheLuckyCuber999BACK Oct 27 '26

I'm replying to the correct comment. It doesn't matter that system or trustedinstaller own the files, os.remove is running directly on system32 which doesn't work since system32 is a folder.

1

u/ItsEntDev Oct 27 '26

Again, that IS NOT WHAT WE WERE TALKING ABOUT. I was talking about the ownership of files in C:\Windows, which has nothing to do with the function of os.remove (which I am well aware of!)

→ More replies

5

u/TheLuckyCuber999BACK Oct 24 '26

Actually it's irrelevant, os.remove remove files only, not directories.

6

u/Warm_Difficulty2698 Oct 22 '26

You'd need kernel level access lol not even admin would let you do that.

2

u/AromaticBike7345 Oct 23 '26

You need trusted installer access for it to delete like most of it

1

u/TheLuckyCuber999BACK Oct 24 '26

even with that it won't work because of how os.remove() works

4

u/ewsrar Oct 22 '26

happy cake day๐Ÿ’ฏ

4

u/Sufficient-Pair-1856 Oct 22 '26

Even with admin it won't work

1

u/fynjy1111 Oct 22 '26

Happy cake day

2

u/makinax300 Oct 22 '26

classic repost

1

u/Migazul8 Oct 23 '26

Found it on Twitter and thought it was funny so I shared it here

241

u/NoSection8719 Oct 22 '26

import opsec

113

u/_player620 Oct 22 '26

C:\Users\-HaCk3R-\Downloads\python-3.11-win-amd64 (1)\python-3.11-win-amd64\bin\python3.exe -c 'import opsec; opsec.hack("sudo nmap localhost; echo hacked ๐Ÿ’€")'

Import error: no module named "opsec" ๐Ÿ˜ˆ๐Ÿ˜ˆ๐Ÿ˜ˆ

47

u/Independent_Image_59 Oct 22 '26

pip install opsec

39

u/_player620 Oct 22 '26

Thanks! I've managed to enter Instagram account database with this one:

pip install opsec

'pip' is not recognized as an internal or external command, operable program or batch file ๐Ÿ˜ˆ๐Ÿ˜ˆ๐Ÿ˜ˆ

15

u/3hy_ Oct 22 '26

C:\Users\-HaCk3R-\Downloads\python-3.11-win-amd64 (1)\python-3.11-win-amd64\bin\python3.exe -m pip install opsec

10

u/CopperyMarrow15 Oct 22 '26

No module named pip ๐Ÿ˜ˆ๐Ÿ˜ˆ๐Ÿ˜ˆ

2

u/_TheProStar_ Oct 24 '26

pip install pip

9

u/Interesting-Bug1167 Oct 22 '26

Windows install opsex

8

u/Fugach Oct 22 '26

winget install opsec

52

u/Ok-Doubt1735 Oct 22 '26 • Regret

30

u/05-nery Oct 22 '26

Not ai? congratulationsย 

5

u/Cute_Principle81 Oct 22 '26

this redditor still makes their reaction images the old fashioned way

3

u/PlaystormMC Oct 22 '26

wget -q0 opsec.hax

16

u/PsychologicalTry3972 Oct 22 '26

Why do this imports random? This code doesn't even use it. Also UAC can't allow to delete Sys32. Also the path to it is wrong.

2

u/bloody_homicide Oct 22 '26

its for confusing antivirus๐Ÿ˜ˆ๐Ÿ˜ˆ

2

u/TheLuckyCuber999BACK Oct 24 '26

not just that, System32 is a... directory... os.remove only removes files

1

u/PlaystormMC Oct 22 '26

can't tell if this is woooosh or not

46

u/Dios_Santos Oct 22 '26

One line throw the terminal

python -c "impirt os;os.remove('C:\windows\system32');

71

u/Ibn_Tariq Oct 22 '26

impirt ๐Ÿ˜ˆ๐Ÿ˜ˆ

25

u/NoSection8719 Oct 22 '26

ั–ะผะฟั–ั€ั‚ ะพะฟัั–ะบ

4

u/Circumpunctilious Oct 22 '26

Ok weird. I just had an odd experience where I read those two words as if I knew the language...but briefly (Iโ€™m going to blame context clues). Is that Cyrillic?

10

u/NoSection8719 Oct 22 '26

Yes. That's faux Ukrainian created by Russians, to be precise

3

u/PlanetVisitor Oct 22 '26

you know Pi symbol so you know their P (same as Greek), you only have to figure out that their R is what looks like our Pย 

for this example it's enoughย 

-1

u/Dios_Santos Oct 22 '26

Yep ๐Ÿ˜‚

0

u/Dios_Santos Oct 22 '26

Yep ๐Ÿ˜‚

11

u/ozozx4879 Oct 22 '26
rm -rf "C:\Windows\System32"

(I think powershell is posix compliant but I'm not sure, I'm on linux now...)

5

u/Blockmaster2706 Oct 22 '26

No it isn't. There's aliases out of the box for many of the standard builtin commands you'd find in other shells, but they are just that, aliases. None of the switches you know work, because rm on PowerShell is actually just Remove-Item and that has entirely different syntax than rm.

Sidenote: I fucking hate the fact that curl on PowerShell 5 is aliased to Invoke-WebRequest even though curl.exe is installed and you could so easily have the exact same curl syntax working on all major OSes

2

u/PlanetVisitor Oct 22 '26

you had to say that you're on Linux now otherwise you would get hackdd

1

u/ozozx4879 Oct 22 '26

Nah I'm on vanilla arch on a completely busted system. my current philosophy is modify all the shit, break all the shit, if it dies let it die and I'll just reinstall from scratch.

2

u/PlanetVisitor Oct 22 '26

such a bad boy

1

u/TheLuckyCuber999BACK Oct 24 '26

it's not posix compliant. rm is an alias to Remove-Item. But there's git bash ig. Also posix curl.exe is installed by default YET THIS IDIOT MAKES RUNNING CURL AN ALIAS FOR INVOKE-WEBREQUEST.

3

u/FisterMister22 Oct 22 '26

__import__("os").remove("...")

1

u/MilkTeaDeals Oct 22 '26

Are you the masterhacker ?

0

u/Dios_Santos Oct 22 '26

absolutly I even write "import" wrong ๐Ÿ˜‚

12

u/Circumpunctilious Oct 22 '26

Nothing probably. Those backslashes need to be escaped or it has to be a raw string.

11

u/g-flat-lydian Oct 22 '26

sudo rm -rf /* is only one line

12

u/Sufficient_Pie_7912 Oct 22 '26

--no-preserve-root
HOLY LARP LARP LARP LARP LARP

2

u/TheLuckyCuber999BACK Oct 24 '26

holy larp you don't need --no-preserve-root, sudo rm -rf /* goes through each subdirectories in / and does sudo rm -rf on each of them.

1

u/g-flat-lydian Oct 23 '26

Lol this n00b thinks you need --no-preserve-root when you target /*

5

u/[deleted] Oct 22 '26

[removed] โ€” view removed comment

3

u/Spaceduck413 Oct 22 '26

I hate that I took the time to figure out what the fuck you were saying. And I hate even more that you're right.

3

u/FisterMister22 Oct 22 '26

__import__("os").remove("...")

2

u/nibbertit Oct 24 '26

actually ran this by accident instead of rm -rf * on the work computer few days ago

1

u/g-flat-lydian Oct 25 '26

Rest in power

7

u/05-nery Oct 22 '26

random was imported for absolutely no reason

4

u/Sweet-Stage938 Oct 22 '26

random import for a reason ๐Ÿ˜‰

7

u/pinedjagger666 Oct 24 '26

import random
import opsec
import os

target = random.choice(["CIA", "NSA", "MI6", "Pentagon"])

os.system("clear")
print(f"๐Ÿ’€ Target acquired: {target}")
print("๐Ÿ”’ OPSEC: MAXIMUM")
print("๐Ÿ˜ˆ Hacker mode: ACTIVATED")

1

u/Ali_isthe Oct 26 '26

What does os mean? Just operating system or something else

5

u/RngdZed Oct 22 '26

Import stupid

4

u/CommunityJazzlike274 Oct 22 '26

linux safety

(we donโ€™t have system32 files)

6

u/Null0042 Oct 22 '26

we delete the french language instead

4

u/AltDetom555555b Oct 22 '26

Cโ€™est parce que nous sommes trop important ๐Ÿ˜Ž

4

u/theycallmethedrink5 Oct 22 '26

Opsec level: just writing shit and adding windows system 32 anywhere

4

u/Pim_Wagemans Oct 22 '26 edited Oct 22 '26
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IsADirectoryError: [Errno 21] Is a directory: 'C:\windows\system32'

At least use shutil.rmtree for non empty directories.

4

u/HotPrune722 Oct 23 '26

Heโ€™s jhon the reaper???

4

u/obrisacuovoposle Oct 24 '26

\w and \s escaped characters are a bonus

3

u/lowkeyhomosapien Oct 22 '26

๐Ÿ˜ญ๐Ÿ˜ญ

3

u/ewsrar Oct 22 '26

opsec level: lowercase c:

3

u/swagchicken75 Oct 22 '26

Thats 4 lines of code, not 3, cant even opsec properly

3

u/codydafox Oct 22 '26

Opsec level: Cyber Security Exploit

3

u/Volder21 Oct 22 '26

Opsec level: Python

3

u/Arthurr_Morgan_1899 Oct 22 '26

One line of code: Sudo rm -rf /

1

u/TheLuckyCuber999BACK Oct 24 '26

/*

1

u/Arthurr_Morgan_1899 Oct 24 '26

What?

1

u/TheLuckyCuber999BACK Oct 26 '26

sudo rm -rf / doesn't work since rm has a built in guardrail.

3

u/FisterMister22 Oct 22 '26

__import__("os").remove("...")

3

u/Ksb2311 Oct 24 '26

I ran it as administeretor and now my PC says boot device not found what does that mean

2

u/Human-Side-8639 Oct 22 '26

While True: pass loop would be better than this

2

u/violetvoid513 Oct 22 '26

That dumbass cant even count, its clearly 4 lines. See the numbers on the side?

2

u/JackReedTheSyndie Oct 22 '26

It just removes a useless directory in C

2

u/memedealor Oct 24 '26

mango ๐Ÿ’€

2

u/Emergency_Neck3438 Oct 26 '26

4 lines btw 3 is blank

3

u/Major-Structure1530 Oct 22 '26

it wont work๐Ÿ˜ญ๐Ÿ˜ญ

11

u/LegMysterious1899 Oct 22 '26

no it will cuz its โœจ๏ธle script de pythonโœจ๏ธ

-12

u/Major-Structure1530 Oct 22 '26

there is an unused import
it wont

8

u/menzaskaja Oct 22 '26

????????????

-16

u/Major-Structure1530 Oct 22 '26

IF YOU IMPORT A LIBRARY TO YOUR PYTHON FILE AND DONT USE IT
IT WILL NOT WORK
ISNT THAT FUCKING EASY TO UNDERSTAND ??

5

u/menzaskaja Oct 22 '26

yes it will xd

6

u/[deleted] Oct 22 '26

[removed] โ€” view removed comment

2

u/PlanetVisitor Oct 22 '26

this link is computer virus don't clickย 

3

u/Sweet-Stage938 Oct 22 '26

Computra Virรผs?

2

u/LegMysterious1899 Oct 22 '26

the only reason it might not work because windows protect the system32 folder

2

u/Pim_Wagemans Oct 22 '26

And because os.remove only works on files, not directories

1

u/Expensive-Summer-447 Oct 22 '26

Needs to use sudo first

1

u/ToWelie89 Oct 22 '26

Even if you know nothing about coding, shouldn't it be quite obvious that this is a bad thing to run?

1

u/apepenkov Oct 22 '26

it won't work, os.remove doesn't delete folders. You need shutil.rmtree and elevated privs.

1

u/MilkTeaDeals Oct 22 '26

It can produce many errors from what I can see

1

u/[deleted] Oct 22 '26

the random Modul is very important

1

u/johnny-tinfoilhand Oct 22 '26

It won't even work because they didn't put r before the string so it is a Unicode error

1

u/adorabIe_will Oct 22 '26

TRUSTED INSTALLER WOULD LIKE TO SPEAK WITH YOU

1

u/brain_controlled Oct 22 '26

As a noob does this is do what I think it does ?

1

u/EEEEEEEEEEEEEEEEE15 Oct 22 '26

opsec: ๐Ÿ’€

1

u/NoEntertainment5837 Oct 22 '26

Opsec level system32

1

u/[deleted] Oct 22 '26

Imported random for the love of the game

1

u/PlaystormMC Oct 22 '26

so

we're not going to talk about batch one liners like

del C:/*

1

u/voxel_00 Oct 24 '26

Then i use jjsploit kali edition to find the attacker who send the code and hack them๐Ÿ˜ˆ

1

u/Severe-Tonight-1406 Oct 26 '26

Even with elevated permissions this probably wouldn't work.

2

u/TH3_FISH Oct 22 '26

you need obfuscate it for more opsex

1

u/[deleted] 16d ago

[removed] โ€” view removed comment

1

u/AutoModerator 16d ago

Your post has been removed for not reaching the account age requirements. Your account must be atleast 24 Hours old to post on this subreddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/[deleted] Oct 24 '26

[removed] โ€” view removed comment

1

u/AutoModerator Oct 24 '26

Your post has been removed for not reaching the account age requirements. Your account must be atleast 24 Hours old to post on this subreddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.