mirror of https://github.com/pwndbg/pwndbg.git
Show demo gif on docs front page (#3055)
* show gif on docs frontpage * use uv for running the script * gif but invoked as `pwndbg /bin/sh` * add cheatsheet to repositorypull/3060/head
parent
640eca78d8
commit
0be925e6bc
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
@ -0,0 +1,67 @@
|
||||
# https://github.com/charmbracelet/vhs
|
||||
|
||||
Output demo.mp4
|
||||
Output demo.webm
|
||||
|
||||
Set FontSize 20
|
||||
Set Width 1920
|
||||
Set Height 1080
|
||||
Set TypingSpeed 100ms
|
||||
|
||||
Sleep 1s
|
||||
Type "pwndbg /bin/sh"
|
||||
Enter
|
||||
Sleep 2s
|
||||
Type "start"
|
||||
Enter
|
||||
Sleep 3s
|
||||
Type "ni"
|
||||
Sleep 2s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Type "nextcall"
|
||||
Sleep 3s
|
||||
Enter 1
|
||||
Sleep 10s
|
||||
Type "b *$rdi"
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 2s
|
||||
Type "continue"
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 4s
|
||||
Type "nextcall"
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 1s
|
||||
Type "stepsyscall"
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 10s
|
||||
Type "checksec"
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 5s
|
||||
Type "vmmap"
|
||||
Sleep 1s
|
||||
Enter 1
|
||||
Sleep 5s
|
||||
Type "exit"
|
||||
Sleep 1s
|
||||
Enter
|
||||
Sleep 2s
|
||||
Binary file not shown.
@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
Transform the README.md to look good on the
|
||||
documentation page.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
hide_nav = """---
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
"""
|
||||
|
||||
gif = """
|
||||
<video autoplay loop muted playsinline alt='pwndbg gif'>
|
||||
<source src='assets/videos/demo.webm' type='video/webm'>
|
||||
<source src='assets/videos/demo.mp4' type='video/mp4'>
|
||||
</video>
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
README_PATH = "README.md"
|
||||
TARGET_PATH = "./docs/index.md"
|
||||
|
||||
with open(README_PATH, "r") as readmefile:
|
||||
readme = readmefile.read()
|
||||
|
||||
assert (
|
||||
readme.splitlines()[0].startswith("
|
||||
and "The first line of the README.md has changed. Is it still safe to replace it?"
|
||||
)
|
||||
|
||||
# Delete the first line
|
||||
readme = readme.split("\n", 1)[1]
|
||||
|
||||
# Hide navigation on the doc page
|
||||
preamble = hide_nav
|
||||
# Add logo
|
||||
preamble += "\n{ style='width: 100%'}\n"
|
||||
|
||||
readme = preamble + readme
|
||||
|
||||
# Add gif after first paragraph
|
||||
assert "## Why?" in readme
|
||||
readme = readme.replace("## Why?\n", gif + "\n## Why?\n")
|
||||
|
||||
# Write to target file.
|
||||
with open(TARGET_PATH, "w") as docsindex:
|
||||
docsindex.write(readme)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rm ./docs/index.md
|
||||
echo "---
|
||||
hide:
|
||||
- navigation
|
||||
---
|
||||
" > ./docs/index.md
|
||||
|
||||
cat ./README.md >> ./docs/index.md
|
||||
Loading…
Reference in new issue