Created
May 19, 2018 11:53
-
-
Save Novex/cfa41eceb55b238d325afaab7bb271ba to your computer and use it in GitHub Desktop.
Sony fdr-x3000 ustream mitm setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from http.server import HTTPServer | |
from http.server import BaseHTTPRequestHandler | |
import json | |
class MyHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) | |
self.send_header('Content-type', 'application/json') | |
self.end_headers() | |
self.wfile.write(json.dumps({'channels': | |
{'23548279': { | |
'broadcast_urls': ['rtmp://192.168.0.5/stream']} | |
} | |
})) | |
return | |
def run(server_class=HTTPServer, handler_class=MyHandler): | |
server_address = ('0.0.0.0', 80) | |
httpd = server_class(server_address, handler_class) | |
try: | |
print("Server works on http://localhost:80") | |
httpd.serve_forever() | |
except KeyboardInterrupt: | |
print("Stop the server on http://localhost:80") | |
httpd.socket.close() | |
if __name__ == '__main__': | |
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface=wlan0 | |
dhcp-range=10.0.0.10,10.0.0.250,12h | |
dhcp-option=3,10.0.0.1 | |
dhcp-option=6,10.0.0.1 | |
server=8.8.8.8 | |
log-queries | |
log-dhcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10.0.0.1 api.ustream.tv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface=wlan0 | |
#driver=nl80211 | |
ssid=Sony MITM | |
channel=6 | |
auth_algs=1 | |
wpa=2 | |
wpa_key_mgmt=WPA-PSK | |
rsn_pairwise=CCMP | |
wpa_passphrase=partycat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ifconfig wlan0 10.0.0.1/24 | |
sysctl -w net.ipv4.ip_forward=1 | |
iptables -P FORWARD ACCEPT | |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
gnome-terminal -e "dnsmasq -C dnsmasq.conf -H fakehosts.conf -d" | |
gnome-terminal -e "hostapd hostapd.conf" | |
gnome-terminal -e "python api-server.py" | |
wireshark & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment