Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Cootile committed Dec 18, 2021
1 parent 3504dbd commit 4cf671f
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/RDP.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: RDP

on: workflow_dispatch

jobs:
build:

runs-on: windows-latest
timeout-minutes: 9999

steps:
- name: Downloading ngrok.
run: |
Invoke-WebRequest https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip -OutFile ngrok.zip
Invoke-WebRequest https://raw.githubusercontent.com/LienYiAn28/ShutTheFuckOff/main/start.bat -OutFile start.bat
Invoke-WebRequest https://raw.githubusercontent.com/LienYiAn28/ShutTheFuckOff/main/wallpaper.bat -OutFile wallpaper.bat
Invoke-WebRequest https://raw.githubusercontent.com/LienYiAn28/ShutTheFuckOff/main/loop.bat -OutFile loop.bat
- name: Extracting Ngrok File.
run: Expand-Archive ngrok.zip
- name: Connect via ngrok.
run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
env:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
- name: Enabling RDP Access.
run: |
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1
- name: Creating Tunnel.
run: Start-Process Powershell -ArgumentList '-Noexit -Command ".\ngrok\ngrok.exe tcp --region ap 3389"'
- name: Connect to the RDP.
run: cmd /c start.bat
- name: Success! You may now close this tab.
run: cmd /c loop.bat
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# WindowsRDP
Follow the instructions given by the workflow.
- You shouldn't use this as an alternative to getting a pc.
- Everything in this repo is only made for education purposes.
- You shouldn't fork the repo. But instead download the code then create a new repo.
- Please do not contact me if you have any question.
8 changes: 8 additions & 0 deletions loop.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@echo off
echo Hi, I'm just a keep-alive script. Please leave me alone.
tasklist | find /i "ngrok.exe" >Nul && goto check || echo "Unable to get NGROK tunnel, make sure NGROK_AUTH_TOKEN is correct in Settings > Secrets > Repository secret. Maybe your previous VM is still running: https://dashboard.ngrok.com/status/tunnels" & ping 127.0.0.1 >Nul & exit
:check
ping 127.0.0.1 > null
cls
echo Hi, I'm just a keep-alive script. Please leave me alone.
goto check
19 changes: 19 additions & 0 deletions start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off
del /f "C:\Users\Public\Desktop\Epic Games Launcher.lnk" > out.txt 2>&1
net config server /srvcomment:"Windows Server 2019 By HaeImAlan" > out.txt 2>&1
net user administrator A123456@ /add >nul
net localgroup administrators administrator /add >nul
net user administrator /active:yes >nul
net user installer /delete
diskperf -Y >nul
sc config Audiosrv start= auto >nul
sc start audiosrv >nul
ICACLS C:\Windows\Temp /grant administrator:F >nul
ICACLS C:\Windows\installer /grant administrator:F >nul
echo Success! Please rebuild if the rdp doesnt seem to be available.
echo IP:
tasklist | find /i "ngrok.exe" >Nul && curl -s localhost:4040/api/tunnels | jq -r .tunnels[0].public_url || echo "Tidak bisa mendapatkan NGROK tunnel, pastikan NGROK_AUTH_TOKEN benar di Settings> Secrets> Repository secret. Mungkin VM Anda sebelumnya masih berjalan: https://dashboard.ngrok.com/status/tunnels "
echo Username: administrator
echo Password: A123456@
echo Log into rdp with the provided credentials
ping -n 10 127.0.0.1 >nul
14 changes: 14 additions & 0 deletions wallpaper.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
echo Looking for Admin Access!
goto UACPrompt
) else ( goto Meet Admin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
taskkill /f /im explorer.exe
start explorer.exe

0 comments on commit 4cf671f

Please sign in to comment.