From 32f1becd4ffc029e75559b793ebc6e1d2933b79f Mon Sep 17 00:00:00 2001 From: Advaith Menon Date: Thu, 20 Nov 2025 11:10:16 -0500 Subject: [PATCH] Add Windows Scripts * Copy Windows Scripts from the DCS period * Modify scripts to remove proprietary information * Modify e-mail addresses --- windows/proxy/CCTV.vbs | 3 + windows/proxy/KillProxy.bat | 23 ++++++ windows/proxy/LaunchProxy.bat | 22 +++++ windows/proxy/README.txt | 146 ++++++++++++++++++++++++++++++++++ windows/proxy/SetupProxy.bat | 28 +++++++ 5 files changed, 222 insertions(+) create mode 100755 windows/proxy/CCTV.vbs create mode 100755 windows/proxy/KillProxy.bat create mode 100755 windows/proxy/LaunchProxy.bat create mode 100755 windows/proxy/README.txt create mode 100755 windows/proxy/SetupProxy.bat diff --git a/windows/proxy/CCTV.vbs b/windows/proxy/CCTV.vbs new file mode 100755 index 0000000..c85c0ed --- /dev/null +++ b/windows/proxy/CCTV.vbs @@ -0,0 +1,3 @@ +Set olE = CreateObject("InternetExplorer.Application") +olE.visible = True +olE.Navigate "192.168.1.29" \ No newline at end of file diff --git a/windows/proxy/KillProxy.bat b/windows/proxy/KillProxy.bat new file mode 100755 index 0000000..3451207 --- /dev/null +++ b/windows/proxy/KillProxy.bat @@ -0,0 +1,23 @@ +@echo off +REM copyringht 2025 Advaith Menon +REM run a SOCKS5 proxy server and automatically setup proxy commands + +echo WARNING: this script simply kills all ssh processes to kill the server +echo If you have no idea what that means, press enter. Else, do either of the following: +echo 1) disconnect all ssh sessions, execute this script, and login again +echo 2) disconnect all apps using the proxy, go to LAN settings and turn off the proxy settings. + +pause +cls +echo Killing SSH.EXE forcibly... + +taskkill /f /im ssh.exe + +REM configure the proxy values +echo Configuring Windows LAN settings... + +REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f + +echo Success! +pause + diff --git a/windows/proxy/LaunchProxy.bat b/windows/proxy/LaunchProxy.bat new file mode 100755 index 0000000..08e5db1 --- /dev/null +++ b/windows/proxy/LaunchProxy.bat @@ -0,0 +1,22 @@ +@echo off +REM copyright 2025 Advaith Menon +REM run a SOCKS5 proxy server and automatically setup proxy commands + +REM configure the proxy values +echo Configuring Windows LAN settings... + +REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f +REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d socks=localhost:8000 /f + +echo Starting up the Proxy Server... +echo If the script fails/errors out, you must run KillProxy.bat! +echo Hanging seems to be OK in most cases - verify if you have an internet connection in your browser. +echo If it hangs, simply close the window. + +REM IMPORTANT!!! Replace username below with your username!!! +REM You might also need to replace example.org with the correct domain. +ssh -g -f -D 8000 -C -p 42069 ssimran3@example.org sleep 300 + + +echo Success! You have 5 minutes to connect to the SSH tunnel before it auto logs out. +pause diff --git a/windows/proxy/README.txt b/windows/proxy/README.txt new file mode 100755 index 0000000..c9d1ed0 --- /dev/null +++ b/windows/proxy/README.txt @@ -0,0 +1,146 @@ + DEVI NIVAS EXECUTABLE AND SCRIPT COLLECTION + Copyright (c) 2025 Advaith Menon as Devi Nivas DIT + All rights reserved. + +WARNING +======= + This document might contain outdated instructions from the DCS era. + DISH provides a grphical script manager interface to these scripts, which + should be used instead of executing them directly. + +Index +===== + + 0. About + 0.1 Compatibility + 0.2 License + 1. Setup and Usage + 1.1 VPN (LCS SSH) + 1.2 CCTV + 1.3 Nonglobal VPN login + + +0. About +======== + + The Devi Nivas Executable and Script Collection (hereafter referred to as + DESC) is a collection of scripts to make accessing or using Devi Nivas apps + as easy as possible, often with just a simple click. Most of the scripts are + either shell scripts or batch files, depending upon your OS. + + Since most Devi Nivas services are based on open-source applications, it is + possible to use the services without the use of these scripts if you have + sufficient technical expertise. + +0.1 Compatibility +----------------- + + Devi Nivas Scripts are provided for Windows and Linux, and have been tested + on Windows 11 and Debian 12. Compatibility for other OSes is not guaranteed, + however the shell scripts might work on UNIX based OSes like OS X. + + Currently, the scripts use a nonstandard port (8000) for SOCKS5 - this could + interfere with a development environment. This will be modified in a future + build. + +0.2 License +----------- + The DISH version of these scripts in this repository are available under the + GNU GPL v3. + + The below applies to scripts distributed to Windows users during the LCS + era: + + Since scripts might contain sensitive data such as IP addresses and user + names, you are not allowed to redistribute them to non-Devi Nivas members. In + other words, anyone without a member or sysadmin SUS ID should not have + access to any version of these files, original or abridged. + + With that being said, you are free to copy, modify and redistribute the + software among Devi Nivas members. If modifying, it should be made clear that + you are redistributing a modified version. Modified versions must be under + this same license. + + Violation of these terms could lead to permanent suspension from all + Devi Nivas services. For more information, see the manual. + + +1. Setup and Usage +================== + + * Unzip the folder and place its contents to a convinient location. Most + people prefer to use the Desktop for this purpose. + * To ensure that the scripts use your SUS ID for operations, you will need + to replace the dummy SUS ID "ssimran3" with your actual SUS ID. To do + this, right-click on the batch file, select Edit (if on Windows 11, you + will have to select Show More Options.) Then, select Edit -> Replace. + Enter "ssimran3" (without quotes) in the Find box, and your SUS ID in the + Replace box. Then, save the file by selecting File -> Save. You could also + use an editor like VS Code to perform a bulk find and replace across + files. + +1.1 VPN (LCS SSH) +----------------- + + To use the VPN, double-click on SetupProxy. You might be asked to enter a + file location, press Enter to accept the default. You will also be asked to + enter a passphrase - this is not a password, and is used to locally encrypt + your SSH key. It is highly recommended to do this as it protects your key + from being stolen by malicious actors. (Remember, if any malicious activity + is performed under your account, you will be held responsible whether or not + you were actually involved.) + + Once done, send the file to us using your registered e-mail. Our email + address is <>. You could repeat this process for + every system you want to use the VPN with. There are no limits, as long as + you don't allow non-Devi Nivas members to use the VPN. + + After your key has been added to the system, you can use the VPN by clicking + on StartProxy and StopProxy. The proxy connection times out after 5 minutes, + so make sure you use the proxy in time! + + NOTE: Since proxy settings are to be honored by applications, some might not + support access via proxy. You can still access the web version of that + application, since web browsers honor proxy settings. + + IMPORTANT: Once you are done with using the VPN, do not forget to click on + StopProxy, or else the proxy settings won't be restored! + + IMPORTANT: VPN usage is subject to the Terms of Service, present in the + manual and not stated here for brevity. Here is a summary: + 1. All communications in/out are monitored - don't do illegal/obscene stuff + 2. Don't share access with non-Devi Nivas users. + 3. You could use the system as a Linux machine, however, don't misuse the + system for computationally/RAM intensive tasks. + +1.2 CCTV +-------- + + To access the CCTV, first install Chrome. Do not use any other browser + based on the Chromium Project, such as Edge or Chromium itself - the portal + will only work on the official latest Google Chrome build. + + Connect to Devinet via the above procedure. Use the IP address + "192.168.1.29" to log in to the VPN - enter it in the address bar. This IP + address could change - you will be notified of changes. Log in using your + CCTV username and password - this is not the same as your LCS credentials. + * To create an account, send a mail to <>. You + will be given a default account password that will have to be changed. + * To change your password, select Configuration->System->User Management, + , Modify. Enter a new password that satisfies your + requirements. + * IMPORTANT: Do not install ANY plugins, even if the site says they are + required! They do not work over a proxy and will actually render your + setup unusuable. + +1.3 Nonglobal VPN Login +----------------------- + + This feature is not supported on Windows, however you can open "Internet + Options" from the Start Menu, select the "Connections" tab, click on "LAN + Settings", and uncheck "Use a proxy server for your LAN" to achieve the same + result. + + On Linux, global VPN login is not a feature - you will have to manually + update settings based on your distro and DE. + diff --git a/windows/proxy/SetupProxy.bat b/windows/proxy/SetupProxy.bat new file mode 100755 index 0000000..f63b2e8 --- /dev/null +++ b/windows/proxy/SetupProxy.bat @@ -0,0 +1,28 @@ +@echo off + +REM Copyright (c) 2025 Advaith Menon +REM Create a SSH key, if not present, and copy the public key(s). + +if exist "%USERPROFILE%\.ssh\id_rsa.pub" ( + echo SSH key already exists, copying the public key... +) else ( + echo There is no SSH key. The below wizard will let you create one. + echo Choose a secure passphrase, even though it is device-specific. + ssh-keygen -t rsa +) + +REM copy the public rsa key + +echo F | xcopy "%USERPROFILE%\.ssh\id_rsa.pub" "%USERNAME%_%COMPUTERNAME%_id_rsa.pub" + +echo In your current directory, you will find a file named: +echo "%USERNAME%_%COMPUTERNAME%_id_rsa.pub" +rem echo You need to send this file to any system administrator i.e. user accounts with +rem echo a suffix of 1 or 2, and they will add the key to your account. Once that is +rem echo done, you may use the StartProxy/StopProxy scripts to use the proxy. + +echo You need to send this file to support@devinivas.in using your registered +echo DISH e-mail address, and they will add the key to your account. Once that is +echo done, you may use the StartProxy/StopProxy scripts to use the proxy. + +pause -- 2.47.3