summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrejs Mivreņiks2015-06-08 12:06:46 +0300
committerAndrejs Mivreņiks2015-06-08 12:06:46 +0300
commit7b2d15584ffa60e5969bbbd5f19b212318e08129 (patch)
tree4f66d497592deefcdbcf7ff6af141567930b2594
downloadaur-7b2d15584ffa60e5969bbbd5f19b212318e08129.tar.gz
Transition to AUR4
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD35
-rw-r--r--webgoat.install8
-rw-r--r--webgoat.sh7
4 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a5fdb1f5e1cd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = webgoat
+ pkgdesc = Deliberately insecure J2EE web application designed to teach web application security concepts
+ pkgver = 6.0.1
+ pkgrel = 3
+ url = https://webgoat.github.io/
+ install = webgoat.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = maven
+ depends = java-runtime
+ optdepends = webscarab: proxy for analyzing applications that communicate using the HTTP and HTTPS protocols, used to help solve most WebGoat lessons
+ optdepends = paros: MitM HTTP/HTTPS proxy, spider, XSS and injection scanner + more, used to help solve WebGoat lessons
+ source = https://github.com/WebGoat/WebGoat/archive/v6.0.1.tar.gz
+ source = webgoat.sh
+ sha256sums = 0fe10011df18b2ebb7ee0658026b29d0ae9a0c1ea9a68cf511ef40fb48930964
+ sha256sums = 3615a09c64eb07709bede9b22782bedeffe7c7097cde1c6bcc2a07adcd28712c
+
+pkgname = webgoat
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6b82948d07bc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Andrejs Mivreņiks <gim at fastmail dot fm>
+# Contributor: Lex Black <autumn-wind at web dot de>
+# Contributor: fnord0 < fnord0 AT riseup DOT net >
+pkgname=webgoat
+pkgver=6.0.1
+pkgrel=3
+pkgdesc='Deliberately insecure J2EE web application designed to teach web application security concepts'
+arch=('i686' 'x86_64')
+url='https://webgoat.github.io/'
+license=('GPL2')
+depends=('java-runtime')
+makedepends=('maven')
+optdepends=('webscarab: proxy for analyzing applications that communicate using the HTTP and HTTPS protocols, used to help solve most WebGoat lessons'
+ 'paros: MitM HTTP/HTTPS proxy, spider, XSS and injection scanner + more, used to help solve WebGoat lessons')
+source=("https://github.com/WebGoat/WebGoat/archive/v${pkgver}.tar.gz"
+ "${pkgname}.sh")
+sha256sums=('0fe10011df18b2ebb7ee0658026b29d0ae9a0c1ea9a68cf511ef40fb48930964'
+ '3615a09c64eb07709bede9b22782bedeffe7c7097cde1c6bcc2a07adcd28712c')
+install="${pkgname}.install"
+
+build() {
+ cd ${srcdir}/WebGoat-$pkgver
+ # Needed to fix issues with maven
+ echo "<settings><localRepository>$srcdir</localRepository></settings>" > $srcdir/maven-settings.xml
+ mvn -s $srcdir/maven-settings.xml clean package
+}
+
+package() {
+ install -D -m755 webgoat.sh $pkgdir/usr/bin/webgoat
+ cd ${srcdir}/WebGoat-$pkgver
+ install -d $pkgdir/opt/$pkgname/
+ cp -r doc $pkgdir/opt/$pkgname/doc
+ install -D -m644 target/WebGoat-$pkgver-war-exec.jar $pkgdir/opt/$pkgname/webgoat.jar
+}
+# vim:set ts=2 sw=2 et:
diff --git a/webgoat.install b/webgoat.install
new file mode 100644
index 000000000000..ab5263a70eb5
--- /dev/null
+++ b/webgoat.install
@@ -0,0 +1,8 @@
+post_install() {
+ echo ""
+ echo "[+] run 'webgoat' command to start the application"
+ echo ">>> then browse to 'http://127.0.0.1:8080/webgoat/'"
+ echo ""
+ echo ">>> WARNING: While running this program your machine may be extremely vulnerable to attack!"
+ echo ""
+}
diff --git a/webgoat.sh b/webgoat.sh
new file mode 100644
index 000000000000..cbcd8da31a95
--- /dev/null
+++ b/webgoat.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ "$(id -u)" == "0" ]; then
+ echo 'You really should not run this application as root.'
+ echo 'If you know what you are doing, use "java -jar /opt/webgoat/webgoat.jar" command instead.'
+ exit 1
+fi
+/usr/bin/java -jar /opt/webgoat/webgoat.jar $@