Skip to content

Instantly share code, notes, and snippets.

View lmt-swallow's full-sized avatar

Takashi Yoneuchi lmt-swallow

View GitHub Profile
@lmt-swallow
lmt-swallow / solver.html
Last active November 22, 2020 23:01
Scratchpad - Dragon CTF 2020
<body></body>
<script>
// configurations
const url_base = "http://scratchpad.hackable.software:3000/notes?q=";
const possible_cspace = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!_{}?";
// helpers
const split_space = (s) => {
return [s.slice(0, s.length / 2), s.slice(s.length / 2)];
}
@lmt-swallow
lmt-swallow / easyshellcode.py
Last active September 6, 2023 03:13
Contrail CTF 2019 (pokebattle, welcomechain, EasyShellcode, RaspiWorld)
# -*- coding: utf-8 -*-
from pwn import *
context.update(arch='amd64', os='linux')
host = '114.177.250.4'
port = 2210
s = remote(host, port)
shellcode = asm("""
mov rdi, [rax]
[
{
"location": "all",
"allow-method": [
"GET"
]
},
{
"location": "/",
"allow-method": [
{
"location":"all",
"allow-method":["GET"]
}
{
"location":"/",
"allow-method":["GET"]
}
{
"location":"/hoge",
private void InitializeTwitterConnection()
{
string accessToken = Properties.Settings.Default.accessToken;
string accessTokenSecret = Properties.Settings.Default.accessTokenSecret;
if (accessToken == "" || accessTokenSecret == "")
{
OAuthTokenResponse req =
OAuthUtility.GetRequestToken(Twitter.Secret.consumer_key, Twitter.Secret.consumer_key_secret, "oob");
System.Diagnostics.Process.Start(OAuthUtility.BuildAuthorizationUri(req.Token).ToString());
@lmt-swallow
lmt-swallow / gist:1496684
Created December 19, 2011 11:09
パースできたか試すために関数書いたのはいいんだけどいろいろアレ
private void debug(Expression exp, int indent)
{
Expression seenow = exp;
string indentStr = "";
for (int i = 0; i < indent; i++) indentStr += " ";
CanReadMessage.gotMessage(indentStr + "-TokenValue = " + seenow.rootToken.tokenValue + "(" + seenow.rootToken.t_type.ToString() + ")");
if (seenow.rightToken != null)