POL_GoG_logout

Informations

Creator Message
Ground0

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 8484
Wine: System

Feedbacks

Description

Bevore a relogin must this logout function called, elsewhere the login will not work correctly.

Source code

#!/usr/bin/env playonlinux-bash

# CHANGELOG
# [Ground0] (2016-02-17 09:45)
#   Initial Version
#
# Date : (2016-02-17 09:45)
# Last revision : (2016-02-17 09:45)
# Distribution used to test : OpenSUSE Tumbleweed / openSUSE Leap 42.1 / OS X 10.11.2
# Author : René Linder rene.linder@lihaso.ch
# Script licence : GPL v.2
# Depend :

#############################################
#
# Logout / open session for using
#
#
# The Cookies:
#

local COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"

local USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"

##########################
#
# Logout
# 

$POL_WGET https://www.gog.com/logout -O- --keep-session-cookies --save-cookies=$COOKIES_FINAL --load-cookies=$COOKIES_FINAL --referer=https://www.gog.com/ --user-agent="$USER_AGENT"
rm "$COOKIES_FINAL"
unset GOG_LOGIN

Contributions

Filters:

Contribute
Member Message
petch Wednesday 17 February 2016 at 20:06
petch

Information

This update has been approved by the team.

Message

Make variables local to avoid polluting the environment ;)
 

Differences

@@ -19,9 +19,9 @@
 # The Cookies:
 #
 
-COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"
+local COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"
 
-USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"
+local USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"
 
 ##########################
 #

New source code

#!/usr/bin/env playonlinux-bash

# CHANGELOG
# [Ground0] (2016-02-17 09:45)
#   Initial Version
#
# Date : (2016-02-17 09:45)
# Last revision : (2016-02-17 09:45)
# Distribution used to test : OpenSUSE Tumbleweed / openSUSE Leap 42.1 / OS X 10.11.2
# Author : René Linder rene.linder@lihaso.ch
# Script licence : GPL v.2
# Depend :

#############################################
#
# Logout / open session for using
#
#
# The Cookies:
#

local COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"

local USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"

##########################
#
# Logout
# 

$POL_WGET https://www.gog.com/logout -O- --keep-session-cookies --save-cookies=$COOKIES_FINAL --load-cookies=$COOKIES_FINAL --referer=https://www.gog.com/ --user-agent="$USER_AGENT"
rm "$COOKIES_FINAL"
unset GOG_LOGIN

Replies

petch Wednesday 17 February 2016 at 20:00
petch

Warning

This update has not been approved yet by the team.
Use it at your own risk

Message

Unset $GOG_LOGIN so it can be used to check we're in session

Differences

@@ -29,3 +29,5 @@
 # 
 
 $POL_WGET https://www.gog.com/logout -O- --keep-session-cookies --save-cookies=$COOKIES_FINAL --load-cookies=$COOKIES_FINAL --referer=https://www.gog.com/ --user-agent="$USER_AGENT"
+rm "$COOKIES_FINAL"
+unset GOG_LOGIN

New source code

#!/usr/bin/env playonlinux-bash

# CHANGELOG
# [Ground0] (2016-02-17 09:45)
#   Initial Version
#
# Date : (2016-02-17 09:45)
# Last revision : (2016-02-17 09:45)
# Distribution used to test : OpenSUSE Tumbleweed / openSUSE Leap 42.1 / OS X 10.11.2
# Author : René Linder rene.linder@lihaso.ch
# Script licence : GPL v.2
# Depend :

#############################################
#
# Logout / open session for using
#
#
# The Cookies:
#

COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"

USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"

##########################
#
# Logout
# 

$POL_WGET https://www.gog.com/logout -O- --keep-session-cookies --save-cookies=$COOKIES_FINAL --load-cookies=$COOKIES_FINAL --referer=https://www.gog.com/ --user-agent="$USER_AGENT"
rm "$COOKIES_FINAL"
unset GOG_LOGIN

Replies

Ground0 Wednesday 17 February 2016 at 15:54
Ground0

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -0,0 +1,31 @@
+#!/usr/bin/env playonlinux-bash
+
+# CHANGELOG
+# [Ground0] (2016-02-17 09:45)
+#   Initial Version
+#
+# Date : (2016-02-17 09:45)
+# Last revision : (2016-02-17 09:45)
+# Distribution used to test : OpenSUSE Tumbleweed / openSUSE Leap 42.1 / OS X 10.11.2
+# Author : René Linder rene.linder@lihaso.ch
+# Script licence : GPL v.2
+# Depend :
+
+#############################################
+#
+# Logout / open session for using
+#
+#
+# The Cookies:
+#
+
+COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"
+
+USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"
+
+##########################
+#
+# Logout
+# 
+
+$POL_WGET https://www.gog.com/logout -O- --keep-session-cookies --save-cookies=$COOKIES_FINAL --load-cookies=$COOKIES_FINAL --referer=https://www.gog.com/ --user-agent="$USER_AGENT"

New source code

#!/usr/bin/env playonlinux-bash

# CHANGELOG
# [Ground0] (2016-02-17 09:45)
#   Initial Version
#
# Date : (2016-02-17 09:45)
# Last revision : (2016-02-17 09:45)
# Distribution used to test : OpenSUSE Tumbleweed / openSUSE Leap 42.1 / OS X 10.11.2
# Author : René Linder rene.linder@lihaso.ch
# Script licence : GPL v.2
# Depend :

#############################################
#
# Logout / open session for using
#
#
# The Cookies:
#

COOKIES_FINAL="$POL_USER_ROOT/tmp/gog_cookie_logedin"

USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36"

##########################
#
# Logout
# 

$POL_WGET https://www.gog.com/logout -O- --keep-session-cookies --save-cookies=$COOKIES_FINAL --load-cookies=$COOKIES_FINAL --referer=https://www.gog.com/ --user-agent="$USER_AGENT"

Replies

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com