0c0a0d090b20
They will end input to functions such as scanf("%s")
.
Byte | Escape Sequence | Name |
---|---|---|
0c | \f | form-feed |
0a | \n | newline |
#!/usr/bin/env python3 | |
# -*- coding:utf-8 -*- | |
# Towel 2017 | |
from math import ceil, sqrt | |
def bsgs(g, h, p): | |
''' | |
Solve for x in h = g^x mod p given a prime p. |
/* SeeSP: Print the value of the stack pointer. | |
* Build: gcc SeeSP.c -o SeeSP | |
* | |
* Towel - 2017 | |
*/ | |
#include <stdio.h> | |
#include <inttypes.h> | |
int main(void) | |
{ |
#!/usr/bin/env python3 | |
"""A small example utility to demonstrate r2pipe scripting | |
by extracting resources from a file. | |
Written as an example for someone on IRC. | |
--Towel, 2019 | |
""" | |
import r2pipe |
BITS 32 | |
global _start | |
section .text | |
SYS_EXECVE equ 0x0b | |
_start: | |
xor ecx, ecx ; argv to zero | |
mul ecx ; envp to zero, eax to zero | |
add al, SYS_EXECVE ; syscall 11 for execve |
"""inaction_solve.py | |
CTF: SuSeC CTF 2020 - https://ctftime.org/event/1007 | |
Challenge: Inaction - https://ctftime.org/task/10729 | |
Flag: SUSEC{5m4Rt___p0W___cH4lL3n93} | |
twitter.com/0xTowel | |
""" | |
import re |
"""For my friends in OTA. | |
--Towel, 2019 | |
""" | |
from functools import wraps | |
class LimitCalls: | |
"""A decorator to limit the number of calls to a function. |
# https://www.reddit.com/r/netsec/comments/biu9kc/moddetective_small_python_tool_that_analyzes_the/em3siw8 | |
find / -type f -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head |
#!/usr/bin/env sage | |
# -*- coding: utf-8 -*- | |
# Towel 2019 | |
""" | |
Solution to 'Biggars' challenge from FireShell CTF 2019. | |
A multi-prime RSA computation with large N requiring CRT | |
to compute d rather than normal fast-power algorithm. | |
""" |
[context] | |
clear_screen = True | |
layout = regs code stack memory args extra | |
show_registers_raw = False | |
nb_lines_stack = 6 |