From b1cf0bf32d320216dae1a19a7a3e68957736d01b Mon Sep 17 00:00:00 2001 From: Vladimir Hodakov Date: Sat, 14 Sep 2019 17:01:42 +0400 Subject: [PATCH] Fix login issues and config params --- .gitignore | 3 ++- lib/config.py.example | 3 ++- massdl.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ee7703b..befc0dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ lib/config.py -*.pyc \ No newline at end of file +*.pyc +*.log \ No newline at end of file diff --git a/lib/config.py.example b/lib/config.py.example index 8541ad6..f0431df 100755 --- a/lib/config.py.example +++ b/lib/config.py.example @@ -5,4 +5,5 @@ password = 'password' # system values, edit at your own risk -domain = 'http://nnmclub.ro' \ No newline at end of file +domain = 'http://nnmclub.ro' +workdir = "./" \ No newline at end of file diff --git a/massdl.py b/massdl.py index b300371..1bf5c48 100755 --- a/massdl.py +++ b/massdl.py @@ -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)