--- /dev/null
+#!/bin/bash
+# Devi Nivas CCTV Launcher for Linux
+# It's a TERRIBLE idea to expose any NVR server to the internet, especially if
+# it's from HikVision. (they store passwords in plaintext!)
+
+# DISH had a jerry-rigged SSH server used to access devices on the local
+# network. This is a three-part script which performs the following:
+# 1) Asks for your SSH passphrase to enter into ssh
+# 2) Starts an ssh session in the background using your SSH passphrase
+# 3) Opens Google Chrome and keeps the SSH session running until Chrome is quit
+# While the script is highly specific to this use case, it is possible to adapt
+# it into a simple proxy launcher.
+
+# That being said, it is an equally terrible idea to use a SSH server as a VPN
+# server. It's clearly not designed for that, and can cause SERIOUS security
+# loopholes if not configured correctly.
+
+set -e
+
+# connect to the SSH server
+expect -f DvProxyStart.tcl
+google-chrome --user-data-dir=$(mktemp -d) --new-window http://192.168.1.29 \
+ --incognito --proxy-server="socks5://127.0.0.1:8000"
+ssh -S /tmp/proxydevinivas -O exit server
--- /dev/null
+#/usr/bin/expect -f
+
+set timeout -1
+
+# replase example.org with your server's IP
+spawn ssh -g -f -N -M -S /tmp/proxydevinivas -D 8000 -C madvaith1@example.org
+
+expect ": "
+
+set password [exec ./askpass.py]
+
+send "$password\r"
+
+expect eof
--- /dev/null
+#!/usr/bin/python3
+
+# Password prompter for DvProxy. It's probably smarter to use Zenity instead.
+
+from tkinter import Tk
+from tkinter import Label
+from tkinter import Entry
+from tkinter import Button
+
+tk = Tk();
+
+Label(tk, text="Enter your SSH passphrase here:").pack(
+ side="top");
+
+ent = Entry(tk, show="*");
+ent.pack(side="top", expand=True);
+
+def resp(e=None, n=ent):
+ print(n.get(), end="");
+ exit();
+
+ent.bind("<Return>", resp);
+
+Button(tk, text="Submit", command=resp).pack(side="top");
+
+tk.mainloop();