Skip to content

Instantly share code, notes, and snippets.

View hardword's full-sized avatar
🎯
Focusing

hardword hardword

🎯
Focusing
View GitHub Profile
@hardword
hardword / cli.php
Created March 10, 2022 08:23 — forked from PinkDraconian/cli.php
Can you spot the vulnerability?
<?php
if (!isset($_SERVER['argc']) || $_SERVER['argc'] < 1) {
die("Usage: cli <action> <options>");
}
$argc = $_SERVER['argc'];
$argv = $_SERVER['argv'];
switch ($argv[1]) {
case "ls":
echo "Listing directory";
@hardword
hardword / pickle_me.py
Created July 3, 2019 13:34 — forked from franccesco/pickle_me.py
Saving a dictionary with Pickle
import pickle
dictionary_a = {'string_1': 1, 'string_2': 2.2, 'string_3': True}
# Pickling (serializing) dictionary A into a file
with open('saved_object.pickle', 'wb') as filename:
pickle.dump(dictionary_a, filename)
# Unpickling (de-serializing) dictionary A into B
with open('saved_object.pickle', 'rb') as filename:
@hardword
hardword / progressbars.py
Created July 3, 2019 13:33 — forked from franccesco/progressbars.py
Testing some of the progressbar libraries that I found interesting
# To test these progress bars you will have to
# install the following packages
# pipenv install click progress progressbar2 tqdm clint
import string
# progress bars
import time
import click
from tqdm import tqdm

Keybase proof

I hereby claim:

  • I am hardword on github.
  • I am hardword (https://keybase.io/hardword) on keybase.
  • I have a public key ASAXb8be94RysmlPEGZ2bbyw1aMFueKXdCChAg7L-IrVJQo

To claim this, I am signing this object: