Instantly share code, notes, and snippets.

# epistemologist

Last active February 11, 2022 07:54
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
 c = randint(0, 2^64) p = next_prime(2^2048 + c) q = next_prime(q + c) N = p*q
Created March 6, 2021 08:18
PicoCTF 2019 Writeups/Notes

# PicoCTF 2019

We're gonna try to solve as many challenges from PicoCTF 2019 with an emphasis on shell one-liners.

## General Skills

### Lets Warm Up - 50 Points

```\$ python -c 'print("picoCTF{%s}" % chr(0x70))'
picoCTF{p}```
Last active January 23, 2021 01:48
Weird C++ Behavior
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 #include #include using namespace std; void print_permutations(string s) { do { std::cout << s << std::endl; } while (std::next_permutation(s.begin(), s.end()));
Last active November 17, 2020 02:23
Pi in Python
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 gmpy2 import mpfr as D, sqrt, get_context # Program to calculate 10 million digits of pi (takes ~15 minutes to run on my machine) def pi(): get_context().precision = 100000000 a = sqrt(2) b = 0 p = 2+sqrt(2) for n in range(30): a_new = (sqrt(a) + 1/sqrt(a))/2 b_new = (1+b)*sqrt(a) / (a+b)
Created November 12, 2020 04:03
Just a normal stack....
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 sympy import nextprime, prevprime from math import log10 class Stack: def __init__(self, N): self.N = N self.p = 2 def __repr__(self): return str(self.N) def push(self, element):
Created October 23, 2020 22:54
C++ Sudoku Solver
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 #include #include #include #include using namespace std; using namespace std::chrono; int ROWS[9][9]; int COLS[9][9];