Skip to content

Commit a3289cf

Browse files
committed
Minor changes
1 parent 0af09bd commit a3289cf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bbot/modules/emailformat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ async def handle_event(self, event):
2929
encrypted_emails = await self.helpers.re.findall(self.cfemail_regex, r.text)
3030

3131
for enc in encrypted_emails:
32-
if len(enc) < 2 or len(enc) % 2 != 0:
32+
enc_len = len(enc)
33+
34+
if enc_len < 2 or enc_len % 2 != 0:
3335
continue
3436

3537
key = int(enc[:2], 16)
3638

37-
email = "".join([chr(int(enc[i : i + 2], 16) ^ key) for i in range(2, len(enc), 2)]).lower()
39+
email = "".join([chr(int(enc[i : i + 2], 16) ^ key) for i in range(2, enc_len, 2)]).lower()
3840

3941
if email.endswith(query):
4042
await self.emit_event(

0 commit comments

Comments
 (0)