commit 8fd4a7c19ce1e5d3ecff9067b4bf9df1e7a9f571
Author: root <root@hub.scroll.pub> Date: 2024-12-30 07:31:25 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..23ce941 --- /dev/null +++ b/body.html @@ -0,0 +1,18 @@ +<header> + <h1>Attack Path Builder</h1> + <p>Visualize and construct attack paths with ease.</p> +</header> +<main> + <div id="diagram-container"> + <div id="start-node" class="node">Start</div> + <div id="path-container"></div> + <div id="end-node" class="node">End</div> + </div> + <div id="controls"> + <button id="add-step">Add Attack Step</button> + <button id="reset-path">Reset Path</button> + </div> +</main> +<footer> + <p>Build your attack strategies effectively.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..255f2d8 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://attackpath.scroll.pub +metaTags +editButton /edit.html +title Attack Path Builder +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..be478a7 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "2561f60b-8207-478d-9485-ae63db00fe32", + "object": "chat.completion", + "created": 1735543870, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nattackpath.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://attackpath.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Attack Path Builder\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Attack Path Builder</h1>\n <p>Visualize and construct attack paths with ease.</p>\n</header>\n<main>\n <div id=\"diagram-container\">\n <div id=\"start-node\" class=\"node\">Start</div>\n <div id=\"path-container\"></div>\n <div id=\"end-node\" class=\"node\">End</div>\n </div>\n <div id=\"controls\">\n <button id=\"add-step\">Add Attack Step</button>\n <button id=\"reset-path\">Reset Path</button>\n </div>\n</main>\n<footer>\n <p>Build your attack strategies effectively.</p>\n</footer>\n---style.css---\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n margin: 0;\n padding: 0;\n background: #f4f4f9;\n color: #333;\n}\n\nheader {\n background: #005f73;\n color: white;\n padding: 20px;\n text-align: center;\n}\n\nmain {\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n#diagram-container {\n display: flex;\n align-items: center;\n justify-content: center;\n margin-bottom: 20px;\n}\n\n.node {\n background: #0a9396;\n color: white;\n padding: 15px 30px;\n border-radius: 8px;\n margin: 0 10px;\n cursor: pointer;\n transition: background 0.3s ease;\n}\n\n.node:hover {\n background: #94d2bd;\n}\n\n#path-container {\n display: flex;\n align-items: center;\n}\n\n#controls {\n display: flex;\n gap: 10px;\n}\n\nbutton {\n background: #ee9b00;\n color: white;\n border: none;\n padding: 10px 20px;\n border-radius: 5px;\n cursor: pointer;\n transition: background 0.3s ease;\n}\n\nbutton:hover {\n background: #ca6702;\n}\n\nfooter {\n text-align: center;\n padding: 10px;\n background: #001219;\n color: white;\n position: fixed;\n bottom: 0;\n width: 100%;\n}\n\n@media (max-width: 600px) {\n #diagram-container {\n flex-direction: column;\n }\n\n .node {\n margin: 10px 0;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const pathContainer = document.getElementById('path-container');\n const addStepButton = document.getElementById('add-step');\n const resetPathButton = document.getElementById('reset-path');\n\n addStepButton.addEventListener('click', function() {\n const newNode = document.createElement('div');\n newNode.className = 'node';\n newNode.textContent = 'Attack Step';\n pathContainer.appendChild(newNode);\n });\n\n resetPathButton.addEventListener('click', function() {\n pathContainer.innerHTML = '';\n });\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 318, + "completion_tokens": 725, + "total_tokens": 1043, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 318 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..c14030b --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# attackpath.scroll.pub +Website generated by DeepSeek from prompt: I need a website to help me build an attack path diagram based on user input. Each node in the diagram represents an attack step. Each attack step has its own parameters, which need to be obtained from the backend. The backend will also give a default value to the parameters of each attack step. The attack path needs to have a start and end node, and users can add new attack steps before and after each step. \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..50f3abf --- /dev/null +++ b/script.js @@ -0,0 +1,16 @@ +document.addEventListener('DOMContentLoaded', function() { + const pathContainer = document.getElementById('path-container'); + const addStepButton = document.getElementById('add-step'); + const resetPathButton = document.getElementById('reset-path'); + + addStepButton.addEventListener('click', function() { + const newNode = document.createElement('div'); + newNode.className = 'node'; + newNode.textContent = 'Attack Step'; + pathContainer.appendChild(newNode); + }); + + resetPathButton.addEventListener('click', function() { + pathContainer.innerHTML = ''; + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..a63ee42 --- /dev/null +++ b/style.css @@ -0,0 +1,86 @@ +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + margin: 0; + padding: 0; + background: #f4f4f9; + color: #333; +} + +header { + background: #005f73; + color: white; + padding: 20px; + text-align: center; +} + +main { + padding: 20px; + display: flex; + flex-direction: column; + align-items: center; +} + +#diagram-container { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 20px; +} + +.node { + background: #0a9396; + color: white; + padding: 15px 30px; + border-radius: 8px; + margin: 0 10px; + cursor: pointer; + transition: background 0.3s ease; +} + +.node:hover { + background: #94d2bd; +} + +#path-container { + display: flex; + align-items: center; +} + +#controls { + display: flex; + gap: 10px; +} + +button { + background: #ee9b00; + color: white; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + transition: background 0.3s ease; +} + +button:hover { + background: #ca6702; +} + +footer { + text-align: center; + padding: 10px; + background: #001219; + color: white; + position: fixed; + bottom: 0; + width: 100%; +} + +@media (max-width: 600px) { + #diagram-container { + flex-direction: column; + } + + .node { + margin: 10px 0; + } +} \ No newline at end of file