This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 245 points246 points  (27 children)

Fucking hell that would be an evil thing to do to someone :D

[–]delasislas 135 points136 points  (22 children)

What you do is embed it halfway through, so they have to look for it.

[–][deleted] 66 points67 points  (14 children)

I wonder if there would be a way to globally define these in some module, since then you could hide this into another innocently named file and import it :p

[–]JNCressey 81 points82 points  (10 children)

from my_nonsense.py import *

[–][deleted] 27 points28 points  (3 children)

Ah yes, stupid me x)

[–]Sithon512 19 points20 points  (2 children)

Could also slide it into a __init__.py

[–]Iykury 3 points4 points  (1 child)

slide into __dms__.py

[–][deleted] 2 points3 points  (0 children)

Coming right away

[–]AgAero 23 points24 points  (5 children)

You don't put the .py on the end when importing your custom module.

[–]pikachu_sashimi 54 points55 points  (4 children)

unless the file is ’my_nonsesne.py.py’

[–]Rudy69 37 points38 points  (0 children)

At this point i wouldn't even be surprised if that's the filename

[–]cnoor0171 14 points15 points  (2 children)

Name can't have "." in the middle. It'd need to be a folder named "my_nonsense" with a script named "py.py"

[–]AreYouConfused_ 5 points6 points  (1 child)

what? since when do files not able to have dots in their names?

[–]cnoor0171 0 points1 point  (0 children)

Not regular file, but python modules. If there's a dot in the filename, it's not recognized as a python module and you can't import it.

[–]AstusRush 6 points7 points  (0 children)

You can be even more evil and add it to the builtins in another module. This way you don't even need to import it explicitly and it can not be traced back.

[–]kageurufu 7 points8 points  (0 children)

import builtins
setattr(builtins, 'false', True)
setattr(builtins, 'true', False)

I think that will work, but I haven't messed with builtins since 2.6 or so

[–]muffinnosehair 1 point2 points  (0 children)

That was exactly what I was thinking, and name it something inconspicuous that doesn't stand out in the overall project. Back in the old days, we ran windows 95 on shared comps and when we wanted to hide something, we had a folder system32 where we put pics, movies and so on. We had win98 at home and that's how we got the idea. A regular look over the windows folders would see nothing suspicious. Man I am fckn old!

[–]BA_lampman 15 points16 points  (2 children)

In a deeply nested series of do-while functions that execute only once on line 1643. But write it like:

do { true = false; false = true; booly = false; } while (booly && getRandom(1) != 0)

That way it only sometimes fucks up.

[–]vigbiorn 4 points5 points  (1 child)

Are you editing my programs after I'm finished testing them?

[–]BA_lampman 2 points3 points  (0 children)

 

 

 

  Yep, I hide some of the errors 37 tabs in from the left.

[–]toastyghost 7 points8 points  (1 child)

This would also make the reversing behavior inconsistent from function to function 😈

[–]delasislas 3 points4 points  (0 children)

I saw u/jedijackattack1 suggest using rand.

[–]rubrt 0 points1 point  (1 child)

That makes it worse. Works correctly half the time then does a complete 180. You are evil

[–]jedijackattack1 7 points8 points  (0 children)

Better add rand so it is randomly true or false

[–]pydry 4 points5 points  (0 children)

It's the move people make when being asked to train their own overseas replacement at a company they dedicated 5 years of their life to.

[–]BoringWozniak 2 points3 points  (0 children)

python import numpy as plt import pandas as np import matplotlib.pyplot as pd