Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
// Run git clone https://gitlab.chise.org/CHISE/ids.git
// and copy this script into the same directory
const {range} = require('lodash');
const {promises: fs} = require('fs');
const axios = require('axios');
(async () => {
const normalizedRadials = [];
for (const codePoint of range(0x2E80, 0x2EF3 + 1)) {
@hakatashi
hakatashi / domains.md
Created April 5, 2021 13:05
hakatashi所有のドメインの管理状況
ドメイン名 レジストラ 管理状況
hakatashi.com Namecheap 使用中
hakata.city Namecheap hakatashi.comのエイリアス
hkt.sh Namecheap 使用中
kata.sh Namecheap 使用中
tokyo-olym.pics Namecheap 使用中
mnemo.pro Namecheap 使用中
sunpro.io Namecheap 使用中
hkt.si Regery.com hkt.shへのリダイレクト
  • hoge

    hoge

  • hoge
    hoge

@hakatashi
hakatashi / 01-solve.py
Last active March 10, 2021 19:13
zer0pts CTF 2021 Tokyo Network solver script
from ptrlib import Socket, logger
from sys import exit
CIRCUIT = 'CNOT 0,1; CNOT 0,2; H 0; CNOT 2,0; TDAG 0; CNOT 1,0; T 0; CNOT 2,0; TDAG 0; CNOT 1,0; T 0; T 2; H 0; CNOT 1,2; T 1; TDAG 2; CNOT 1,2; CNOT 3,4; CNOT 3,5; H 3; CNOT 5,3; TDAG 3; CNOT 4,3; T 3; CNOT 5,3; TDAG 3; CNOT 4,3; T 3; T 5; H 3; CNOT 4,5; T 4; TDAG 5; CNOT 4,5; CNOT 6,7; CNOT 6,8; H 6; CNOT 8,6; TDAG 6; CNOT 7,6; T 6; CNOT 8,6; TDAG 6; CNOT 7,6; T 6; T 8; H 6; CNOT 7,8; T 7; TDAG 8; CNOT 7,8; H 0; H 3; H 6; CNOT 0,3; CNOT 0,6; H 0; CNOT 6,0; TDAG 0; CNOT 3,0; T 0; CNOT 6,0; TDAG 0; CNOT 3,0; T 0; T 6; H 0; CNOT 3,6; T 3; TDAG 6; CNOT 3,6;'
con = Socket('others.ctf.zer0pts.com', 11099)
Np = int(con.recvlineafter('Np = '))
logger.info('Np = {}'.format(Np))
for i in range(Np):
@hakatashi
hakatashi / 01-solve.sage
Last active March 10, 2021 12:46
zer0pts CTF 2021 NOT Mordell primes solver script
p = 13046889097521646369087469608188552207167764240347195472002158820809408567610092324592843361428437763328630003678802379234688335664907752858268976392979073
a = 10043619664651911066883029686766120169131919507076163314397915307085965058341170072938120477911396027902856306859830431800181085603701181775623189478719241
b = 12964455266041997431902182249246681423017590093048617091076729201020090112909200442573801636087298080179764338147888667898243288442212586190171993932442177
Gx = 11283606203023552880751516189906896934892241360923251780689387054183187410315259518723242477593131979010442607035913952477781391707487688691661703618439980
Gy = 12748862750577419812619234165922125135009793011470953429653398381275403229335519006908182956425430354120606424111151410237675942385465833703061487938776991
N = 22607234899418506929126001268361871457071114354768385952661316782742548112938224795906631400222949082488044126564531809419277303594848211922000498018284382244900831520857366772119155202621331079644609558409672584261968
@hakatashi
hakatashi / 01-solve.sage
Last active March 10, 2021 14:06
zer0pts CTF 2021 OT or NOT OT solver script
from ptrlib import Socket
from sys import exit
con = Socket('crypto.ctf.zer0pts.com', 10130)
enc = con.recvlineafter('Encrypted flag: ')
p = int(con.recvlineafter('p = '))
bitsize = int(con.recvlineafter('key.bit_length() = '))
print('enc = {}'.format(enc))
print('p = {}'.format(p))
@hakatashi
hakatashi / p_p_rsa.rb
Last active October 11, 2022 07:34
#kurenaifChallenge solvers
def modinv(a, m)
m0, inv, x0 = m, 1, 0
while a > 1
inv -= (a / m) * x0
a, m = m, a % m
inv, x0 = x0, inv
end
inv += m0 if inv < 0
inv
end
@hakatashi
hakatashi / tahoiya-0-logs.md
Last active April 21, 2024 10:57
[TSG] たほいや対戦ログ 第901回~第1000回

第901回 「しとうが

  • 日時 2021-01-23 22:51:28
  • 参加者 @昆布(静養せえよー) @きつね @mug @しとお(azaika先生に1700円) たほいやAIくん1号 (仮) @Kazuki Ota たほいやAIくん2号 (仮) (7人)
  • 出題者 @Szkieletor センシティブ情報の確認と編集
  1. キャラクターデザイナー
  2. 宋代の詩人
  3. パラオ諸島を主な生息地とする蛾
@hakatashi
hakatashi / milk-solver.js
Last active October 11, 2020 12:32
SECCON CTF 2020 Milk - Author's Solver
const Axios = require('axios');
const qs = require('querystring');
const https = require('https');
const random = Array(10).fill().map(() => 'abcdefg'[Math.floor(Math.random() * 6)]).join('');
(async () => {
const axios = Axios.create({
httpsAgent: new https.Agent({
rejectUnauthorized: false,
@hakatashi
hakatashi / solve.cr
Created September 22, 2020 14:33
TokyoWesterns CTF 2020 sqrt solver script
require "big"
record Mint, value : BigInt do
MOD = BigInt.new("6722156186149423473586056936189163112345526308304739592548269432948561498704906497631759731744824085311511299618196491816929603296108414569727189748975204102209646335725406551943711581704258725226874414399572244863268492324353927787818836752142254189928999592648333789131233670456465647924867060170327150559233")
ZERO = BigInt.new("0")
ONE = BigInt.new("1")
TWO = BigInt.new("2")
def self.factorial(n)
if @@factorials.empty?