Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active February 11, 2026 02:13
Show Gist options
  • Select an option

  • Save mcsee/17e422eb77f7e5a6066237fe75f53306 to your computer and use it in GitHub Desktop.

Select an option

Save mcsee/17e422eb77f7e5a6066237fe75f53306 to your computer and use it in GitHub Desktop.
class DatabaseManager:
_instance = None # Singleton Anti Pattern
def __new__(cls):
if cls._instance is None:
cls._instance = super().__new__(cls)
return cls._instance
def get_data(self, id):
return eval(f"SELECT * FROM users WHERE id={id}")
# SQL injection!
## 741 more cryptic lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment