Skip to content

Commit

Permalink
Escape slash and double quotes characters for password in setup.sh (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hlung authored and solderzzc committed Aug 22, 2016
1 parent 8f51bfb commit 61753fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ rm -rf pgoencrypt.tar.gz
rm -rf pgoencrypt
}

function Pokebotescapestring () {
echo "$1" | sed 's/\//\\\//g' | sed 's/"/\\"/g' # escape slash and double quotes
}

function Pokebotconfig () {
cd $pokebotpath
read -p "enter 1 for google or 2 for ptc
Expand All @@ -38,6 +42,7 @@ read -p "Input username
" username
read -p "Input password
" -s password
password=$(Pokebotescapestring $password)
read -p "
Input location
" location
Expand Down

0 comments on commit 61753fc

Please sign in to comment.