Skip to content

Commit eb3ec75

Browse files
committed
Finally got audio player working
1 parent e4b2441 commit eb3ec75

File tree

6 files changed

+32
-49
lines changed

6 files changed

+32
-49
lines changed

AUDIO_SETUP.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

nsm_modules/audio_player.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# GNU nano 8.7 New Buffer *
2+
import subprocess; from pathlib import Path
3+
4+
5+
path = str(Path(__file__).parent / "output.mp3" )
6+
7+
import sys
8+
import subprocess
9+
10+
audio_file = sys.argv[1]
11+
subprocess.run([
12+
"mpv", "--no-video", "--volume=100", audio_file
13+
])
14+
print("back ran")

nsm_modules/nsm_utilities.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# ETC IMPORTS
1818
import sqlite3, os, threading, time, random, json
1919
from datetime import datetime, timedelta; from pathlib import Path
20-
import argparse, subprocess
20+
import argparse, subprocess, threading
2121

2222

2323
# VOICE
@@ -1265,10 +1265,13 @@ def tts_google(cls, say=False):
12651265

12661266

12671267

1268+
12681269
# TO PREVENT DRIVER ERRORS
12691270
if not cls.drive_error:
12701271

12711272

1273+
1274+
12721275
try:
12731276

12741277
tts = gTTS(say)
@@ -1294,6 +1297,8 @@ def tts_google(cls, say=False):
12941297

12951298
# DRIVER ERROR
12961299
cls.drive_error = True
1300+
1301+
# threading.Thread(target=_speak, args=(), daemon=True).start()
12971302

12981303

12991304
@staticmethod
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
33

4+
# RUNNING THIS --> bash install_yoda_audio.sh
5+
46
echo "[YODA Audio Installer]"
57

68
# Check if running as root
@@ -162,4 +164,4 @@ Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRE
162164

163165
┌──(venv)─(bari㉿laptop)-[~/Documents/nsm_tools/Yoda]
164166
└─$ sudo yoda-audio nsm_modules/output.mp3
165-
Queued: /tmp/yoda-audio/1765709696228092337_output.mp3
167+
Queued: /tmp/yoda-audio/1765709696228092337_output.mp3

yoda/yoda_controller.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# THE SKILLS WILL PAY THE BILLS
55

66
# Yoda IMPORTS //
7-
from nsm_modules.nsm_utilities import Connection_Handler
7+
from nsm_modules.nsm_utilities import Connection_Handler, TTS
88

99

1010
# UI IMPORTS
@@ -193,14 +193,16 @@ def start(cls, router_ip, iface):
193193
"""This will be the main controller method that calls upon sub methods"""
194194

195195

196-
cls.attack_poison = True
197196
nodes_attacked = []
198197

199198

200199
def _main(router_ip, iface):
201200

202-
201+
202+
#if cls.attack_poison: return
203203
console.print("\n\n[+] LAN Attack 1 Started\n\n", style="bold green")
204+
TTS.tts_google(say="Yes sir. Yoda now launching attack")
205+
cls.attack_poison = True
204206

205207

206208
while cls.attack_poison:
@@ -223,8 +225,8 @@ def _main(router_ip, iface):
223225

224226
time.sleep(1)
225227

226-
227-
threading.Thread(target=_main, args=(router_ip, iface), daemon=True).start()
228+
if not cls.attack_poison:
229+
threading.Thread(target=_main, args=(router_ip, iface), daemon=True).start()
228230

229231

230232

@@ -235,6 +237,8 @@ def stop(cls):
235237

236238
ARP_Poison.attack_poison = False; ARP_Poison.attack_scan = False
237239
console.print("\n\n[+] LAN Attack 1 Terminated\n\n", style="bold green")
240+
TTS.tts_google(say="Yes sir. Yoda now KIlling attack")
241+
238242

239243

240244

0 commit comments

Comments
 (0)