diff options
author | heqnx <root@heqnx.com> | 2025-05-20 16:15:06 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-05-20 16:15:06 +0300 |
commit | 02d19684796f9efcb06efd1b31e8537fd95ef2ad (patch) | |
tree | 467a21616396ac1326a151eae3505fbca88fcbff | |
parent | 777abefdf48fb452885b7ed28948f96592f6dd64 (diff) | |
download | cve-poc-mon-02d19684796f9efcb06efd1b31e8537fd95ef2ad.tar.gz cve-poc-mon-02d19684796f9efcb06efd1b31e8537fd95ef2ad.zip |
-rw-r--r-- | README.md | 6 | ||||
-rwxr-xr-x | generate-html.sh | 64 | ||||
-rw-r--r-- | pandoc/add-target-blank.lua | 7 | ||||
-rw-r--r-- | pandoc/assets/MorePerfectDOSVGA.ttf | bin | 78252 -> 0 bytes | |||
-rw-r--r-- | pandoc/assets/background.webm | bin | 2956357 -> 0 bytes | |||
-rw-r--r-- | pandoc/template.html | 261 |
6 files changed, 1 insertions, 337 deletions
@@ -4,16 +4,12 @@ GitHub CVE Proof of Concept scraper, deployed with GitHub actions to fetch and clone any newly published CVE PoCs matching the format of `cve-<current_year>`, into the `pocs/` directory. -Cloned repositories are not added as submodules and a workflow step renames all `.git` directories into `.git.bak`; this can be reverted to inspect commit history. - -You can find the live version hosted through GitHub Pages at [https://cve.heqnx.com](https://cve.heqnx.com) and a simple RSS feed at [https://cve.heqnx.com/feed.xml](https://cve.heqnx.com/feed.xml) +You can find the live version hosted at [https://heqnx.com/cve](https://heqnx.com/cve) and a simple RSS feed at [https://heqnx.com/cve/feed.xml](https://heqnx.com/cve/feed.xml) ## Run it yourself Compile `cve-poc-mon` from the `src/` directory with either `go build`, `make` for all targets, or `make <target>` for a specific target (e.g., `make linux-amd64`). -Set up your own GitHub Actions workflow; check [.github/workflows/cve-poc-mon.yaml](.github/workflows/cve-poc-mon.yaml) to see how it runs in this repo. - ## Cleanup steps for multiple binary blobs commited - check blobs diff --git a/generate-html.sh b/generate-html.sh deleted file mode 100755 index 1faeaf4..0000000 --- a/generate-html.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -usage() { - printf "%s\n" \ - "generate html page for available pocs" \ - "usage: $(basename ${0}) -o </path/to/output/dir> -p <path/to/pocs/dir>" - exit 1 -} - -while getopts "o:p:h" opts; do - case "${opts}" in - o) output="${OPTARG}";; - p) pocs="${OPTARG}";; - h) usage;; - *) usage;; - esac -done - -if test "${output}" && test "${pocs}"; then - date=$(date -u "+%Y-%m-%d %H:%M:%S") - mkdir -p "${output}" &>/dev/null - - if test -d pandoc/assets; then - cp -r pandoc/assets "${output}" - else - printf "%s\n" "[err] pandoc/assets/ dir not found" - exit 1 - fi - - if command -v pandoc &>/dev/null; then - count=$(cat "${pocs}/README.md" | wc -l) - size=$(du -sh "${pocs}" | awk '{print $1}') - if (tac "${pocs}/README.md" | pandoc \ - -s \ - --toc \ - --metadata "title=cve proof of concepts" \ - --metadata "date=${date} utc" \ - --metadata "rss_url=https://cve.heqnx.com/feed.xml" \ - --metadata "count=${count}" \ - --metadata "size=${size}" \ - --template pandoc/template.html \ - --lua-filter=pandoc/add-target-blank.lua \ - -o "${output}/index.html"); then \ - printf "%s\n" "[inf] successfully generated html" - else - printf "%s\n" "[err] error generating html" - fi - - if command -v tidy &>/dev/null; then - if tidy --indent yes --wrap 0 -m --quiet yes --indent-spaces 2 --tidy-mark no "${output}/index.html"; then - printf "%s\n" "[inf] prettified html" - else - printf "%s\n" "[err] failed to prettify html" - fi - else - printf "%s\n" "[warn] tidy not found, skipping html prettify" - fi - else - printf "%s\n" "[err] pandoc not found" - exit 1 - fi -else - usage -fi diff --git a/pandoc/add-target-blank.lua b/pandoc/add-target-blank.lua deleted file mode 100644 index 6061f76..0000000 --- a/pandoc/add-target-blank.lua +++ /dev/null @@ -1,7 +0,0 @@ -function Link(elem) - if not elem.attributes.target then - elem.attributes.target = "_blank" - elem.attributes.rel = "noopener" - end - return elem -end diff --git a/pandoc/assets/MorePerfectDOSVGA.ttf b/pandoc/assets/MorePerfectDOSVGA.ttf Binary files differdeleted file mode 100644 index bf70112..0000000 --- a/pandoc/assets/MorePerfectDOSVGA.ttf +++ /dev/null diff --git a/pandoc/assets/background.webm b/pandoc/assets/background.webm Binary files differdeleted file mode 100644 index 641f400..0000000 --- a/pandoc/assets/background.webm +++ /dev/null diff --git a/pandoc/template.html b/pandoc/template.html deleted file mode 100644 index 191de87..0000000 --- a/pandoc/template.html +++ /dev/null @@ -1,261 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> - <link rel="icon" href="data:,"> - <title>cve-poc-mon</title> - <style> - @font-face { - font-family: 'MorePerfectDOSVGA'; - src: url('assets/MorePerfectDOSVGA.ttf') format('truetype'); - } - ::-webkit-scrollbar { - display: none; - } - * { - -ms-overflow-style: none; - scrollbar-width: none; - } - body { - background-color: black; - color: #bbbbbb; - font-family: 'MorePerfectDOSVGA', monospace; - font-size: 14px; - line-height: 1.6; - max-width: 1000px; - margin: 0 auto; - padding: 20px; - } - .title-box { - text-align: left; - border: 1px solid #333; - padding: 15px; - margin-bottom: 10px; - display: flex; - flex-wrap: wrap; - align-items: flex-start; - gap: 10px; - } - .title-box h1 { - color: #bbbbbb; - font-size: 18px; - margin: 0; - font-weight: normal; - flex: 1 1 100%; - } - .title-box .links { - display: flex; - gap: 15px; - flex-wrap: wrap; - } - .title-box .rss-link, - .title-box .repo-link { - color: #bbbbbb; - text-decoration: none; - font-size: 14px; - } - .title-box .rss-link:hover, - .title-box .repo-link:hover { - color: #ffffff; - } - .title-box .count { - color: #bbbbbb; - font-size: 14px; - } - .content { - text-align: left; - border: 1px solid #333; - padding: 15px; - } - .content ul { - list-style: none; - padding: 0; - margin: 0; - } - .content li { - margin: 20px 0; - } - .content li a { - color: #bbbbbb; - text-decoration: none; - border-bottom: 1px solid #333; - display: block; - margin-bottom: 5px; - } - .content li a:hover { - color: #ffffff; - border-bottom-color: #bbbbbb; - } - .content li span, - .content li p { - color: #bbbbbb; - text-align: justify; - display: block; - } - a { - color: #bbbbbb; - text-decoration: none; - } - a:hover { - color: #ffffff; - } - pre, code { - color: #bbbbbb; - font-family: 'MorePerfectDOSVGA', monospace; - } - .search-box { - margin-top: 15px; - flex: 1 1 100%; - } - .search-box input { - background-color: #222; - border: 1px solid #333; - color: #bbbbbb; - font-family: 'MorePerfectDOSVGA', monospace; - font-size: 14px; - padding: 8px; - width: 100%; - box-sizing: border-box; - outline: none; - } - .search-box input:focus { - border-color: #bbbbbb; - } - .search-box input::placeholder { - color: #666; - opacity: 1; - } - .video-background { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: -1; - overflow: hidden; - } - .video-background video { - width: 100vw; - height: 100vh; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%) skew(8deg); - object-fit: cover; - opacity: 0.15; - } - .back-to-top { - position: fixed; - top: 20px; - right: 20px; - background-color: rgba(0, 0, 0, 0.5); - color: #bbbbbb; - border: 1px solid #333; - padding: 8px 12px; - font-family: 'MorePerfectDOSVGA', monospace; - font-size: 12px; - cursor: pointer; - display: none; - z-index: 1000; - text-align: center; - text-decoration: none; - } - .back-to-top:hover { - background-color: rgba(0, 0, 0, 0.7); - color: #ffffff; - border-color: #bbbbbb; - } - @media (max-width: 600px) { - body { - padding: 15px; - } - .title-box, - .content { - padding: 10px; - } - .title-box h1 { - font-size: 16px; - } - .title-box .links { - flex-direction: column; - gap: 8px; - } - .title-box .rss-link, - .title-box .repo-link, - .title-box .count { - font-size: 12px; - } - .search-box { - margin-top: 10px; - } - .back-to-top { - top: 15px; - right: 15px; - padding: 6px 10px; - font-size: 10px; - } - } - @media (max-width: 400px) { - .title-box { - flex-direction: column; - } - .search-box input { - font-size: 12px; - padding: 6px; - } - .back-to-top { - top: 10px; - right: 10px; - } - } - </style> -</head> -<body> - <div class="video-background"> - <video autoplay muted loop playsinline> - <source src="/assets/background.webm" type="video/webm"> - </video> - </div> - <button class="back-to-top" onclick="scrollToTop()">back to top</button> - <div class="title-box"> - <h1>$title$</h1> - <div class="links"> - <a href="$rss_url$" target="_blank" class="rss-link">[rss feed]</a> - <span class="count">[stats: $count$ repos, total size $size$, updated $date$]</span> - </div> - <div class="search-box"> - <input type="text" id="searchInput" placeholder="search this page"> - </div> - </div> - <div class="content"> - $body$ - </div> - <script> - document.getElementById('searchInput').addEventListener('input', function() { - const query = this.value.toLowerCase(); - const items = document.querySelectorAll('.content li'); - items.forEach(item => { - const text = item.textContent.toLowerCase(); - item.style.display = text.includes(query) ? '' : 'none'; - }); - }); - - const backToTopButton = document.querySelector('.back-to-top'); - window.addEventListener('scroll', () => { - if (window.scrollY > 300) { - backToTopButton.style.display = 'block'; - } else { - backToTopButton.style.display = 'none'; - } - }); - - function scrollToTop() { - window.scrollTo({ - top: 0, - behavior: 'smooth' - }); - } - </script> -</body> -</html> |