diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-30 08:52:14 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-30 08:52:14 +0200 |
| commit | fd7245e8dd6a1c1647756bbdaef7d400fb8979d2 (patch) | |
| tree | e8cdafac19838a3e95235221058d664acbd2995c | |
| parent | d0580db24ffeca24d6bface871fa9bc45da12af6 (diff) | |
| download | sbo-slackbuilds-fd7245e8dd6a1c1647756bbdaef7d400fb8979d2.tar.gz sbo-slackbuilds-fd7245e8dd6a1c1647756bbdaef7d400fb8979d2.zip | |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rw-r--r-- | CLAUDE.md | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -98,18 +98,27 @@ time with a ruby script that loads the framework and dumps the live payload/encoder/arch/platform/format lists. We ship a snapshot instead of running ruby at build time (hermetic build, no build-time dep). -**Regenerate it on every version bump.** After building and installing the -new package so `/opt/metasploit-framework` is live, pull the current -generator and run it against the installed framework's bundled ruby: +**Regenerate it on every version bump.** No host install needed: `test-build +--keep` produces a `.txz`; extract it to a scratchpad dir and run the +generator against the *extracted* framework's bundled ruby. This avoids `sudo +installpkg` and is fully in Claude's hands (verified identical output to a +host install, 2026-07-30). ```bash -curl -o /tmp/gen.rb \ +KEPT=/data/sbo-test-build/kept/metasploit-framework-bin-$VERSION-x86_64-*.tgz +tar xf $KEPT -C $SCRATCH/msf-extract +FW=$SCRATCH/msf-extract/opt/metasploit-framework +curl -o $SCRATCH/gen.rb \ https://gitlab.com/kalilinux/packages/metasploit-framework/-/raw/kali/master/debian/generate-msfvenom-bash-completion.rb -/opt/metasploit-framework/embedded/bin/ruby \ - -I/opt/metasploit-framework/embedded/framework/lib /tmp/gen.rb \ +$FW/embedded/bin/ruby \ + -I$FW/embedded/framework/lib $SCRATCH/gen.rb \ > metasploit-framework-bin/msfvenom.bash-completion ``` +(If `/opt/metasploit-framework` happens to already be live from a host +install, running the generator against that works too and gives byte-identical +output.) + Verify the output is non-empty and the `%s` slots were filled (grep for real payload names like `windows/meterpreter`), then commit it with the bump. @@ -160,9 +169,10 @@ test-build --stable <pkg> # 15.0 `test-build` resolves the target from the local dir (CWD or a path) and its deps from the configured SBo tree, builds in a `--rm` container, and lints with `sbopkglint`. Use `--keep` to copy the built `.txz` out (e.g. a binary repack -like `metasploit-framework-bin` that needs a host install to regenerate -post-install artifacts). See `../sbo-dockerbuild` for the full tool and its -image-builder chain. +like `metasploit-framework-bin` whose post-install artifacts are regenerated by +extracting the kept `.txz` and running the generator against it, no host +install). See `../sbo-dockerbuild` for the full tool and its image-builder +chain. The one artifact worth keeping from a clean bump is the **SBo submission tarball** (`SBo/<pkg>.tar.gz`), produced by the `post-commit` hook — that is |
