MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / setup

Method setup

bbot/modules/output/http.py:30–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28 }
29
30 async def setup(self):
31 self.url = self.config.get("url", "")
32 self.method = self.config.get("method", "POST")
33 self.timeout = self.config.get("timeout", 10)
34 self.siem_friendly = self.config.get("siem_friendly", False)
35 self.headers = {}
36 bearer = self.config.get("bearer", "")
37 if bearer:
38 self.headers["Authorization"] = f"Bearer {bearer}"
39 username = self.config.get("username", "")
40 password = self.config.get("password", "")
41 self.auth = None
42 if username:
43 self.auth = (username, password)
44 if not self.url:
45 self.warning("Must set URL")
46 return False
47 if not self.method:
48 self.warning("Must set HTTP method")
49 return False
50 return True
51
52 async def handle_event(self, event):
53 while 1:

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
warningMethod · 0.45

Tested by

no test coverage detected