Skip to content

Commit

Permalink
Updated examples to reflect new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mad-cat-lon committed Oct 5, 2023
1 parent f9b996b commit 4a4d695
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 653 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
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.

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

Large diffs are not rendered by default.

163 changes: 74 additions & 89 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 4a4d695

Please sign in to comment.