forked from p15670423/monkey
Agent: Rename api/monkey endpoint to api/agent
This commit is contained in:
parent
c0da5b7103
commit
3597e08628
|
@ -50,7 +50,7 @@ class ControlClient(object):
|
||||||
monkey["tunnel"] = ControlClient.proxies.get("https")
|
monkey["tunnel"] = ControlClient.proxies.get("https")
|
||||||
|
|
||||||
requests.post( # noqa: DUO123
|
requests.post( # noqa: DUO123
|
||||||
"https://%s/api/monkey" % (WormConfiguration.current_server,),
|
"https://%s/api/agent" % (WormConfiguration.current_server,),
|
||||||
data=json.dumps(monkey),
|
data=json.dumps(monkey),
|
||||||
headers={"content-type": "application/json"},
|
headers={"content-type": "application/json"},
|
||||||
verify=False,
|
verify=False,
|
||||||
|
@ -173,7 +173,7 @@ class ControlClient(object):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
reply = requests.get( # noqa: DUO123
|
reply = requests.get( # noqa: DUO123
|
||||||
"https://%s/api/monkey/%s/legacy" % (WormConfiguration.current_server, GUID),
|
"https://%s/api/agent/%s/legacy" % (WormConfiguration.current_server, GUID),
|
||||||
verify=False,
|
verify=False,
|
||||||
proxies=ControlClient.proxies,
|
proxies=ControlClient.proxies,
|
||||||
timeout=MEDIUM_REQUEST_TIMEOUT,
|
timeout=MEDIUM_REQUEST_TIMEOUT,
|
||||||
|
@ -210,7 +210,7 @@ class ControlClient(object):
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
requests.patch( # noqa: DUO123
|
requests.patch( # noqa: DUO123
|
||||||
"https://%s/api/monkey/%s" % (WormConfiguration.current_server, GUID),
|
"https://%s/api/agent/%s" % (WormConfiguration.current_server, GUID),
|
||||||
data=json.dumps({"config_error": True}),
|
data=json.dumps({"config_error": True}),
|
||||||
headers={"content-type": "application/json"},
|
headers={"content-type": "application/json"},
|
||||||
verify=False,
|
verify=False,
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CachingAgentRepository(IAgentRepository):
|
||||||
@lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
def _download_binary_from_island(self, os: str) -> bytes:
|
def _download_binary_from_island(self, os: str) -> bytes:
|
||||||
response = requests.get( # noqa: DUO123
|
response = requests.get( # noqa: DUO123
|
||||||
f"{self._island_url}/api/monkey/download/{os}",
|
f"{self._island_url}/api/agent/download/{os}",
|
||||||
verify=False,
|
verify=False,
|
||||||
proxies=self._proxies,
|
proxies=self._proxies,
|
||||||
timeout=MEDIUM_REQUEST_TIMEOUT,
|
timeout=MEDIUM_REQUEST_TIMEOUT,
|
||||||
|
|
|
@ -50,7 +50,7 @@ class ControlChannel(IControlChannel):
|
||||||
def get_config(self) -> dict:
|
def get_config(self) -> dict:
|
||||||
try:
|
try:
|
||||||
response = requests.get( # noqa: DUO123
|
response = requests.get( # noqa: DUO123
|
||||||
"https://%s/api/monkey/%s" % (WormConfiguration.current_server, self._agent_id),
|
"https://%s/api/agent/%s" % (WormConfiguration.current_server, self._agent_id),
|
||||||
verify=False,
|
verify=False,
|
||||||
proxies=ControlClient.proxies,
|
proxies=ControlClient.proxies,
|
||||||
timeout=SHORT_REQUEST_TIMEOUT,
|
timeout=SHORT_REQUEST_TIMEOUT,
|
||||||
|
|
Loading…
Reference in New Issue