This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main() | |
function IfYouGetCaught(strErr) | |
if len(strErr) > 1 then | |
strErrorLine = strErrorLine + strErr | |
strErrorLine = strErrorLine + vbnewline + vbnewline | |
end if | |
strErrorLine = strErrorLine + "usage: cscript sendmail.vbs /from:[from address] /to:[address1,address2] [/subject:[subject]] [/body:[message] [/attachment:path1,path 2]" & vbnewline & _ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Dictionary<string, string> ReadXML(string filename) | |
{ | |
Dictionary<string, string> dcxml_config = new Dictionary<string, string>(); | |
//thank you: http://www.mastercsharp.com/Article/69/working-with-xml-dom | |
FileStream docIn = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); | |
XmlDocument xmldoc = new XmlDocument(); | |
xmldoc.Load(docIn); | |
docIn.Close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void WriteXML(string filename, Dictionary<string, string> commandoptions) | |
{ | |
//if the file exists, then move it to DataCollector.exe.config.bak | |
if (File.Exists(filename)) | |
{ | |
File.Move(filename, filename + ".bak"); | |
} | |
//write the XML document// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "sed s/file:// %1 > %temp%\_holder" > c:\windows\fileurihandler.bat | |
echo "set /p holder= < %temp%\_holder" >> c:\windows\fileurihandler.bat | |
echo "echo %holder% | sed s@\/@\\@g > %temp%\_final" >> c:\windows\fileurihandler.bat | |
echo "set /p holder= < %temp%\_final" >> c:\windows\fileurihandler.bat | |
echo "del /q /f %temp%\_holder" >> c:\windows\fileurihandler.bat | |
echo "del /q /f %temp%\_final" >> c:\windows\fileurihandler.bat | |
echo "explorer %holder%" >> c:\windows\fileurihandler.bat | |
reg add HKCR\file\shell\open\command /ve /d "c:\windows\fileurihandler.bat %1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#arguswork script to copy and rename argus files to a working directory | |
#I've commented out the original script, which follows a different organizational structure. | |
# to limit times, I've opted to use the -t argument with any ra* clients instead of worrying about limiting time simply by argus data files read. | |
#mkdir -p ~/working/`basename $(pwd)` | |
#cp * ~/working/`basename $(pwd)` | |
#cd ~/working/`basename $(pwd)` | |
#gunzip * | |
export dateoffiles="$(basename $(pwd))_" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Argus Software | |
# Copyright (c) 2000-2012 QoSient, LLC | |
# All rights reserved. | |
# | |
# Example argus.conf | |
# | |
# Argus will open this argus.conf if its installed as /etc/argus.conf. | |
# It will also search for this file as argus.conf in directories | |
# specified in $ARGUSPATH, or $ARGUSHOME, $ARGUSHOME/lib, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Argus Client Software. Tools to read, analyze and manage Argus data. | |
# Copyright (C) 2000-2012 QoSient, LLC. | |
# All Rights Reserved | |
# | |
# Script called by rastream, to process files. | |
# | |
# Since this is being called from rastream(), it will have only a single | |
# parameter, filename, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: argus-server | |
# Required-Start: $network | |
# Required-Stop: | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: rastream-client | |
# Required-Start: $network $argusd | |
# Required-Stop: | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo > "%temp%/mbsalistfile.txt" | |
for %%G in (%*) do echo %%G >> "%temp%/mbsalistfile.txt" | |
"%programfiles%\Microsoft Baseline Security Analyzer 2\mbsacli.exe" /nvc /n "OS"+"SQL"+"IIS"+"PASSWORD" /wa /nd /listfile "%temp%/mbsalistfile.txt" | |
"%programfiles%\Microsoft Baseline Security Analyzer 2\mbsacli.exe" /l /rd "%userprofile%\securityscans" | |
pause | |
REM the mbsa files are xml and can be compared as such. |