Skip to content

Instantly share code, notes, and snippets.

@jpereira
Last active June 18, 2019 00:53
Show Gist options
  • Select an option

  • Save jpereira/0b366dcedcc192340ecc279f5fc7ca08 to your computer and use it in GitHub Desktop.

Select an option

Save jpereira/0b366dcedcc192340ecc279f5fc7ca08 to your computer and use it in GitHub Desktop.

Revisions

  1. jpereira revised this gist Jun 18, 2019. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions pulse-vpn-client-ubuntu1904.sh
    Original file line number Diff line number Diff line change
    @@ -9,14 +9,12 @@
    # Attention: DO NOT INSTALL THE SHARED *.deb PACKAGE. The debian scipts used for
    # unistall have a bug that DELETE YOUR ENTIRE /usr/local/
    #
    # For sure, that script is a piece of shit! It is a pure GO HORSE!
    #

    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/ in Ubuntu 19.04 (disco)"
    echo "Sorry! That shit script is only to solve the INCOPETENCE of https://www.pulsesecure.net/"
    exit 1
    fi

    @@ -61,6 +59,7 @@ 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
  2. jpereira revised this gist Jun 18, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions pulse-vpn-client-ubuntu1904.sh
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,8 @@
    # Attention: DO NOT INSTALL THE SHARED *.deb PACKAGE. The debian scipts used for
    # unistall have a bug that DELETE YOUR ENTIRE /usr/local/
    #
    # For sure, that script is a piece of shit! It is a pure GO HORSE!
    #

    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"
  3. jpereira revised this gist Jun 18, 2019. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions pulse-vpn-client-ubuntu1904.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,10 @@
    #!/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 incompetence of the http://www.pulsesecure.net/ developers
    # that create the TERRIBLE version for Linux.
    # 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/
  4. jpereira revised this gist Jun 18, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion pulse-vpn-client-ubuntu1904.sh
    Original file line number Diff line number Diff line change
    @@ -57,7 +57,7 @@ for _u in ${lib_urls[*]}; do
    done

    cp -rf /tmp/pulse-deps/usr/lib/x86_64-linux-gnu/* $dest/lib/
    sudo ln -fs /opt/ps-pulse-linux/ /usr/local/pulse
    ln -fs ${dest}/libpulseui.so_Ubuntu_16_x86_64 ${dest}/libpulseui.so

    # 5. Create wrapper
    cat > ${dest}/run.sh <<EOF
  5. jpereira renamed this gist Jun 18, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. jpereira revised this gist Jun 18, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion .sh
    Original file line number Diff line number Diff line change
    @@ -44,7 +44,7 @@ lib_urls="http://mirrors.kernel.org/ubuntu/pool/universe/w/webkitgtk/libwebkitgt
    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
    rm -rf /tmp/pulse-deps /usr/local/pulse
    mkdir -p /tmp/pulse-deps $dest/lib

    for _u in ${lib_urls[*]}; do
    @@ -57,6 +57,7 @@ for _u in ${lib_urls[*]}; do
    done

    cp -rf /tmp/pulse-deps/usr/lib/x86_64-linux-gnu/* $dest/lib/
    sudo ln -fs /opt/ps-pulse-linux/ /usr/local/pulse

    # 5. Create wrapper
    cat > ${dest}/run.sh <<EOF
  7. jpereira created this gist Jun 18, 2019.
    83 changes: 83 additions & 0 deletions .sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,83 @@
    #!/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 incompetence of the http://www.pulsesecure.net/ developers
    # that create the 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/ in Ubuntu 19.04 (disco)"
    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
    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/

    # 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