Skip to content

Commit

Permalink
fix interactsh poll bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Dec 23, 2023
1 parent 4c9ecb9 commit 96b3d60
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions bbot/core/helpers/interactsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,22 @@ async def poll(self):
if self.token:
headers["Authorization"] = self.token

r = await self.parent_helper.request(
f"https://{self.server}/poll?id={self.correlation_id}&secret={self.secret}", headers=headers
)

ret = []
data_list = r.json().get("data", None)
if data_list:
aes_key = r.json()["aes_key"]
try:
r = await self.parent_helper.request(
f"https://{self.server}/poll?id={self.correlation_id}&secret={self.secret}", headers=headers
)

for data in data_list:
decrypted_data = self._decrypt(aes_key, data)
ret.append(decrypted_data)
return ret
ret = []
data_list = r.json().get("data", None)
if data_list:
aes_key = r.json()["aes_key"]

for data in data_list:
decrypted_data = self._decrypt(aes_key, data)
ret.append(decrypted_data)
return ret
except Exception as e:
raise InteractshError(f"Error polling interact.sh: {e}")

async def poll_loop(self, callback):
"""
Expand Down

0 comments on commit 96b3d60

Please sign in to comment.