Skip to content

Commit 6259b8b

Browse files
committed
Add logo, fix ruff findings.
1 parent f40c54b commit 6259b8b

27 files changed

+82
-56
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# shyhurricane
22

3+
<img src="shyhurricane/assets/shyhurricane.png" alt="Hurricane picking padlock logo" width="150" style="float: left; margin-right:10px;" />
4+
35
ShyHurricane is an MCP server to assist AI in offensive security testing. It aims to solve a few problems observed with
46
AI using a single tool to execute commands:
57

shyhurricane/assets/favicon.ico

195 KB
Binary file not shown.
315 KB
Loading
1.64 MB
Loading

shyhurricane/cleaners.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import json
22
import logging
3+
import re
34

45
from lxml import etree
5-
import re, html
6+
import html
67
from bs4 import BeautifulSoup, Doctype
78
from collections import OrderedDict
89
import json5

shyhurricane/http_csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def http_csv_generator(iterable) -> Generator[IngestableRequestResponse, None, N
7777
pass
7878
continue
7979

80-
if url is None and '://' in column and not '\n' in column:
80+
if url is None and '://' in column and '\n' not in column:
8181
try:
8282
urlparse_ext(column)
8383
url = column.strip()

shyhurricane/mcp_server/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from mcp.types import INVALID_REQUEST, Tool
1717
from pydantic import ValidationError, Field
1818

19-
import shyhurricane.mcp_server.server_context
2019
from shyhurricane.mcp_server.app_context import AppContext
2120
from shyhurricane.server_config import get_server_config
2221
from shyhurricane.mcp_server.server_context import get_server_context, ServerContext
@@ -124,7 +123,7 @@ async def list_tools(self) -> list[Tool]:
124123
if not self.open_world:
125124
logger.info("Filtering tools for open_world = False")
126125
tools = list(
127-
filter(lambda tool: tool.annotations is not None and tool.annotations.openWorldHint == False, tools))
126+
filter(lambda tool: tool.annotations is not None and tool.annotations.openWorldHint == False, tools)) # noqa: E712
128127
return tools
129128

130129

@@ -167,7 +166,7 @@ def get_additional_hosts(ctx: Context, additional_hosts: Dict[str, str] = None)
167166
validated: Dict[str, str] = {}
168167
for host, ip in (additional_hosts or {}).items():
169168
try:
170-
if validators.domain(host) == True and ipaddress.ip_address(ip):
169+
if validators.domain(host) == True and ipaddress.ip_address(ip): # noqa: E712
171170
validated[host] = ip
172171
cached_get_additional_hosts[host] = ip
173172
except (ValueError, ValidationError):

shyhurricane/mcp_server/encoder_decoder_impl.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import re
21
from typing import List
32

43
from base64 import b64encode, b64decode

shyhurricane/mcp_server/tools/encoder_decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pydantic import BaseModel, Field
44
from mcp.server.fastmcp import Context
55
from mcp.types import ToolAnnotations
6-
from shyhurricane.mcp_server import mcp_instance, log_tool_history, get_server_context
6+
from shyhurricane.mcp_server import mcp_instance, log_tool_history
77
from shyhurricane.mcp_server.encoder_decoder_impl import do_encode_decode
88

99

shyhurricane/mcp_server/tools/find_web_resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ async def determine_targets(target_query: str):
331331
logger.info("Asking user for URL(s)")
332332
assert_elicitation(server_ctx)
333333
target_elicit_result = await ctx.elicit(
334-
message=f"What URL(s) should we look for?", schema=RequestTargetUrl
334+
message="What URL(s) should we look for?", schema=RequestTargetUrl
335335
)
336336
match target_elicit_result:
337337
case AcceptedElicitation(data=data):
@@ -407,7 +407,7 @@ async def determine_targets(target_query: str):
407407
http_methods=http_methods,
408408
limit=limit,
409409
)
410-
except McpError as e:
410+
except McpError:
411411
await ctx.info(f"Spidering {missing_targets_str}")
412412
logger.warning("elicit not supported, starting spider")
413413
for target in missing_targets:

0 commit comments

Comments
 (0)