Skip to content

Instantly share code, notes, and snippets.

View imZack's full-sized avatar
🤠
Make bugs

YuLun Shih imZack

🤠
Make bugs
  • Moxa
  • Taipei, Taiwan
View GitHub Profile
@imZack
imZack / gist:5554337
Created May 10, 2013 13:19
鄉民 DDoS 工具 介面漂亮版
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>鍵盤開戰 復刻 PTTATK</title>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
</head>
<body>
### Keybase proof
I hereby claim:
* I am imzack on github.
* I am rezacks (https://keybase.io/rezacks) on keybase.
* I have a public key ASBX5LZtqJ8mpjwV-42bFRxfm8oTY24IdxhSWtoO0N2Fvwo
To claim this, I am signing this object:
[
{
"id": "50c307d1.8b1638",
"type": "exec",
"z": "473cc561.67a87c",
"command": "python",
"addpay": true,
"append": "",
"useSpawn": "false",
"timer": "10",
@imZack
imZack / download.py
Created November 29, 2017 09:42 — forked from idolpx/download.py
Python HTTP download with resume and optional MD5 hash checking
import os.path
import requests
import shutil
import hashlib
import logging
def validate_file(file_path, hash):
"""
Validates a file against an MD5 hash value
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@imZack
imZack / gist:5481767
Last active November 5, 2017 06:58
C# find-all-controls-in-wpf-window-by-type
/// <summary>
/// Form: http://stackoverflow.com/questions/974598/find-all-controls-in-wpf-window-by-type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="depObj"></param>
/// <returns></returns>
public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
{
if (depObj != null)
{
@imZack
imZack / qmi_dissector.lua
Created May 12, 2016 06:23 — forked from ivoronin/qmi_dissector.lua
Wireshark Dissector for Qualcomm MSM Interface (QMI) Protocol
--[[
Wireshark Dissector for Qualcomm MSM Interface (QMI) Protocol v0.1
Copyright (c) 2012 Ilya Voronin <ivoronin@gmail.com>
Based on Code Aurora Forum's BSD/GPL licensed code:
http://www.codeaurora.org/contribute/projects/gobi/
Short howto for using this script:
@imZack
imZack / sierra_mc7355_flashing.md
Created June 8, 2017 09:46 — forked from mleinart/sierra_mc7355_flashing.md
Flashing Carrier configuration and updated firmware to a Sierra MC7355

Overview

The Sierra MC7355 can run configurations for several North American carriers. These cards are easy to find on eBay and notable for their support for the Sprint LTE network. Unless you're luck out, you may find you need to flash a new carrier configuration onto the card you purchased before using it.

Notes

These procedures are specific to the setup I had to perform this on. Most notably, the only system I had with a mini-PCI-e slot was the target pfSense system, a PCengines APU1d with no VGA port (serial console only). If you're able to obtain a

# Activates mod_security
SecRuleEngine On
# Only filters requests for /toto
SecRule REQUEST_FILENAME "!^/toto" "phase:1,skip:5,nolog"
# Only filters requests for rosalind
SecRule REQUEST_HEADERS:Host "rosalind\.abgenomica\.com" "phase:1,skip:5,nolog"
# Stores the number of visits in variable IP.pagecount
SecAction "phase:1,nolog,initcol:IP=%{REMOTE_ADDR},setvar:IP.pagecount=+1,expirevar:IP.pagecount=60"
# Denies requests when excessive
# 429 would be a better error status but mod_security rewrites it as 500 :-(
[6543782.657324] ------------[ cut here ]------------
[6543782.657375] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:303 dev_watchdog+0x2a4/0x2b0()
[6543782.657389] NETDEV WATCHDOG: eth0 (smsc95xx): transmit queue 0 timed out
[6543782.657401] Modules linked in: bnep bluetooth ipt_REJECT nf_reject_ipv4 xt_multiport xt_nat veth xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter nf_nat nf_conntrack br_netfilter bridge stp llc overlay cfg80211 rfkill xt_TCPMSS xt_tcpmss xt_tcpudp iptable_mangle ip_tables x_tables pppoe pppox ppp_generic slhc snd_bcm2835 snd_pcm bcm2835_gpiomem bcm2835_rng snd_timer snd uio_pdrv_genirq uio ipv6
[6543782.657630] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.19-v7+ #858
[6543782.657642] Hardware name: BCM2709
[6543782.657685] [<800185e0>] (unwind_backtrace) from [<80013f48>] (show_stack+0x20/0x24)
[6543782.657714] [<80013f48>] (show_stack) from [<805730bc>] (dump_stack+0xd4/0x118)
[6543782.657741