Skip to content

Instantly share code, notes, and snippets.

View Einstrasse's full-sized avatar

Einstrasse Einstrasse

View GitHub Profile
@Einstrasse
Einstrasse / Dockerfile
Created July 27, 2023 07:52
pwndocker from ubuntu:22.04
FROM ubuntu:22.04
LABEL maintainer="Einstrasse <hg9587@naver.com>"
# From https://raw.githubusercontent.com/skysider/pwndocker/master/Dockerfile
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Asia/Seoul
RUN dpkg --add-architecture i386 && \
apt-get -y update && \
@Einstrasse
Einstrasse / anti-screen-saver.vbs
Created September 6, 2021 15:57
anti-screensaver.vbs / terminator.bat
Set ws = CreateObject("WScript.shell")
Do
Wscript.Sleep 59000
ws.SendKeys "{SCROLLLOCK}{SCROLLLOCK}"
Loop
@Einstrasse
Einstrasse / jwt.html
Created July 15, 2020 06:51
jwt.io local version
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<title>JWT.io local version</title>
<style>
textarea {
width: 400px;
height: 200px;
@Einstrasse
Einstrasse / solver.cc
Last active June 9, 2020 05:50
defenit ctf misc-puzzle solver
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef pair<int, vector<int> > State;
const int correct[4][4] = {
{0, 1, 2, 3},
{4, 5, 6, 7},
{8, 9, 10, 11},
{12, 13, 14, 15}
};
@Einstrasse
Einstrasse / gcd.c
Last active April 22, 2021 12:47
Greatest Common Divisor
/*
* Source : https://www.math.wustl.edu/~victor/mfmm/compaa/gcd.c
*/
#include <stdio.h>
/* Standard C Function: Greatest Common Divisor */
int gcd(int a, int b)
{
int c;
while (a != 0) {
#include <stdio.h>
#include <iostream>
using namespace std;
typedef long long ll;
#define MAXN 10000
int min_factor[MAXN]; //약수 중 가장 작은 녀석
int main() {
@Einstrasse
Einstrasse / dsu.cc
Created January 25, 2020 07:32
disjoint set (union find) 자료구조
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
#define MAXN 50020
// disjoint set (DSU)
int parent[MAXN];
// rank를 뜻함
int depth[MAXN];
#!/usr/bin/env python
import requests
import sys
url = "https://webhacking.kr/challenge/web-09/index.php"
headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
}
cookie = {
@Einstrasse
Einstrasse / bits-stdc++.h
Created December 3, 2019 14:52
bits/stdc++.h header file
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
@Einstrasse
Einstrasse / merge_sort.cc
Created October 30, 2019 02:44
boj.kr/2751 solution - merge sort implementation
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
#define MAXN 1000006
int arr[MAXN];
int tmp[MAXN];