Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Apr 19, 2024 11:31 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Mon Mar 23, 2009 2:42 pm 
Offline
Newbie

Joined: Mon Mar 23, 2009 2:24 pm
Posts: 5
I ran into a wget error "Argument list too long" when running audit_linux.sh on a server with a lot of log files & other info. The error is on line 2118 of audit_linux.sh

The original code that causes the error:

[code]
oa_audit_result="'$($oa_cat $ReportFile)'"
$oa_wget $oa_wget_certificates --delete-after --post-data="submit=submit&add=$oa_audit_result" $non_ie_page
[/code]

I switched wget to using --post-file and that fixed it as --post-file doesn't run into the same command line argument length limit as --post-data does. Here's the code:

[code]
echo "submit=submit&add=" | cat - $ReportFile > /tmp/oareport.out && mv /tmp/oareport.out $ReportFile
$oa_wget $oa_wget_certificates --delete-after --post-file=$ReportFile $non_ie_page
[/code]


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 25, 2009 11:28 am 
Offline
Contributor

Joined: Fri Jul 04, 2008 6:46 am
Posts: 153
Location: USA - WI
Thanks for the example. I actually saw this a while back and I think I messed around with the --post-file option but never got it to work for some reason. I bet it was something stupid I was doing...lol. Anyways, I did it a little differently because I hate creating temporary files

Now I just have it doing ...

[code]
$oa_sed -i '1s/^/submit=submit\&add=/' "$ReportFile"
$oa_wget $oa_wget_certificates --delete-after --post-file="$ReportFile" $non_ie_page
[/code]

You must have a large amount of log files for that to cause this...haha. Anyways, I thought this would allow me to audit all packages on my machine now but even though they all end up in the report file before being submitted, only a few packages actually show up once it gets entered in Open-AudIT. Not too sure what's going on there, kinda wish it would've worked now.

Btw - I keep an updated script at http://chadsikorra.com/audit_linux.sh if you want one with the changes in it already. I've fixed a few issues since it went into SVN, but not too much.

_________________
OA Server: Debian Squeeze w/ Apache2
Auditing: 700 Workstations, 250 or so Retail Terminals, about 75 Servers
OS's: Windows XP/2003/2008/2008 R2/Vista/7, Debian
LDAP: Active Directory 2008 R2


Top
 Profile  
Reply with quote  
PostPosted: Mon May 25, 2009 7:41 pm 
Offline
Newbie

Joined: Mon May 25, 2009 6:09 pm
Posts: 1
I found it easier to prepend required POST arguments to Result file while starting to create it. Patch here: [url]http://www.gmc.lt/~kaspar/open-audit-wget-fix.diff[/url].


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group