Skip to content

Commit 696d0a0

Browse files
Fix pushover notifications in python3
1 parent 6f2c072 commit 696d0a0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: Core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def decrypt_bytes_gzip(key, data):
7272
data = gzip.decompress(data[16:])
7373
try:
7474
data = data.decode("utf-8")
75-
except:
75+
except Exception:
7676
data = data
7777
return data
7878

Diff for: Implant.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ def display(self):
7373
try:
7474

7575
if EnableNotifications.lower().strip() == "yes":
76-
import httplib, urllib
77-
conn = httplib.HTTPSConnection("api.pushover.net:443")
76+
import http.client, urllib
77+
conn = http.client.HTTPSConnection("api.pushover.net:443")
7878
conn.request("POST", "/1/messages.json",
79-
urllib.urlencode({
79+
urllib.parse.urlencode({
8080
"token": APIToken,
8181
"user": APIUser,
8282
"message": "[%s] - NewImplant: %s @ %s" % (NotificationsProjectName, self.User, self.Hostname),
@@ -88,7 +88,7 @@ def display(self):
8888
number = number.replace('"', '')
8989
url = "https://api.clockworksms.com/http/send.aspx?key=%s&to=%s&from=PoshC2&content=[%s]%%20-%%20NewImplant:%%20%s\\%s @ %s" % (NotificationsProjectName, APIKEY, number, self.Domain, self.User, self.Hostname)
9090
url = url.replace(" ", "+")
91-
urllib.urlopen(url)
91+
urllib.request.urlopen(url)
9292
except Exception as e:
9393
print("SMS send error: %s" % e)
9494

0 commit comments

Comments
 (0)