Skip to content

Instantly share code, notes, and snippets.

@jpereira
Last active June 18, 2019 00:53
Show Gist options
  • Save jpereira/0b366dcedcc192340ecc279f5fc7ca08 to your computer and use it in GitHub Desktop.
Save jpereira/0b366dcedcc192340ecc279f5fc7ca08 to your computer and use it in GitHub Desktop.
Pulse Linux Client for Ubuntu 19.04 (Stupid hack to SOLVE the http://www.pulsesecure.net/ INCOMPETENCE)
#!/bin/bash
# Author: Jorge Pereira <[email protected]>
# Date: Mon 17 Jun 2019 09:26:46 PM -03
#
# Desc: The script was created during a bad time. It is a terrible hack
# to SOLVE the http://www.pulsesecure.net/ developers INCOMPETENCE!!!!
# Due to a TERRIBLE version for Linux.
#
# Attention: DO NOT INSTALL THE SHARED *.deb PACKAGE. The debian scipts used for
# unistall have a bug that DELETE YOUR ENTIRE /usr/local/
#
pulse_shit="http://trial.pulsesecure.net/clients/ps-pulse-linux-9.0r4.0-b943-ubuntu-debian-64-bit-installer.deb"
dest="/opt/ps-pulse-linux"
if ! lsb_release -sc | grep -q disco; then
echo "Sorry! That shit script is only to solve the INCOPETENCE of https://www.pulsesecure.net/"
exit 1
fi
if [ $UID -ne 0 ]; then
echo "You should be root! try 'sudo $0'"
exit 1
fi
echo "** Installing the Pusel VPN SHIT in $dest"
# 0. Cleanup
rm -rf /tmp/pulse-shit/ $dest
# 1. Fetch that shit!
echo "(*) Fetching the shit $pulse_shit"
wget -q -O /tmp/ps-pulse-linux.deb -c $pulse_shit
# 2. Unpacking
mkdir /tmp/pulse-shit/
dpkg -x /tmp/ps-pulse-linux.deb /tmp/pulse-shit/
# 3. New destination
mkdir -p /opt/ps-pulse-linux
tar xzvf /tmp/pulse-shit/usr/local/pulse/pulse.tgz -C /opt/ps-pulse-linux/
# 4. Resolve dependencies
lib_urls="http://mirrors.kernel.org/ubuntu/pool/universe/w/webkitgtk/libwebkitgtk-1.0-0_2.4.11-4_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3_amd64.deb
http://mirrors.kernel.org/ubuntu/pool/universe/w/webkitgtk/libjavascriptcoregtk-1.0-0_2.4.11-4_amd64.deb"
rm -rf /tmp/pulse-deps /usr/local/pulse
mkdir -p /tmp/pulse-deps $dest/lib
for _u in ${lib_urls[*]}; do
_l=/tmp/$(basename $_u)
rm -f $_l
echo "(*) Fetching $_u"
wget -q -O $_l $_u
dpkg -x $_l /tmp/pulse-deps/
rm -f $_l
done
cp -rf /tmp/pulse-deps/usr/lib/x86_64-linux-gnu/* $dest/lib/
ln -fs ${dest}/libpulseui.so_Ubuntu_16_x86_64 ${dest}/libpulseui.so
ln -fs /opt/ps-pulse-linux/ /usr/local/pulse
# 5. Create wrapper
cat > ${dest}/run.sh <<EOF
#!/bin/bash
# Created at $(date)
export LD_LIBRARY_PATH="$dest:$dest/lib"
$dest/pulseUi_Ubuntu_16_x86_64
EOF
chmod +x ${dest}/run.sh
# 6. Create link
cat > /usr/share/applications/ps-pulse-linux.desktop <<EOF
#!/usr/bin/env xdg-open
[Desktop Entry]
version=1.0
Type=Application
Exec=$dest/run.sh
Terminal=false
Name=Pulse Secure
Comment=Pulse Secure VPN client
Icon=$dest/html/images/Pulse-Secure128x128.png
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment