gdb ch14 -batch -ex 'disass main'
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
# Copy to /etc/systemd/system/ this script and change ExecStart value. | |
After=syslog.target network.target | |
[Service] | |
ExecStart=/usr/bin/python /path/of/script/main.py | |
Restart=on-abort | |
[Install] | |
WantedBy=multi-user.target |
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
/* | |
* cve-2009-1185.c | |
* | |
* udev < 141 Local Privilege Escalation Exploit | |
* Jon Oberheide <[email protected]> | |
* http://jon.oberheide.org | |
* | |
* Information: | |
* | |
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1185 |
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
$(document).ready(function(){ | |
let list = document.querySelectorAll('.card-header'); | |
let MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver | |
let observer = new MutationObserver(function(mutations) { | |
let mutation = mutations[0] | |
let element = $(mutation.target) | |
if (element.attr('aria-expanded') === 'true'){ | |
element.removeClass('bg-white').css('background-color', '#f58508') | |
}else{ | |
element.addClass('bg-white') |
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/sh | |
# CVE-2016-1531 exim <= 4.84-3 local root exploit | |
# =============================================== | |
# you can write files as root or force a perl module to | |
# load by manipulating the perl environment and running | |
# exim with the "perl_startup" arguement -ps. | |
# | |
# e.g. | |
# [fantastic@localhost tmp]$ ./cve-2016-1531.sh | |
# [ CVE-2016-1531 local root exploit |
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
from datetime import datetime | |
def check_func(method): | |
def wrapper(*args, **kwargs): | |
t0 = datetime.now() | |
result = method(*args, **kwargs) | |
t1 = datetime.now() | |
print('Run with {:.16f} seccond'.format((t1-t0).total_seconds())) | |
return result | |
return wrapper |
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 asyncio | |
def static_async(method): | |
def wrapper(*args, **kwargs): | |
event = asyncio.new_event_loop() | |
asyncio.set_event_loop(event) | |
event.run_until_complete(method(*args, **kwargs)) | |
event.close() | |
return wrapper |
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
# change key binding from C-b to Emacs style C-x | |
unbind C-b | |
set -g prefix C-x | |
bind C-x send-prefix | |
# interface | |
#------------ | |
# pane | |
#------------ | |
set -g pane-border-fg black |
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
from subprocess import Popen, PIPE | |
from time import sleep | |
import struct | |
proc = Popen(['gdb', 'ch16'], bufsize=1, stdin=PIPE) | |
def sendline(param): | |
proc.stdin.write(param+'\n') | |
sleep(2) |
I hereby claim:
- I am suryadana on github.
- I am suryadana (https://keybase.io/suryadana) on keybase.
- I have a public key whose fingerprint is 9754 A0AD 0D08 B168 04CB EE41 6C3B 53F6 59ED 6BF1
To claim this, I am signing this object: