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
#include <stdio.h> | |
#include <stdlib.h> | |
int main () | |
{ | |
int N; | |
int i; | |
int *a; | |
int sum; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef enum bool_t {false, true} bool_t; | |
typedef struct node_t { | |
int data; | |
struct node_t *next; | |
} node_t; |
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
#!/usr/bin/env python3 | |
import re | |
import sys | |
import json | |
import requests | |
from typing import List | |
from bs4 import BeautifulSoup | |
from urllib.parse import urlparse |
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 bin2shellcode { | |
echo "----- CUT HERE -----" | |
sc="" | |
for i in $(objdump -d "$1" | awk -F"\t" '{ print $2 }' | tr '\n' ' ' | sed 's/\ //g' | fold -w 2 | paste -sd' ') | |
do | |
sc="${sc}\\\x${i}" | |
done | |
echo "\"${sc}\"" | |
echo "--------------------" | |
} |
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
#include <stdio.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <malloc.h> | |
#include <string.h> | |
#include <errno.h> | |
const char shellcode[] = | |
"\x48\x31\xf6\x56\x48\xbf\x2f\x62\x69\x6e\x2f\x2f\x73\x68\x57\x54\x5f\x6a\x3b\x58\x99\x0f\x05"; |
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
#!/usr/bin/env python3 | |
''' | |
0x080492df <+52>: push 0x50 | |
0x080492e1 <+54>: lea eax,[ebp-0x58] | |
0x080492e4 <+57>: push eax | |
0x0804930d <+98>: call 0x80490a0 <printf@plt> | |
0x08049312 <+103>: add esp,0x10 |
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
#!/usr/bin/env python3 | |
from pwn import * | |
''' | |
gdb> info functions | |
0x00000000004011b6 print_flag | |
''' | |
addr = p64(0x4011b6) |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"strings" | |
) | |
func handler(w http.ResponseWriter, r *http.Request) { |
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
#!/usr/bin/env python3 | |
import sys | |
import signal | |
from types import FrameType | |
from typing import Union | |
def sighandler(signum: int, frame: Union[FrameType, None]) -> signal.Handlers: | |
sys.stdout.write("\r") |
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
// $ npm install node-rsa | |
const NodeRSA = require('node-rsa'); | |
const keyPair = new NodeRSA({b: 512}).generateKeyPair(); | |
const publicKey = keyPair.exportKey('public') | |
const privateKey = keyPair.exportKey('private') | |
console.log(publicKey); | |
console.log("\n\n"); | |
console.log(privateKey); |
OlderNewer