]> Devi Nivas Git - simplescripts.git/commitdiff
Add Windows Scripts
authorAdvaith Menon <noreply-git@bp4k.net>
Thu, 20 Nov 2025 16:10:16 +0000 (11:10 -0500)
committerAdvaith Menon <noreply-git@bp4k.net>
Thu, 20 Nov 2025 16:20:45 +0000 (11:20 -0500)
* Copy Windows Scripts from the DCS period
* Modify scripts to remove proprietary information
* Modify e-mail addresses

windows/proxy/CCTV.vbs [new file with mode: 0755]
windows/proxy/KillProxy.bat [new file with mode: 0755]
windows/proxy/LaunchProxy.bat [new file with mode: 0755]
windows/proxy/README.txt [new file with mode: 0755]
windows/proxy/SetupProxy.bat [new file with mode: 0755]

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