Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
828f909
Update metadata.py
whotwagner Dec 3, 2024
ce0f80a
Update conf.py
whotwagner Dec 3, 2024
24da162
Update conf.py
whotwagner Dec 3, 2024
a816d26
Update metadata.py
whotwagner Dec 3, 2024
054babf
Merge pull request #138 from ait-testbed/development
whotwagner Dec 3, 2024
ab6a83c
Update README.md
skopikf Jan 14, 2025
4dcfcee
Update README.md
skopikf Jan 14, 2025
24f5426
Update README.md
skopikf Jan 15, 2025
962130c
Merge pull request #155 from ait-testbed/development
whotwagner Feb 27, 2025
d6b4279
Update metadata.py
whotwagner Feb 27, 2025
942a81e
Merge pull request #156 from ait-testbed/whotwagner-patch-2
whotwagner Feb 27, 2025
142612f
Update conf.py
whotwagner Feb 27, 2025
cd0d959
Update Jenkinsfile
whotwagner Feb 27, 2025
46b4b7e
Update Jenkinsfile
whotwagner Feb 27, 2025
edb9449
Update Jenkinsfile
whotwagner Feb 27, 2025
3d0813e
Update Jenkinsfile
whotwagner Feb 27, 2025
fce6028
Update Jenkinsfile
whotwagner Feb 27, 2025
52f6eb9
Update Jenkinsfile
whotwagner Feb 27, 2025
a771e8f
Fixed release conflict
whotwagner May 5, 2025
4b410c8
add keep_serving option to webserv command
thorinaboenke Dec 16, 2025
cc4b179
add instruction on background mode to webserv docs
thorinaboenke Dec 16, 2025
9ed1ef0
update brwoser executor test
thorinaboenke Dec 17, 2025
9a2d5d5
Merge pull request #188 from thorinaboenke/feature_186_webserver_keep…
whotwagner Dec 17, 2025
3176be7
Add paper link in readme
landauermax Feb 16, 2026
d99c488
Merge pull request #204 from ait-testbed/add_paper
whotwagner Feb 16, 2026
22101dd
Added .python-version
whotwagner Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cpython@3.12
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ pipeline {
}
dir("docs") {
sh "id"
sh "useradd --system --uid=112 -U --home /home/jenkins -m --shell /bin/bash jenkins"
sh "ls -la /docs"
sh "make html"
sh "make html"
sh "chown -R jenkins *"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Please take a look at our documentation for how to install and use attackmate:
* [Documentation](https://aeciddocs.ait.ac.at/attackmate/current)
* [Command Reference](https://aeciddocs.ait.ac.at/attackmate/current/playbook/commands/index.html)
* [Example Playbooks](https://aeciddocs.ait.ac.at/attackmate/current/playbook/examples.html)
* [Arxiv Paper](https://arxiv.org/pdf/2601.14108)

## Disclaimer

Expand Down
11 changes: 9 additions & 2 deletions docs/source/playbook/commands/webserv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ webserv
=======

Start a http-server and share a file. This command
will return after the first HTTP-request.

will return after the first HTTP-request. To keep serving the file instead set keep_serving to True.
The webserv command has to be run in background mode, otherwise the playbook execution will halt until a request is received.
.. code-block:: yaml

###
Expand Down Expand Up @@ -35,3 +35,10 @@ will return after the first HTTP-request.

:type: str
:default: ``0.0.0.0``

.. confval:: keep_servng

Keep serving even after a request has been processed

:type: bool
:default: False
9 changes: 8 additions & 1 deletion src/attackmate/executors/http/webservexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ def _exec_cmd(self, command: WebServCommand) -> Result:
address = (command.address, CmdVars.variable_to_int('Port', command.port))
try:
server = WebServe(address, WebRequestHandler, local_path=command.local_path)
server.handle_request()
if command.keep_serving:
self.logger.info('Keeping server alive to serve multiple requests')
try:
server.serve_forever()
except KeyboardInterrupt:
server.server_close()
else:
server.handle_request()
except Exception as e:
raise ExecException(e)

Expand Down
1 change: 1 addition & 0 deletions src/attackmate/schemas/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class WebServCommand(BaseCommand):
local_path: str
port: StringNumber = '8000'
address: str = '0.0.0.0' # nosec
keep_serving: bool = False


@CommandRegistry.register('http-client')
Expand Down
2 changes: 1 addition & 1 deletion test/units/test_browserexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def test_browser_executor_named_session(browser_executor):
reuse_cmd = BrowserCommand(
type='browser',
cmd='click',
selector='a[href="https://www.iana.org/domains/example"]',
selector='a[href="http://www.iana.org/domains/example"]',
session='my_session'
)
result2 = browser_executor._exec_cmd(reuse_cmd)
Expand Down
Loading