This shade of green happens to correspond to mostly-ASCII characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$EUID" != "0" ]; then | |
echo "You must be root" | |
exit 1; | |
fi | |
wget https://phar.phpunit.de/phpunit.phar -O /usr/local/bin/phpunit && chmod +x /usr/local/bin/phpunit | |
echo "$(which phpunit)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a2971b1 (HEAD, master) Commit # {10} [Curtis Mattoon] | |
0 0 file_10 | |
feb3de8 Commit # {9} [Curtis Mattoon] | |
0 0 file_9 | |
cc74178 Commit # {8} [Curtis Mattoon] | |
0 0 file_8 | |
bfcbc72 Commit # {7} [Curtis Mattoon] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The basic command that gets run | |
sed -n '/CREATE TABLE.*table/,/UNLOCK TABLES/p' full_database_backup.sql > table.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Triggers an error of params are empty. | |
username=${1:?"You must specify a username"} | |
password=${2:?"You must specify a password"} | |
echo "Setting password for ${username} to ${password}" | |
exit 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The .htaccess rewrite rule used to make "apple.php" look like "apple.png" | |
RewriteEngine On | |
RewriteBase /fakeimg/ | |
RewriteRule ^apple.png$ apple.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Decodes a QR code image. | |
Usage: ./decode.py /path/to/image | |
""" | |
import qrtools, sys | |
qr = qrtools.QR() | |
qr.decode(sys.argv[1]) | |
print("Message is: %s" % (qr.data)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Brute-forces a ROT cipher | |
http://cmattoon.com/infosec-institute-ctf-level-4/ | |
""" | |
def rot(text, n): | |
"""Rotates 'text' by 'n' positions""" | |
output = '' | |
for char in text.lower(): # don't use uppercase values | |
x = ord(char) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
public static $attr = 'foo'; | |
public static function getAttr() { | |
return static::$attr; | |
} | |
public static function getAttr2() { | |
return self::$attr; | |
} | |
} |