Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions command_injection_vuln.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# command_injection_vuln.py
import os

def ping_host(host):
# Vulnerable to command injection
command = f"ping -c 1 {host}"
os.system(command)

if __name__ == "__main__":
target = input("Enter host to ping: ")
ping_host(target)
11 changes: 11 additions & 0 deletions hardcoded_secret_vuln.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# hardcoded_secret_vuln.py

# Hardcoded secrets
API_KEY = "sk_test_1234567890abcdef"
DB_PASSWORD = "SuperSecretPassword123!"

def connect():
print("Connecting with password:", DB_PASSWORD)

if __name__ == "__main__":
connect()
Loading