On Thu, Oct 10, 2013 at 10:37 AM, Jostein Elvaker Haande <[email protected]
> wrote:
> I've talked to the development team about this in the past, and what I was
> told back then was this: with 1.3, you could achieve an API like behavior
> with using curl or similar tools, but this would be close to impossible
> with the new authentication system introduced in 2.0. I understood that
> they wanted to implement an API at some time, so that external tools could
> communicate directly with pfSense, but that this wasn't high on the list of
> priorities. Since then, I've heard no talks about this so I don't know if
> this wish still exists among the developers or not, or even on a list.
>
>
Errr... you're just not being clever enough. I was pretty easily able to
update my remote backup script to use the new auth. Here's the snippet from
my /bin/sh script:
printf "Downloading Ashburn FW-A Firewall Configuration\n\n"
read -p "Password?: " FWPASS
curl -k -c ${COOKIEFILE} -d
"login=Login&usernamefld=admin&passwordfld=$FWPASS" https://
${ASHBURNFWA}/diag_backup.php
curl -k -b ${COOKIEFILE} -d
"Submit=download&donotbackuprrd=checked" -o
$USBCFGDIR/config-$ASHBURNFWA-$PFDATE.xml https://
${ASHBURNFWA}/diag_backup.php
curl is an amazingly flexible and useful tool. Once authenticated this way,
you can do whatever you did before 2.0 style auth came to be.
_______________________________________________
List mailing list
[email protected]
http://lists.pfsense.org/mailman/listinfo/list