moved scripts to main/scrips and remaining stuff to doc

git-svn-id: http://webgoat.googlecode.com/svn/trunk/webgoat@406 4033779f-a91e-0410-96ef-6bf7bf53c507
This commit is contained in:
ch.ko123
2009-11-05 21:03:36 +00:00
parent c46d490726
commit 98fe279dc7
10 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,34 @@
@echo on
@REM Clear the lib env var as it can hose tomcat
SET lib=
@REM Make sure the webgoat DB is writable
attrib -R .\tomcat\webapps\WebGoat\database\*.*
@REM Set env vars for tomcat and java, use PWD as some machines don't have
@REM \. on their path
set PWD=%cd%
set CATALINA_HOME=%PWD%\tomcat
set JAVA_HOME=%PWD%\java
@REM Configure environment variables to override web.xml
SET DatabaseDriver=net.sourceforge.jtds.jdbc.Driver
SET DatabaseConnectionString=jdbc:jtds:sqlserver://./webgoat;namedPipe=true;INSTANCE=WEBGOAT
SET DatabaseUser=webgoat
SET DtabasePassword=_webgoat
delete .\tomcat\conf\server.xml
copy .\tomcat\conf\server_80.xml .\tomcat\conf\server.xml
@REM Run tomcat: must have quotes incase var has spaces in it
call "%CATALINA_HOME%\bin\startup.bat" start
echo
echo If the Tomcat DOS shell quit immediately, it is likely that
echo there is another service listening on port 80.
echo

View File

@ -0,0 +1,25 @@
@echo on
@REM Clear the lib env var as it can hose tomcat
SET lib=
@REM Make sure the webgoat DB is writable
attrib -R .\tomcat\webapps\WebGoat\database\*.*
@REM Set env vars for tomcat and java, use PWD as some machines don't have
@REM \. on their path
set PWD=%cd%
set CATALINA_HOME=%PWD%\tomcat
set JAVA_HOME=%PWD%\java
delete .\tomcat\conf\server.xml
copy .\tomcat\conf\server_80.xml .\tomcat\conf\server.xml
@REM Run tomcat: must have quotes incase var has spaces in it
call "%CATALINA_HOME%\bin\startup.bat" start
echo
echo If the Tomcat DOS shell quit immediately, it is likely that
echo there is another service listening on port 80.
echo

View File

@ -0,0 +1,64 @@
#!/bin/sh
SYSTEM=`uname -s`
CATALINA_HOME=./tomcat
PATH=${PATH}:./tomcat/bin
export CATALINA_HOME PATH
chmod +x ./$CATALINA_HOME/bin/*.sh
if [ $SYSTEM = "Darwin" ]; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
export JAVA_HOME
else
is_java_1dot6() {
if [ -z "$JAVA_HOME" ]; then
export JAVA_HOME=$(dirname $(readlink -f $(which javac)))/../
fi
if [ "X$JAVA_HOME" != "X" -a $JAVA_HOME ]; then
$JAVA_HOME/bin/java -version 2>&1 | grep 'version "1.6' >/dev/null
if [ $? -ne 0 ]; then
echo "The JVM in \$JAVA_HOME isn't version 1.6."
exit 1
fi
else
echo "Please set JAVA_HOME to a Java 1.6 JDK install"
exit 1
fi
}
is_java_1dot6
fi
case "$1" in
start80)
cp -f $CATALINA_HOME/conf/server_80.xml $CATALINA_HOME/conf/server.xml
$CATALINA_HOME/bin/startup.sh
printf "\n Open http://127.0.0.1/WebGoat/attack"
printf "\n Username: guest"
printf "\n Password: guest"
printf "\n Or try http://guest:guest@127.0.0.1/WebGoat/attack \n\n\r"
sleep 2
tail -f $CATALINA_HOME/logs/catalina.out
;;
start8080)
cp -f $CATALINA_HOME/conf/server_8080.xml $CATALINA_HOME/conf/server.xml
$CATALINA_HOME/bin/startup.sh
printf "\n Open http://127.0.0.1:8080/WebGoat/attack"
printf "\n Username: guest"
printf "\n Password: guest"
printf "\n Or try http://guest:guest@127.0.0.1:8080/WebGoat/attack \n\n\r"
sleep 2
tail -f $CATALINA_HOME/logs/catalina.out
;;
stop)
$CATALINA_HOME/bin/shutdown.sh
;;
*)
echo $"Usage: $prog {start8080|start80|stop}"
exit 1
;;
esac

View File

@ -0,0 +1,25 @@
@echo on
@REM Clear the lib env var as it can hose tomcat
SET lib=
@REM Make sure the webgoat DB is writable
attrib -R .\tomcat\webapps\WebGoat\database\*.*
@REM Set env vars for tomcat and java, use PWD as some machines don't have
@REM \. on their path
set PWD=%cd%
set CATALINA_HOME=%PWD%\tomcat
set JAVA_HOME=%PWD%\java
delete .\tomcat\conf\server.xml
copy .\tomcat\conf\server_8080.xml .\tomcat\conf\server.xml
@REM Run tomcat: must have quotes incase var has spaces in it
call "%CATALINA_HOME%\bin\startup.bat" start
echo
echo If the Tomcat DOS shell quit immediately, it is likely that
echo there is another service listening on port 80.
echo

View File

@ -0,0 +1,7 @@
@echo off
@REM Run webscarab
@REM - Assumes webscarab.properties file is in webscarab directory
cd webscarab
..\java\bin\javaw -Duser.home=.\ -jar webscarab.jar