Skip to content

Commit 5a7a646

Browse files
Explain why it's closed-source
1 parent baa77eb commit 5a7a646

3 files changed

Lines changed: 57 additions & 1 deletion

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
## Table of Contents
77
1. What is ProcessRoulette?
88
2. Warning
9+
3. Why it's closed-source
910

1011
---
1112

@@ -16,3 +17,8 @@ ProcessRoulette is a (dangerous) game implemented in C. It takes the concept of
1617

1718
## 2. Warning
1819
**This is a dangerous program. It has the ability to send SIGSTOP to random processes of your user.** ***It is expected that you know the risks and play with caution.***
20+
21+
---
22+
23+
## 3. Why it's closed-source
24+
Having the source of a program that posesses malware-like behavior public wouldn't be very smart. So it's private.

Read-All.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env python3
2+
import pyperclip as clip
3+
import os
4+
5+
def main():
6+
struct = []
7+
allowed = [
8+
"txt",
9+
"py",
10+
"json",
11+
"c",
12+
"cpp",
13+
"sh",
14+
"h"
15+
]
16+
curr = os.path.abspath(__file__)
17+
dir_of_curr = os.path.dirname(curr)
18+
19+
for dirpath, _, filenames in os.walk(os.getcwd()):
20+
print(f"Entering \"{dirpath}\"\n")
21+
for fname in filenames:
22+
is_allowed = True
23+
tname = fname.split('.', 1)[-1].lower()
24+
if not tname in allowed:
25+
print(f"Skipped unallowed file \"{tname}\"")
26+
is_allowed = False
27+
path = os.path.abspath(os.path.join(dirpath, fname))
28+
relpath = os.path.relpath(path, dir_of_curr)
29+
if path != curr:
30+
a = None
31+
if not is_allowed:
32+
a = "[{skipped}]"
33+
else:
34+
try:
35+
with open(path, 'r', encoding="utf-8") as f:
36+
a = f.read()
37+
if a.strip() == "":
38+
a = "[{empty}]"
39+
except Exception:
40+
a = "[{unreadable}]"
41+
42+
struct.append(f"{relpath}:\n{a}")
43+
print(f"Caught \"{relpath}\"")
44+
else:
45+
print("Skipped self")
46+
print(f"\nExiting \"{dirpath}\"\n")
47+
48+
clip.copy("\n\n\n".join(struct))
49+
50+
main()

how-to-play.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
---
77

8-
Run the program. It will pick a random number from 100 to 10,000. If the process doesn't exist, it just re-rolls. Once a valid process is found, a 30% chance for it to trigger, and 70% for it to not trigger. If triggered, SIGSTOP is sent to it. That's it!
8+
Run the program. It will pick a random number from 100 to 100,000. If the process doesn't exist, it just re-rolls. Once a valid process is found, a 30% chance for it to trigger, and 70% for it to not trigger. If triggered, SIGSTOP is sent to it. That's it!

0 commit comments

Comments
 (0)