Skip to content

Instantly share code, notes, and snippets.

View KnightChaser's full-sized avatar
🤟
Spreading random codes

Garam Lee KnightChaser

🤟
Spreading random codes
View GitHub Profile
@KnightChaser
KnightChaser / mySimpleVimrc.vim
Created March 23, 2024 12:03
My simple ~/.vimrc configuration file for fast startup
" Ordinary settings
set title
set autoindent
set cursorcolumn
set cursorline
set number
set ruler

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@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)
@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 / 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 / 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 / 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 / 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 / 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'