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
| if 2 + 2 == 4: | |
| print "OHAI" | |
| else: | |
| print "WTF" |
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
| ADD DNS | |
| Cpanel::Config::LoadCpUserFile::load('system') called at /usr/local/cpanel/Cpanel/Config/LoadCpUserFile.pm line 158 | |
| Cpanel::Config::LoadCpUserFile::loadcpuserfile('system') called at /usr/local/cpanel/Cpanel/Config/ModCpUserFile.pm line 26 | |
| Cpanel::Config::ModCpUserFile::adddomaintouser('user', 'system', 'domain', 'test.damian.internal', 'type', '') called at /usr/local/cpanel/Cpanel/DnsUtils.pm line 446 | |
| Cpanel::DnsUtils::doadddns('domain', 'test.damian.internal', 'ip', '127.0.0.1', 'reseller', 'root', 'trueowner', 'system') called at whostmgr/bin/whostmgr line 3197 | |
| main::adddns() called at whostmgr/bin/whostmgr line 669 | |
| EDIT OPEN | |
| main::getzonelocal() called at whostmgr/bin/dnsadmin-ssl line 339 |
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
| Testing a gist from perl |
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
| import logging | |
| import logging.handlers | |
| log_format = logging.Formatter("[%(asctime)s] [%(name)1s - %(threadName)s] %(levelname)-1s %(message)s", datefmt = '%d/%m/%Y %I:%M:%S') | |
| # Log files | |
| queue_file = "queue.log" | |
| deamon_file = "deamon.log" | |
| server_access_file = "server_access.log" | |
| server_error_file = "server_error.log" |
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
| $file = "Ohhai.json"; | |
| $stuff = array(); | |
| if(is_file($file) && is_readable($file)) { | |
| $stuff = json_decode(file_get_contents($file)); | |
| if(!$stuff) { | |
| die("Could not parse file"); | |
| } | |
| } else { | |
| die("Cannot read file"); | |
| } |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| void main () { | |
| char[] queue_dir = "/home/damian/test/%s"; | |
| char *file_name = get_filename(); | |
| char file_path[strlen(queue_dir) + strlen(file_name)]; | |
| sprintf(file_path, queue_dir, file_name); |
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
| diff -r cluebotng_changes/reportinterface/includes/header.php cluebotng/reportinterface/includes/header.php | |
| 7d6 | |
| < require_once 'includes/recaptchalib.php'; | |
| 22c21 | |
| < ?> | |
| --- | |
| > ?> | |
| \ No newline at end of file | |
| Only in cluebotng_changes/reportinterface/includes: recaptchalib.php | |
| diff -r cluebotng_changes/reportinterface/includes/settings.php cluebotng/reportinterface/includes/settings.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
| def gen_rand_str() | |
| return (0...20).map{ | |
| ('a'..'z').to_a[rand(26)] + | |
| ('A'..'Z').to_a[rand(26)] + | |
| ('0'..'9').to_a[rand(10)] | |
| }.join | |
| end | |
| puts gen_rand_str() |
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 perl | |
| use strict; | |
| use LWP::Simple; | |
| use Data::Dumper; | |
| my $dump_folder = '/home/damian/Pictures/xckd'; | |
| my $base_perm_url = 'http://xkcd.com'; | |
| my $base_image_url = 'http://imgs.xkcd.com/comics'; | |
| sub get_cid { |
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
| import re | |
| ''' | |
| I stoled these from http://stackoverflow.com/questions/319279/how-to-validate-ip-address-in-python | |
| ''' | |
| def is_valid_ipv4(ip): | |
| """Validates IPv4 addresses. | |
| """ | |
| pattern = re.compile(r""" | |
| ^ |
OlderNewer