Skip to content

Instantly share code, notes, and snippets.

View xryuseix's full-sized avatar
🐣
🐥 🐥 🐥

Ryusei Ishikawa xryuseix

🐣
🐥 🐥 🐥
View GitHub Profile
@xryuseix
xryuseix / index.html
Last active January 17, 2024 16:21
image rotate with three.js
<!doctype html>
<html>
<head>
<title>Particles Animation with Three.js</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="canvas"></div>
<div id="container">
<div id="content">
@xryuseix
xryuseix / chall4.ts
Created December 24, 2023 23:55
seccon ep 2023 ctf4b workshop web1 problem4
import { ChallRes } from "./types.ts";
import { getFlag } from "./flags.ts";
import { Form, FormFile } from "https://deno.land/x/multiparser@0.114.0/mod.ts";
import { join } from "https://deno.land/std@0.209.0/path/mod.ts";
const getFilename = (image: FormFile | FormFile[]) => {
if (Array.isArray(image)) {
// Case for FormFile[]
return image.map((file) => file.filename);
} else {
@xryuseix
xryuseix / bit.test.ts
Created December 16, 2023 15:57
BIT impl with deno
// not tested general Range XXX Query
// tested STATIC Range Quiey
import { assertEquals, assertThrows } from "https://deno.land/std/testing/asserts.ts";
import { BIT } from "./bit.ts";
Deno.test("BIT Test - Update and Query with Initial Values", () => {
type Abelian = number;
const identity: Abelian = 0;
const operation = (a: Abelian, b: Abelian): Abelian => a + b;
@xryuseix
xryuseix / Pyjail.md
Last active July 20, 2022 09:03
Pyjail

eval

LFI

  • setattr(license, '_Printer__filenames', ['flag']);license()
  • open('flag','r').read()

RCE

  • __import__('os').system('ls')
  • help()
    • os.environ["PAGER"]"less"の場合のみ、less上で!lsなどを実行
@xryuseix
xryuseix / test.txt
Last active December 12, 2021 19:23
<?php system('ls -la');
@xryuseix
xryuseix / VSCode-LaTex-tempate.json
Last active June 16, 2021 11:47
VSCode の LaTeX スニペット
{
"sample": {
"prefix": "sample",
"body": [
"\\documentclass{jsarticle}",
"\\usepackage{url} % URL",
"\\usepackage{color} % 色付け",
"\\usepackage{amsmath} % align環境",
"\\usepackage{ascmac} % 枠付き文章",
"\\usepackage{listings,jlisting} % ソースコード",
@xryuseix
xryuseix / cos_sim.rs
Created June 8, 2021 01:25
コサイン類似度の計算
fn cos_sim(q: &Vec<i32>, d: &Vec<i32>) -> f32 {
assert_eq!(q.len(), d.len());
// 分母
let mut dot = 0.0;
for i in 0..q.len() {
dot += (q[i] * d[i]) as f32;
}
// 分子左
let mut left = 0.0;
@xryuseix
xryuseix / 暗号利用モードの調査.md
Last active April 24, 2021 09:20
暗号利用モードの調査

-----------暗号利用モードの調査--------------

ECB:Electronic CodeBook mode (電子符号表モード)

ECBでの暗号化手順 ECBでの暗号化結果

  • 平文ブロックと暗号文ブロックは一対一の関係
  • ECBモード(単純なブロック暗号の利用法)では、ある鍵で同一の平文ブロックを暗号化すると、同一の暗号文ブロックになる。→同じブロックかつ同じ鍵は同じ暗号文ブロック
  • 同じ暗号文ブロックがあれば「平文が繰り返されていること」はわかる
@xryuseix
xryuseix / stack.cpp
Last active August 5, 2021 02:29
Cでstackを作ります
#include <stdio.h>
#include <stdlib.h>
struct CharStack {
char* data;
int top; // 半開区間で終端を管理する
int max;
} typedef stack;
void push(char* data, char c, int* top) {
@xryuseix
xryuseix / list.cpp
Last active August 5, 2021 02:29
Cで線型Listを作ります
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct __physcheck
{
char name[20];
int height;
double vision;
struct __physcheck *next;
} PhysCheck;