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
//Create a bookmark, paste this as the url (tested on Chrome, not sure about other browsers) | |
javascript: (function() {var telem = document.getElementById("file_title");var videlems = document.getElementsByName("videourl");var velem = videlems.length > 0 ? videlems[0] : null;if (velem == null) {alert("videourl element does not exist yet");} else {var title = "v.mp4";if (telem == null) {title = document.title.substring(6);} else {title = telem.innerText.replace("Background Audio?", "").replace("Close X", "").trim();}var newa = document.createElement("a");newa.setAttribute("href", velem.getAttribute("value").replace("v.mp4", title + ".mp4"));newa.setAttribute("target","_blank");newa.click();}})(); |
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
//Download URL only accessible from input element named "videourl" | |
//Exists after flash player has loaded (inb4 haxed through flash) | |
function getDownloadURL(elem_name){ | |
var videlems=document.getElementsByName(elem_name); | |
if(videlems.length>0){return videlems[0].getAttribute("value"); | |
}else{return null;} | |
} | |
//The file title is accessible either from the element id "file_title" or the document title | |
function getVideoNameFromID(elem_id){ | |
var titelem=document.getElementById(elem_id); |
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
//Video have to have loaded b4 it can be downloaded | |
javascript:(function(){var videlems=document.getElementsByName("videourl");var velem=videlems.length>0?videlems[0]:null;if(velem==null){alert("videourl element doesn't exist...");}else{prompt("Video URL",velem.getAttribute("value"));}})(); |
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
#Shrekghetti code | |
""" | |
_____ | |
,-' `._ | |
,' `. ,-. | |
,' \ ),.\ | |
,. / \ /( \; | |
/'\\ ,o. ,ooooo. \ ,' `-') |
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
void clear(){ | |
printf("\033[2J\033[1;1H"); | |
} |
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
#u can change the length values to be sent as 64 bit integers instead of 32 bits, I wouldn't recommend doing so unless ur sending over 4GB of data in a single buffer (would not recommend cos mem errors) | |
def sendByte(sock,b): | |
if b>=256 or b<0:raise ValueError() | |
else:sock.send(struct.pack("!B",b)) | |
def sendInt16(sock,s):sock.send(struct.pack("!h",s)) | |
def sendUInt16(sock,s):sock.send(struct.pack("!H",s)) | |
def sendInt32(sock,i):sock.send(struct.pack("!i",i)) | |
def sendUInt32(sock,i):sock.send(struct.pack("!I",i)) | |
def sendInt64(sock,l):sock.send(struct.pack("!l",l)) | |
def sendUInt64(sock,l):sock.send(struct.pack("!L",l)) |
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
def yieldByN(tosplit,n): | |
for s in range(0,len(tosplit),n): | |
yield tosplit[s:s+n] | |
def splitByN(tosplit,n):return [v for v in yieldByN(tosplit,n)] |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\subprocess.exe] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\subprocess.exe\PerfOptions] | |
"CpuPriorityClass"=dword:00000020 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\GTAVLauncher.exe] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\GTAVLauncher.exe\PerfOptions] |
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
object_names=["md5","sha1","sha256","sha384","sha512"] | |
def getStrings(objname,access_modifier="public",modifier="static",include_buff=True,buffer_name="buff",include_offcount=True,buffer2_name="buff",buffer2_offset="offset",buffer2_count="count",include_strem=True,strem_name="strem",include_filepath=True,filepath_name="file_path",include_comment=True): | |
strs=[] | |
if not include_buff and include_offcount and include_strem and include_filepath:return strs | |
uppar=objname.upper() | |
if include_comment:strs.append("//%s"%uppar) | |
method_start="%s %s byte[] Get%s"%(access_modifier,modifier,uppar) | |
using_statement="using(%s %s=%s.Create())"%(uppar,objname,uppar) | |
if include_buff:strs.append(method_start+"(byte[] %s){%s{return %s.ComputeHash(%s);}}"%(buffer_name,using_statement,objname,buffer_name)) | |
if include_offcount:strs.append(method_start+"(byte[] %s,int %s,int %s){%s{return %s.ComputeHash(%s,%s,%s);}}"%(buffer2_name,buffer2_offset,buffer2_count,using_statement,objname,buffer2_name,buffer2_o |
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 code requires "using System.Security.Cryptography" at the top | |
//MD5 | |
public static byte[] GetMD5(byte[] buff) { using (MD5 md5 = MD5.Create()) { return md5.ComputeHash(buff); } } | |
public static byte[] GetMD5(byte[] buff, int offset, int count) { using (MD5 md5 = MD5.Create()) { return md5.ComputeHash(buff, offset, count); } } | |
public static byte[] GetMD5(Stream strem) { using (MD5 md5 = MD5.Create()) { return md5.ComputeHash(strem); } } | |
public static byte[] GetMD5(string file_path) { using (FileStream fs = File.OpenRead(file_path)) { return GetMD5(fs); } } | |
//SHA1 | |
public static byte[] GetSHA1(byte[] buff) { using (SHA1 sha1 = SHA1.Create()) { return sha1.ComputeHash(buff); } } | |
public static byte[] GetSHA1(byte[] buff, int offset, int count) { using (SHA1 sha1 = SHA1.Create()) { return sha1.ComputeHash(buff, offset, count); } } | |
public static byte[] GetSHA1(Stream strem) { using (SHA1 sha1 = SHA1.Create()) { return sha1.ComputeHash(strem); } } |
OlderNewer