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
''=~( '(?{' .('`' |'%') .('[' ^'-') | |
.('`' |'!') .('`' |',') .'"'. '\\$' | |
.'==' .('[' ^'+') .('`' |'/') .('[' | |
^'+') .'||' .(';' &'=') .(';' &'=') | |
.';-' .'-'. '\\$' .'=;' .('[' ^'(') | |
.('[' ^'.') .('`' |'"') .('!' ^'+') | |
.'_\\{' .'(\\$' .';=('. '\\$=|' ."\|".( '`'^'.' | |
).(('`')| '/').').' .'\\"'.+( '{'^'['). ('`'|'"') .('`'|'/' | |
).('['^'/') .('['^'/'). ('`'|',').( '`'|('%')). '\\".\\"'.( '['^('(')). | |
'\\"'.('['^ '#').'!!--' .'\\$=.\\"' .('{'^'['). ('`'|'/').( '`'|"\&").( |
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
# default foreground color (%N) - -1 is the "default terminal color" | |
default_color = "-1"; | |
# print timestamp/servertag at the end of line, not at beginning | |
info_eol = "false"; | |
# these characters are automatically replaced with specified color | |
# (dark grey by default) | |
replaces = { "[]=" = "%K$*%n"; }; |
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
# define a list of HTB classes to check | |
# the order matters, because of the RRD database | |
my @class_list=(100,200,300,400,999); | |
[..... truncated .... ] | |
my $datasources = ""; | |
for my $class (0 .. $#class_list){ | |
$datasources .= "DS:$class_list[$class]:$storage_type:". $updatefreq * 10 .":0:U"; |
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
# SSH class: for outgoing connections to | |
# avoid lag when somebody else is downloading | |
# however, an SSH connection cannot fill up | |
# the connection to more than 70% | |
echo "#---ssh - id 300 - rate 160 kbit ceil 1120 kbit" | |
/sbin/tc class add dev eth0 parent 1:1 classid 1:300 htb \ | |
rate 160kbit ceil 1120kbit burst 15k prio 3 | |
# SFQ will mix the packets if there are several |
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
#!/usr/bin/env bash | |
DEBUG="$1" | |
SRV="smtp.example.net smtp2.example.net smtp.example.com" | |
# RBL list from http://www.anti-abuse.org/multi-rbl-check/ | |
RBL="bl.spamcop.net cbl.abuseat.org b.barracudacentral.org dnsbl.invaluement.com ddnsbl.internetdefensesystems.com dnsbl.sorbs.net http.dnsbl.sorbs.net dul.dnsbl.sorbs.net misc.dnsbl.sorbs.net smtp.dnsbl.sorbs.net socks.dnsbl.sorbs.net spam.dnsbl.sorbs.net web.dnsbl.sorbs.net zombie.dnsbl.sorbs.net dnsbl-1.uceprotect.net dnsbl-2.uceprotect.net dnsbl-3.uceprotect.net pbl.spamhaus.org sbl.spamhaus.org xbl.spamhaus.org zen.spamhaus.org bl.spamcannibal.org psbl.surriel.com ubl.unsubscore.com dnsbl.njabl.org combined.njabl.org rbl.spamlab.com dnsbl.ahbl.org ircbl.ahbl.org dyna.spamrats.com noptr.spamrats.com spam.spamrats.com cbl.anti-spam.org.cn cdl.anti-spam.org.cn dnsbl.inps.de drone.abuse.ch httpbl.abuse.ch dul.ru korea.services.net short.rbl.jp virus.rbl.jp spamrbl.imp.ch wormrbl.imp.ch virbl.bit.nl rbl.suresupport.com dsn.rfc-ignorant.org ips.backscatterer.org sp |
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
# iterate through the list on messages | |
for number in message_number[0].split(): | |
# fetch the current message | |
typ, data = connection.fetch(number, '(RFC822)') | |
# parse the email | |
message = email.message_from_string(data[0][1]) | |
# for each attachment |
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
$ grep 'include_recipe "nginx' cookbooks/ -R | |
cookbooks/python-webserver/recipes/default.rb:include_recipe "nginx" | |
chef > result = search(:node, "recipes:python-webserver").map {|n| n.fqdn} | |
=> ["pythonwebserver1.local.vm"] | |
chef > result = search(:node, "recipes:nginx").map {|n| n.fqdn} | |
=> [] |
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
# To create a new credential file, use: | |
echo "credential file created on $(date +%Y%m%d)" |openssl aes-256-ecb -e -a -salt -out credential_file.encrypted | |
# ======================================= | |
#!/usr/bin/env bash | |
# --- getpassword.sh | |
# opens the credential file and display it in the terminal |
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
:/lib/udev/devices# tree -alfpugh | |
. | |
├── [crw------- root root 0] ./console | |
├── [lrwxrwxrwx root root 11] ./core -> /proc/kcore | |
├── [lrwxrwxrwx root root 13] ./fd -> /proc/self/fd | |
│ ├── [lrwx------ root root 64] /proc/self/fd/0 -> /dev/pts/0 | |
│ ├── [lrwx------ root root 64] /proc/self/fd/1 -> /dev/pts/0 | |
│ ├── [lrwx------ root root 64] /proc/self/fd/2 -> /dev/pts/0 | |
│ └── [lr-x------ root root 64] /proc/self/fd/3 -> /proc/3611/fd [recursive, not followed] | |
├── [brw------- root root 0] ./loop0 |
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
#!/usr/bin/env python | |
from collections import defaultdict | |
import sys | |
import datetime | |
counters = defaultdict(int) | |
entries = 0 | |
show_progress = 0 | |
OlderNewer