Added support for using a different quote source
The third parameter can be used to specify a different repository to use as 'base' and pull the client and quote information from.
This commit is contained in:
parent
c470a07458
commit
d51dfadae9
@ -17,7 +17,7 @@
|
||||
# (at your option) any later version.
|
||||
|
||||
|
||||
VERSION=0.8
|
||||
VERSION=0.9
|
||||
SAXON=/usr/local/bin/saxon/saxon9he.jar
|
||||
TEMPLATEREPO=ssh://git@gitlab.local/peter/templates
|
||||
|
||||
@ -33,6 +33,7 @@ pentext=$(echo $PENTEXTREPO|awk -F '/' '{print $5}')
|
||||
# Read standard 'command line' variables
|
||||
[[ ! -z $1 ]] && REPO=$1
|
||||
[[ ! -z $2 ]] && NAMESPACE=$2
|
||||
[[ ! -z $3 ]] && PREVIOUS=$3
|
||||
BRANCH=master
|
||||
TARGET=quote
|
||||
|
||||
@ -121,13 +122,13 @@ grab_offer() {
|
||||
echo "[-] could not find $TARGET.xml"
|
||||
exit
|
||||
fi
|
||||
cp client_info.xml $TEMPLOC/client_info.xml
|
||||
cp $TARGET.xml $TEMPLOC/quote.xml
|
||||
cp client_info.xml $TEMPLOC/client_info.xml &> /dev/null
|
||||
cp $TARGET.xml $TEMPLOC/quote.xml &> /dev/null
|
||||
}
|
||||
|
||||
convert_report() {
|
||||
cp $TEMPLOC/quote.xml source/quote.xml
|
||||
cp $TEMPLOC/client_info.xml source/client_info.xml
|
||||
cp $TEMPLOC/quote.xml source/quote.xml &> /dev/null
|
||||
cp $TEMPLOC/client_info.xml source/client_info.xml &> /dev/null
|
||||
pushd source &>/dev/null
|
||||
java -jar $SAXON -s:quote.xml -xsl:../xslt/off2rep.xsl -o:report.xml
|
||||
if [ ! -f report.xml ]; then
|
||||
@ -149,6 +150,7 @@ preflight_checks
|
||||
echo "startpentest v${VERSION} - Ready for some ACTION?"
|
||||
ORIGREPO=$REPO
|
||||
REPO=off-$ORIGREPO
|
||||
[[ ! -z $PREVIOUS ]] && $REPO=$PREVIOUS
|
||||
clone_repo
|
||||
grab_offer
|
||||
REPO=pen-${ORIGREPO}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user