Skip to content

Instantly share code, notes, and snippets.

View scimad's full-sized avatar

Madhav Om scimad

View GitHub Profile
@scimad
scimad / age_not_okay.html
Last active March 20, 2024 05:35
Basic python HTTP server and manipulation of POST data
<!DOCTYPE html>
<html>
<head>
<title>Not eligible</title>
</head>
<body>
<h1>Oops, you are too young to have your own conscience. Try again next year.</h1>
</body>
</html>
@scimad
scimad / tree_traversal.py
Last active May 18, 2021 17:22
Simplest implementation of tree traversal: PreOrder, InOrder, PostOrder traversal (and basic python decorator)
'''
Implements Tree data structure and few algorithms
'''
def start_end(traverse_func):
'''
Decorator
'''
def wrapper(self, tree):
@scimad
scimad / index.php
Last active January 31, 2021 16:48
Simplest example to demonstrate the idea of SQL Injection
<?php
?>
<h3>Sample login system</h3>
Input <b>admin' OR 1#</b> to in the username field to perform sql injection
<form method = "POST" action = "landing.php">
<label for="username">Username:</label><br>
<input type="text" id="username" name="username"><br>
<label for="password">Password:</label><br>
<input type="password" id="password" name="password">
<input type="submit">