News: This forum is now permanently frozen.
Pages: [1] 2 3
Topic: Unable to backup via wget or curl on 1.34  (Read 11911 times)
« on: January 04, 2013, 08:48:41 »
doownek *
Posts: 12

On 1.32 and 1.33 we've used wget to backup the config on all our MW boxes, but this doesn't work on 1.34
The command line we use is:
Code:
/usr/bin/wget --post-data Submit=download --auth-no-challenge --no-check-certificate --http-user=user --http-password=password -q https://x.x.x.x:444/diag_backup.php -O fwbackup/backup.xml
The error we get is:
Bad request token. Please make sure cookies are enabled and try again

I haven't found any answer to this problem. Does anyone know what the reason for the error is?

reg
Svend
« Last Edit: February 11, 2013, 08:05:26 by doownek »
« Reply #1 on: January 04, 2013, 15:01:26 »
Fred Grayson *****
Posts: 994

Likely related to the changes made in the way GETs are handled in the 1.34 release. Have you reviewed the changes listed here?

http://m0n0.ch/wall/downloads.php


--
Google is your friend and Bob's your uncle.
« Reply #2 on: January 04, 2013, 16:21:05 »
doownek *
Posts: 12

I saw that, but I'm accessing diag_backup.php, and that's not mentioned.
« Reply #3 on: January 07, 2013, 12:09:53 »
doownek *
Posts: 12

Should it be enough to do two wget after each other? I've tried that, but with the same error message
« Reply #4 on: February 02, 2013, 23:00:06 »
PiterRing **
Posts: 59

On 1.32 and 1.33 we've used wget to backup the config on all our MW boxes, but this doesn't work on 1.34
The command line we use is:
/usr/bin/wget --post-data Submit=download --auth-no-challenge --no-check-certificate --http-user=user --http-password=password -q https://x.x.x.x:444/diag_backup.php -O fwbackup/backup.xml

You need this string:

/usr/bin/wget --post-data Submit=Download%20configuration --auth-no-challenge --no-check-certificate --http-user=user --http-password=password -q https://x.x.x.x:444/diag_backup.php -O fwbackup/backup.xml

Look at source HTML:


* mono-download-config.png (10.39 KB, 695x249 - viewed 1081 times.)

minamotosoftУХоГмыло.ком
//Если гМыло в онлайне - стучите в чат, не стесняйтесь.
« Reply #5 on: February 06, 2013, 12:07:56 »
doownek *
Posts: 12

Thank you for your reply, but I get the same error message with your line.
« Reply #6 on: February 10, 2013, 23:08:11 »
PiterRing **
Posts: 59

Thank you for your reply, but I get the same error message with your line.

post here the query string and result.

minamotosoftУХоГмыло.ком
//Если гМыло в онлайне - стучите в чат, не стесняйтесь.
« Reply #7 on: February 11, 2013, 08:03:58 »
doownek *
Posts: 12

It's in the first post of this thread Smiley
« Reply #8 on: February 11, 2013, 11:52:16 »
PiterRing **
Posts: 59

It's in the first post of this thread Smiley

what version wget ?

minamotosoftУХоГмыло.ком
//Если гМыло в онлайне - стучите в чат, не стесняйтесь.
« Reply #9 on: February 11, 2013, 12:45:39 »
doownek *
Posts: 12

GNU Wget 1.13.4 built on linux-gnu
« Reply #10 on: February 11, 2013, 13:11:59 »
Lennart Grahl ***
Posts: 153

I saw that, but I'm accessing diag_backup.php, and that's not mentioned.

It's not mentioned but it definitely requires a token. In fact every page of the webgui requires a token.
« Reply #11 on: February 11, 2013, 13:16:51 »
doownek *
Posts: 12

Ok, but what's a token in this context?
« Reply #12 on: February 11, 2013, 13:22:41 »
Lennart Grahl ***
Posts: 153

The CSRF magic token that has been introduced in 1.34
« Reply #13 on: February 12, 2013, 08:53:35 »
doownek *
Posts: 12

Ok, thank you.
When I do a:
Code:
/usr/bin/wget --auth-no-challenge --no-check-certificate --http-user=backup --http-password=password -q https://x.x.x.x/diag_backup.php -O out.debug
I just get the complete file.
What am I doing wrong?
« Reply #14 on: February 20, 2013, 09:18:33 »
sysmcn *
Posts: 2

Hello: I am a user and I have mounted Monowall few, till the Moneto to copies of the configuration with q WGET But I find the new version has (The magic CSRF token, anyone can help me and show a basic example of how you might do with (WGET). thanks

I use the following line:


wget -q  http://xxxxxxxxxx.Dyndns.org:9091/diag_backup.php --http-user=xxxxxxxxxx --http-passwd=xxxxxxxxx  Submit=Download -O C:\Alix\Backup.xml

Pardon my English Huh Huh
 
Pages: [1] 2 3
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines