Skip to content

Commit 1778683

Browse files
committed
P7RND_945250
1 parent ee66a25 commit 1778683

File tree

3 files changed

+32
-18
lines changed

3 files changed

+32
-18
lines changed

.github/workflows/linux-test.yml

+6-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test
1+
name: Ubuntu (latest version)
22
on: [push]
33
defaults:
44
run:
@@ -8,21 +8,12 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- name: test
12-
run: ./scripts/configure.sh
13-
- name: Installing dependencies
14-
run: sudo apt update && sudo apt install -y xfce4 xfce4-goodies tightvncserver xfonts-base xubuntu-icon-theme xubuntu-wallpapers gnome-icon-theme x11-apps x11-common x11-session-utils x11-utils x11-xserver-utils x11-xkb-utils dbus-user-session dbus-x11 gnome-system-monitor gnome-control-center
15-
- name: Downloading resources
16-
run: wget http://boompancho.p7com.net/vnc-resources.zip && unzip vnc-resources.zip
17-
- name: Applying resources
18-
run: mkdir $HOME/.vnc && cp passwd $HOME/.vnc && cp xstartup $HOME/.vnc
19-
- name: Downloading ngrok
20-
run: wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip && unzip ngrok-stable-linux-amd64.zip && chmod +x ngrok
21-
- name: Starting VNC Server
22-
run: vncserver :1 -geometry 800x600 -depth 24 -rfbport 7582
23-
- name: Applying auth token for ngrok
11+
- name: Preparing environment...
2412
env:
2513
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
26-
run: ./ngrok authtoken $NGROK_AUTH_TOKEN
14+
VNC_PASSWORD: ${{ secrets.VNC_PASSWORD }}
15+
run: ./scripts/configure.sh $NGROK_AUTH_TOKEN $VNC_PASSWORD
16+
- name: Starting VNC Server
17+
run: cd $HOME && vncserver :1 -geometry 800x600 -depth 24 -rfbport 7582
2718
- name: Starting ngrok
2819
run: ./ngrok tcp 7582

resources/xstartup

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
dbus-launch /usr/bin/startxfce4 &

scripts/configure.sh

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
#!/bin/bash
2-
zip --help
3-
echo "uwu"
4-
echo "ewe"
2+
# Reverse Linux VNC by PANCHO7532
3+
# This script is executed when GitHub actions is initialized.
4+
# Prepares dependencies, ngrok, and vnc stuff
5+
6+
# First, install required packages
7+
sudo apt update
8+
sudo apt install -y xfce4 xfce4-goodies tightvncserver xfonts-base xubuntu-icon-theme xubuntu-wallpapers gnome-icon-theme x11-apps x11-common x11-session-utils x11-utils x11-xserver-utils x11-xkb-utils dbus-user-session dbus-x11 gnome-system-monitor gnome-control-center
9+
10+
# Second, download ngrok
11+
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
12+
unzip ngrok-stable-linux-amd64.zip
13+
chmod +x ngrok
14+
mv ngrok $HOME
15+
16+
# Third, generate and copy passwd file and xstartup script
17+
mkdir $HOME/.vnc
18+
cp ./resources/xstartup $HOME/.vnc
19+
echo -e "$2\n$2" > stdin.dat
20+
vncpasswd -f < ./stdin.dat > passwd
21+
cp passwd $HOME/.vnc
22+
rm stdin.dat
23+
24+
# Fourth and last, set up auth token from argument
25+
./ngrok authtoken $1
526
exit

0 commit comments

Comments
 (0)