Skip to content

Instantly share code, notes, and snippets.

@Novex
Created May 19, 2018 11:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Novex/cfa41eceb55b238d325afaab7bb271ba to your computer and use it in GitHub Desktop.
Save Novex/cfa41eceb55b238d325afaab7bb271ba to your computer and use it in GitHub Desktop.
Sony fdr-x3000 ustream mitm setup
#!/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()
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
10.0.0.1 api.ustream.tv
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
#!/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