From 912ce4cb4d1f3c631d4bc8331c05aa707e328d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mayoral=20Vilches?= Date: Mon, 26 May 2025 10:58:49 +0200 Subject: [PATCH] switch to .3 for 0.4.0 to avoid conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: VĂ­ctor Mayoral Vilches --- .devcontainer/Dockerfile | 2 +- .devcontainer/docker-compose.yml | 30 ++++++++++++++-------------- README.md | 2 +- docs/cai_faq.md | 2 +- src/cai/cli.py | 4 ++-- src/cai/repl/commands/config.py | 4 ++-- src/cai/util.py | 4 ++-- tests/agents/test_agent_inference.py | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 43fe72ae..4f539061 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -78,7 +78,7 @@ RUN wget https://raw.githubusercontent.com/adfoster-r7/metasploit-info/master/in # NOTE: align dev env in Linux # work -# RUN echo "192.168.2.1 host.docker.internal" >> /etc/hosts +# RUN echo "192.168.3.1 host.docker.internal" >> /etc/hosts # Update and upgrade packages # Preconfigure console-setup and install kali-linux-headless fixers RUN apt-get update && \ diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 92b14fb9..e8d8b7d2 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -18,7 +18,7 @@ services: command: /bin/sh -c "while sleep 10; do :; done" networks: cainet: - ipv4_address: 192.168.2.5 + ipv4_address: 192.168.3.5 cap_add: - NET_ADMIN - SYS_ADMIN @@ -40,7 +40,7 @@ services: # " # networks: # cainet: - # ipv4_address: 192.168.2.11 + # ipv4_address: 192.168.3.11 # mac_address: 08:00:27:85:55:86 # # Vulnhub vulnerable machine (Bob) SUGGESTION: Comment this and use PentestPerf @@ -52,20 +52,20 @@ services: # - "8080:80" # networks: # cainet: - # ipv4_address: 192.168.2.12 + # ipv4_address: 192.168.3.12 # mac_address: 08:00:27:cb:07:d4 - # Qdrant vector database - qdrant: - image: qdrant/qdrant - ports: - - "6333:6333" - - "6334:6334" - volumes: - - ./qdrant_storage:/qdrant/storage:z - networks: - cainet: - ipv4_address: 192.168.2.13 + # # Qdrant vector database + # qdrant: + # image: qdrant/qdrant + # ports: + # - "6333:6333" + # - "6334:6334" + # volumes: + # - ./qdrant_storage:/qdrant/storage:z + # networks: + # cainet: + # ipv4_address: 192.168.3.13 ################# # NETWORKS @@ -75,4 +75,4 @@ networks: ipam: driver: default config: - - subnet: 192.168.2.0/24 + - subnet: 192.168.3.0/24 diff --git a/README.md b/README.md index 6613654b..0190e731 100644 --- a/README.md +++ b/README.md @@ -857,7 +857,7 @@ curl -v http://host.docker.internal:8000/api/version ![cai-004-first-message](imgs/readme_imgs/cai-004-first-message.png) -The starting user prompt in this case is: `Target IP: 192.168.2.10, perform a full network scan`. +The starting user prompt in this case is: `Target IP: 192.168.3.10, perform a full network scan`. The agent started performing a nmap scan. You could either interact with the agent and give it more instructions, or let it run to see what it explores next. diff --git a/docs/cai_faq.md b/docs/cai_faq.md index b5313851..28beeea9 100644 --- a/docs/cai_faq.md +++ b/docs/cai_faq.md @@ -61,7 +61,7 @@ ![cai-004-first-message](media/cai-004-first-message.png) - The starting user prompt in this case is: `Target IP: 192.168.2.10, perform a full network scan`. + The starting user prompt in this case is: `Target IP: 192.168.3.10, perform a full network scan`. The agent started performing a nmap scan. You could either interact with the agent and give it more instructions, or let it run to see what it explores next. diff --git a/src/cai/cli.py b/src/cai/cli.py index b2965d35..16542abb 100644 --- a/src/cai/cli.py +++ b/src/cai/cli.py @@ -13,9 +13,9 @@ Environment Variables CTF_CHALLENGE: Specific challenge name within the CTF to test CTF_SUBNET: Network subnet for the CTF - container (default: "192.168.2.0/24") + container (default: "192.168.3.0/24") CTF_IP: IP address for the CTF - container (default: "192.168.2.100") + container (default: "192.168.3.100") CTF_INSIDE: Whether to conquer the CTF from within container (default: "true") diff --git a/src/cai/repl/commands/config.py b/src/cai/repl/commands/config.py index b80d37ff..e9f1d970 100644 --- a/src/cai/repl/commands/config.py +++ b/src/cai/repl/commands/config.py @@ -30,12 +30,12 @@ ENV_VARS = { 3: { "name": "CTF_SUBNET", "description": "Network subnet for the CTF container", - "default": "192.168.2.0/24" + "default": "192.168.3.0/24" }, 4: { "name": "CTF_IP", "description": "IP address for the CTF container", - "default": "192.168.2.100" + "default": "192.168.3.100" }, 5: { "name": "CTF_INSIDE", diff --git a/src/cai/util.py b/src/cai/util.py index 5b1a3ef7..4ca01a22 100644 --- a/src/cai/util.py +++ b/src/cai/util.py @@ -2933,9 +2933,9 @@ def setup_ctf(): ctf = ptt.ctf( # pylint: disable=I1101 # noqa ctf_name, - subnet=os.getenv('CTF_SUBNET', "192.168.2.0/24"), + subnet=os.getenv('CTF_SUBNET', "192.168.3.0/24"), container_name="ctf_target", - ip_address=os.getenv('CTF_IP', "192.168.2.100"), + ip_address=os.getenv('CTF_IP', "192.168.3.100"), ) ctf.start_ctf() diff --git a/tests/agents/test_agent_inference.py b/tests/agents/test_agent_inference.py index 43b690d2..d3a5d2fa 100644 --- a/tests/agents/test_agent_inference.py +++ b/tests/agents/test_agent_inference.py @@ -46,7 +46,7 @@ async def test_one_tool_agent_inference(): """ Non-streaming inference test for the one_tool_agent. """ - prompt = "use nmap to scan 192.168.2.0/24" + prompt = "use nmap to scan 192.168.3.0/24" result = await Runner.run(get_agent_by_name("one_tool_agent"), prompt) final_output = result.final_output or "" assert final_output, "Expected non-empty final output"