Guest User

git gc writeup

a guest
Jan 27th, 2026
192
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. [hle4s@pwnlab CWD:chall]$ git log
  2. commit c0bf20c191a250522fc742093ff920243346f578 (HEAD -> main)
  3. Author: AlpacaHack <[email protected]>
  4. Date: Sat Jan 10 01:45:04 2026 +0900
  5.  
  6. initial commit
  7. [hle4s@pwnlab CWD:chall]$
  8. // Searching clues for flag
  9. [hle4s@pwnlab CWD:chall]$ rg flag -uuu
  10. .git/hooks/fsmonitor-watchman.sample
  11. 140: # return the fast "everything is dirty" flag to git and do the
  12.  
  13. .git/COMMIT_EDITMSG
  14. 1:add flag
  15.  
  16. .git/logs/HEAD
  17. 2:c0bf20c191a250522fc742093ff920243346f578 75a6ad9f0abe942df11f90b58f175d553c23c101 AlpacaHack <[email protected]> 1767977104 +0900 commit: add flag
  18.  
  19. .git/logs/refs/heads/main
  20. 2:c0bf20c191a250522fc742093ff920243346f578 75a6ad9f0abe942df11f90b58f175d553c23c101 AlpacaHack <[email protected]> 1767977104 +0900 commit: add flag
  21. // I found hash for the commit, 'add flag' and just checkout to it.
  22. [hle4s@pwnlab CWD:chall]$ git checkout 75a6ad9f0abe942df11f90b58f175d553c23c101
  23. Note: switching to '75a6ad9f0abe942df11f90b58f175d553c23c101'.
  24.  
  25. You are in 'detached HEAD' state. You can look around, make experimental
  26. changes and commit them, and you can discard any commits you make in this
  27. state without impacting any branches by switching back to a branch.
  28.  
  29. If you want to create a new branch to retain commits you create, you may
  30. do so (now or later) by using -c with the switch command. Example:
  31.  
  32. git switch -c <new-branch-name>
  33.  
  34. Or undo this operation with:
  35.  
  36. git switch -
  37.  
  38. Turn off this advice by setting config variable advice.detachedHead to false
  39.  
  40. HEAD is now at 75a6ad9 add flag
  41. [hle4s@pwnlab CWD:chall]$ git log
  42. commit 75a6ad9f0abe942df11f90b58f175d553c23c101 (HEAD)
  43. Author: AlpacaHack <[email protected]>
  44. Date: Sat Jan 10 01:45:04 2026 +0900
  45.  
  46. add flag
  47.  
  48. commit c0bf20c191a250522fc742093ff920243346f578 (main)
  49. Author: AlpacaHack <[email protected]>
  50. Date: Sat Jan 10 01:45:04 2026 +0900
  51.  
  52. initial commit
  53. [hle4s@pwnlab CWD:chall]$ ll
  54. total 4
  55. -rw-r--r-- 1 hle4s hle4s 36 Jan 28 11:52 flag.txt
  56. [hle4s@pwnlab CWD:chall]$ cat flag.txt
  57. Alpaca{--prune=now_1s_4ll_y0u_n33d}
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment