forked from nguenhieu/WindowsRDP
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |