Skip to content

Instantly share code, notes, and snippets.

View noobzhax's full-sized avatar
🎯
Focusing

nb noobzhax

🎯
Focusing
View GitHub Profile
JavaScript 4 hrs 10 mins ███████████████████▎░ 92.0%
Text 20 mins █▌░░░░░░░░░░░░░░░░░░░ 7.5%
JSON 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.5%
Kupeluk Hatimu Noah
🌞 Morning 53 commits ███▍░░░░░░░░░░░░░░░░░ 16.2%
🌆 Daytime 103 commits ██████▌░░░░░░░░░░░░░░ 31.5%
🌃 Evening 156 commits ██████████░░░░░░░░░░░ 47.7%
🌙 Night 15 commits ▉░░░░░░░░░░░░░░░░░░░░ 4.6%

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.

@noobzhax
noobzhax / screen_session.sh
Created July 13, 2024 13:10
List screen session easyly.
#!/bin/bash
# List existing screen sessions and assign numbers
sessions=($(screen -ls | grep -oP '^\s*\d+\.\S+'))
if [ ${#sessions[@]} -eq 0 ]; then
echo "No screen sessions found."
exit 1
fi
echo "Available screen sessions:"