Fix login issues and config params
This commit is contained in:
parent
efc529c145
commit
b1cf0bf32d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
lib/config.py
|
lib/config.py
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*.log
|
@ -6,3 +6,4 @@ password = 'password'
|
|||||||
# system values, edit at your own risk
|
# system values, edit at your own risk
|
||||||
|
|
||||||
domain = 'http://nnmclub.ro'
|
domain = 'http://nnmclub.ro'
|
||||||
|
workdir = "./"
|
@ -116,7 +116,7 @@ def set_username():
|
|||||||
def connect():
|
def connect():
|
||||||
cookiefile = open(cookie[1], 'r+w')
|
cookiefile = open(cookie[1], 'r+w')
|
||||||
write_to_log(umessages.m025 % domain)
|
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 cookie_txt.find("Cookie") != -1:
|
||||||
# If it's -1, then there is no cookie!
|
# If it's -1, then there is no cookie!
|
||||||
cookiefile.write(cookie_txt)
|
cookiefile.write(cookie_txt)
|
||||||
|
Loading…
Reference in New Issue
Block a user