
أداة استطلاع لرموز الوصول الشخصية (PAT) لصيادي الثغرات ومختبري الاختراق والفرق الحمراء

هل سبق لك أن عثرت على رمز وصول شخصي (PAT) خاص بـ GitHub أو NPM وتساءلت: «هل هذا الرمز صالح؟» أو «أتساءل ماذا يمكن أن يفعل شخص سيئ به؟» حسنًا، إذا كان الأمر كذلك، فقد أعددت لك الأداة المناسبة!
أقدم لكم gimmePatz، أداة استطلاع شاملة لرموز الوصول الشخصية (PAT). ستعلمك gimmePATz ما إذا كان الرمز صالحًا ونوعه. كما توفر معلومات حول حساب المستخدم الذي أنشأ الرمز، بما في ذلك المؤسسات التي ينتمي إليها هذا المستخدم وعدد متابعيه. ستعرض لك gimmePATz النطاقات (scopes) التي يمتلكها الرمز والمتغيرات أو الأسرار التي يمكنه الوصول إليها. كما ستدرج المستودعات وحزم NPM أو مؤسسات GitHub المرتبطة بالرمز، وتخبرك بالصلاحيات الدقيقة التي يمتلكها الرمز لكل مورد. صُممت هذه الأداة لممارسي الأمن الهجومي، مثل صائدي الثغرات ومختبري الاختراق والفرق الحمراء. باستخدامك لهذه الأداة، فأنت توافق على استخدامها في سياق قانوني.
يمكنك توجيه gimmePATz إلى ملف وستقوم بالعثور على جميع الرموز في ذلك الملف وتخبرك ما إذا كانت صالحة. كما يدعم gimmepatz إخراج JSON، لذا يمكنك حفظ الإخراج بصيغة JSON و/أو توجيه إخراج gimmePATz إلى أدوات أخرى مثل jq. يمكنك رؤية بعض الأمثلة على الطرق المختلفة لاستخدام gimmePATz في قسم «الاستخدام المتقدم» أدناه.
gimmepatz.py TOKEN
requests # pip install requestsgit (لتنزيل المستودعات)# Discover secrets and variables
gimmepatz.py TOKEN --variables
# Include organization repositories
gimmepatz.py TOKEN --org GITHUB_ORGANIZATION
# JSON output for scripting
gimmepatz.py TOKEN --json
# Combined: organization repos + JSON output
gimmepatz.py TOKEN --org GITHUB_ORGANIZATION --json
# Save the output of gimmePATz in JSON output to a file
gimmepatz.py TOKEN --variables --org target-org --json > assessment.json
# Download all accessible repositories
gimmepatz.py TOKEN --download
# Download only private repositories
gimmepatz.py TOKEN --download --download-type private
# Custom download location
gimmepatz.py TOKEN --download --download-path ./target-repos
# Scan a file to see if it has any PATs in it
gimmepatz.py --scan ./example-file.json
استنسخ أو نزّل السكربت
git clone https://github.com/6mile/gimmepatz.git
cd ./gimmepatz/ && chmod u+x ./gimmepatz.py
| الخيار | الوصف |
|---|---|
--json | إخراج النتائج بصيغة JSON |
--variables, --var | تعداد متغيرات وأسرار GitHub |
--var-target | نطاق الهدف: all (الكل)، user (مستخدم)، repo (مستودع)، org (مؤسسة) |
--var-name | اسم مستودع أو مؤسسة محدد |
--download | تنزيل جميع المستودعات المتاحة |
--download-path | دليل تنزيل مخصص (الافتراضي: repos) |
--download-type | الفلتر: all (الكل)، private (خاص)، public (عام) |
--org | تضمين تحليل مؤسسة GitHub محددة |
--debug | تفعيل إخراج التصحيح المفصّل |
--scan | فحص الملفات المحلية بحثًا عن رموز PAT |
_ ______ ___ _____
(_) | ___ \/ _ \_ _|
__ _ _ _ __ ___ _ __ ___ ___| |_/ / /_\ \| |____
/ _` | | '_ ` _ \| '_ ` _ \ / _ \ __/| _ || |_ /
| (_| | | | | | | | | | | | | __/ | | | | || |/ /
\__, |_|_| |_| |_|_| |_| |_|\___\_| \_| |_/\_/___|
__/ |
|___/ "Personal Access Token recon tool"
----------------------------------------------------
by @6mile
✅ Token is valid
👤 Authenticated as: octocat
Name: Octocat Maclean
Account type: User
Public repos: 4
Private repos: 3
Followers: 9714
Following: 731
🏢 Organization Memberships (2 total):
👤 Space-Force-Beta (member)
Name: Space-Force-Beta
Description: Building cool stuff for space
Public repos: 2
Private repos: 1
URL: https://github.com/Space-Force-Beta
👑 ThrifyBank (admin)
Description: The thriftiest Neo Bank in Kansas!
Public repos: 1
Private repos: 5
URL: https://github.com/thrifybank-kansas
🔑 Token Scopes (14 total):
• codespace:secrets
• notifications
• read:audit_log
• read:discussion
• read:enterprise
• read:org
• read:packages
• read:project
• read:public_key
• read:repo_hook
• read:user
• repo
• user:email
• workflow
Scope Descriptions:
--------------------------------------------------
repo: Full access to repositories
user: Access to user profile information
notifications: Access to notifications
📊 Rate Limit Status:
Limit: 5000
Remaining: 4999
Reset time: 1234567890
📁 Accessible Repositories:
Found 25 accessible repositories:
• 15 private repositories
• 10 public repositories
🔒 Private Repositories (9):
📂 octocat (3 private repos):
• octocat/internal-api (admin)
• octocat/database (admin)
• octocat/external-api (admin)
📂 Space-Force-Beta (1 private repos):
• Space-Force-Beta/destrukto-beam (admin)
📂 ThriftyBank (5 private repos):
• thriftybank-kansas/web (admin)
• thriftybank-kansas/docker (admin)
• thriftybank-kansas/database-int (admin)
• thriftybank-kansas/bank-vault (admin)
• thriftybank-kansas/SAAS-PORTAL (admin)
🔓 Public Repositories (7):
📂 octocat (4 public repos):
• octocat/sdk (admin)
• octocat/helpdesk-docs (admin)
• octocat/aws-sdk-helpers (admin)
• octocat/stinkyCaptain (admin)
📂 Space-Force-Beta (1 public repos):
• Space-Force-Beta/destrukto-beam (admin)
📂 thrifybank-kansas (1 public repos):
• thrifybank-kansas/node-restify (admin)
{
"token_valid": true,
"user_info": {
"login": "octocat",
"name": "The Octocat",
"type": "User",
"id": 1
},
"scopes": ["repo", "user", "notifications"],
"rate_limit": {
"limit": 5000,
"remaining": 4999,
"reset": 1234567890
},
"repositories": {
"total": 25,
"private": [
{
"name": "mycompany/internal-api",
"owner": "mycompany",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"url": "https://github.com/mycompany/internal-api"
}
],
"public": [
{
"name": "octocat/awesome-project",
"owner": "octocat",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"url": "https://github.com/octocat/awesome-project"
}
]
},
"summary": {
"total_repos": 25,
"private_count": 15,
"public_count": 10,
"owners": ["mycompany", "octocat"]
}
}