Permission Cheat Sheet
chown -R www-data:www-data ./
// set the proper owner
find . -type f -exec chmod 644 {} \+
// Recursively set FILE permissions.
| <?php | |
| class base58 | |
| { | |
| static public $alphabet = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"; | |
| public static function encode($int) { | |
| $base58_string = ""; | |
| $base = strlen(self::$alphabet); | |
| while($int >= $base) { |
| <?php | |
| function ipv4AddressData() | |
| { | |
| // address isValid | |
| return array( | |
| 'Single digit 0' => array('0.0.0.0', true), | |
| 'Single digit 1' => array('1.1.1.1', true), | |
| 'Single digit 9' => array('9.9.9.9', true), | |
| 'Double digit 10' => array('10.10.10.10', true), |
| <? | |
| /* | |
| PHP takes the design of Perl (ugly), the interfaces | |
| of C (low-level and clunky), and the OO of C++ | |
| (an impure mess). Some things are completely broken, | |
| and every API is either inconsistent or just | |
| inconvenient. | |
| Its only utility is its output of inline text, which |
| <?php | |
| class Analyze | |
| { | |
| /** | |
| * You can either scan your entire project or select some folders. | |
| * | |
| * @var array | |
| */ | |
| public static $dirs = array(); |
| <?php | |
| /** | |
| * Combine two urls. | |
| * | |
| * The urls can be either a string or url parts that consist of: | |
| * | |
| * scheme, host, port, user, pass, path, query, fragment | |
| * | |
| * If passed in as parts in an array, the query parameter can be either |
Permission Cheat Sheet
chown -R www-data:www-data ./
// set the proper owner
find . -type f -exec chmod 644 {} \+
// Recursively set FILE permissions.
| <?php | |
| function getTweetslist($owner_screen_name, $slug) { | |
| $oauth_access_token = "***"; | |
| $oauth_access_token_secret = "***"; | |
| $consumer_key = "***"; | |
| $consumer_secret = "***"; | |
| // https://api.twitter.com/1.1/lists/statuses.json?slug=teams&owner_screen_name=MLS&count=1 | |
| // create request |
| <?php | |
| function √($x) | |
| { | |
| return pow($x, 0.5); | |
| } | |
| function ²($x) | |
| { | |
| if (is_array($x)) { |
| # OR, just do this: | |
| /usr/bin/nice -n20 /usr/local/bin/nmap -v -sn 10.0.1.0/24 -oX /tmp/nmap-ping.log --append-output |
| [2013-12-12 08:51:40] start BruteForceTSP | |
| best so far: 4918.6049886512, atempt: 1 | |
| Path: (443, 511)->(471, 124)->(10, 774)->(88, 600)->(518, 322)->(292, 171)->(995, 423)->(14, 374)->(697, 153)->(422, 301) | |
| .... | |
| best so far: 2384.6557454024, atempt: 341178 | |
| Path: (443, 511)->(422, 301)->(518, 322)->(995, 423)->(697, 153)->(471, 124)->(292, 171)->(14, 374)->(88, 600)->(10, 774) | |
| [2013-12-12 08:52:17] end BruteForceTSP | |
| -------- |