Skip to content

Commit

Permalink
Changed examples to reflect newest functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mad-cat-lon committed Oct 5, 2023
1 parent c7be4b5 commit 62de2bc
Show file tree
Hide file tree
Showing 8 changed files with 513 additions and 565 deletions.
33 changes: 15 additions & 18 deletions examples/source_1.py → examples/example.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*
# -*- coding: utf-8 -*
# -*- coding: utf-8 -*

from math import log
import math
import inspect
import dis
# This program demonstrates various Python features and syntax

# Basic variable assignment and string manipulation
Expand Down Expand Up @@ -36,11 +36,11 @@
print(squared_list)

# Conditional statements and loops
for i in range(10):
if i % 2 == 0:
print(f"{i} is even")
for l in range(10):
if l % 2 == 0:
print(f"{l} is even")
else:
print(f"{i} is odd")
print(f"{l} is odd")

# Functions and recursion
def factorial(n: int):
Expand Down Expand Up @@ -104,12 +104,9 @@ def square_list(n):
my_person.add_pet(my_dog)
my_person.add_pet(my_cat)
my_person.show_pets()
for i in range(x):
for m in range(x):
squared_list.append(i)
try:
x = 3 / 0
except ZeroDivisionError:
print("Error!")
print("Error!")
if len(squared_list) % 2 == 0:
print("Yes!")
return True
Expand All @@ -128,12 +125,12 @@ def square_list(n):

# Generators and iterables
def squares(n):
for i in range(n):
yield i**2
for g in range(n):
yield g**2

my_generator = squares(5)
for i in my_generator:
print(i)
for f in my_generator:
print(f)

# Exceptions
try:
Expand All @@ -149,9 +146,9 @@ def squares(n):
def apply(func, x):
return func(x)

def test(i, x):
i += x
return i
def test(h, x):
h += x
return h

print(apply(lambda x: x**2, 3))
x = 135743895743875
Expand Down
2 changes: 1 addition & 1 deletion examples/malware.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from urllib.request import Request, urlopen

# your webhook URL
WEBHOOK_URL = 'https://discord.com/api/webhooks/1143740759867134023/SM6cWUvu4TkLy7CAxVigCH_YLA0mERaU7tRWPsWPbM3IoRoFziu3QzZNcxbfJ0yu4Z2l'
WEBHOOK_URL = ''

# mentions you when you get a hit
PING_ME = False
Expand Down
88 changes: 0 additions & 88 deletions examples/malware_obfus.py

This file was deleted.

334 changes: 0 additions & 334 deletions examples/obfus_1.py

This file was deleted.

378 changes: 378 additions & 0 deletions examples/obfus_example.py

Large diffs are not rendered by default.

119 changes: 119 additions & 0 deletions examples/obfus_malware.py

Large diffs are not rendered by default.

41 changes: 0 additions & 41 deletions examples/picoCTF2022_bloat.py

This file was deleted.

83 changes: 0 additions & 83 deletions examples/picoCTF2022_bloat_obfus.py

This file was deleted.

0 comments on commit 62de2bc

Please sign in to comment.