1

Fix login issues and config params

This commit is contained in:
Vladimir Hodakov 2019-09-14 17:01:42 +04:00
parent efc529c145
commit b1cf0bf32d
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6
3 changed files with 5 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
lib/config.py
*.pyc
*.pyc
*.log

View File

@ -5,4 +5,5 @@ password = 'password'
# system values, edit at your own risk
domain = 'http://nnmclub.ro'
domain = 'http://nnmclub.ro'
workdir = "./"

View File

@ -116,7 +116,7 @@ def set_username():
def connect():
cookiefile = open(cookie[1], 'r+w')
write_to_log(umessages.m025 % domain)
cookie_txt = commands.getoutput('curl -c - -d "username=' + set_username()[0] + '&password=' + set_username()[1] + '&autologin=on&login=%C2%F5%EE%E4&redirect=index.php" "' + domain + '/forum/login.php" 2>>' + curdir + log_file )
cookie_txt = commands.getoutput('curl -c - -d "username=' + set_username()[0] + '&password=' + set_username()[1] + '&autologin=on&login=%C2%F5%EE%E4&redirect=index.php&code=58161005a04f0ee5" "' + domain + '/forum/login.php" 2>>' + curdir + log_file )
if cookie_txt.find("Cookie") != -1:
# If it's -1, then there is no cookie!
cookiefile.write(cookie_txt)