summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Voisin2015-03-24 11:49:50 +0100
committerJulien Voisin2015-03-24 11:49:50 +0100
commit9e6f1ced23176a5b4b424fa58ba58b04e975263f (patch)
treed6fab0ab652c8e0127b254044742c7617ce3992f
parentd3e3e2e8cd0e79ad388c55650d6ffb459c4f1182 (diff)
Add packaging stuff dor debian!
-rw-r--r--package/Makefile15
-rw-r--r--package/debian/changelog5
-rw-r--r--package/debian/compat1
-rw-r--r--package/debian/control14
-rw-r--r--package/debian/copyright7
-rw-r--r--package/debian/files1
-rw-r--r--package/debian/nbs-phpmalwarefinder.dirs1
-rw-r--r--package/debian/nbs-phpmalwarefinder.install2
-rwxr-xr-xpackage/debian/rules12
-rwxr-xr-xphpmalwarefinder10
10 files changed, 66 insertions, 2 deletions
diff --git a/package/Makefile b/package/Makefile
new file mode 100644
index 0000000..db3eb40
--- /dev/null
+++ b/package/Makefile
@@ -0,0 +1,15 @@
1BUILDDIR=debian/build
2VERSION=1.0
3
4clean:
5 rm -Rf ${BUILDDIR}
6 rm -f debian/*.log
7
8fetch:
9 git clone git@gitlab.nbs-system.com:packages/php-malware-finder.git
10
11extract: fetch
12 mv php-malware-finder ${BUILDDIR}
13
14package: clean extract
15 debuild -b -us -uc --lintian-opts -X po-debconf \ No newline at end of file
diff --git a/package/debian/changelog b/package/debian/changelog
new file mode 100644
index 0000000..b72244c
--- /dev/null
+++ b/package/debian/changelog
@@ -0,0 +1,5 @@
1nbs-phpmalwarefinder (0.1) UNRELEASED; urgency=medium
2
3 * Initial release.
4
5 -- jvoisin <jvo@nbs-system.com> Tue, 24 Mar 2015 11:10:36 +0100
diff --git a/package/debian/compat b/package/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/package/debian/compat
@@ -0,0 +1 @@
5
diff --git a/package/debian/control b/package/debian/control
new file mode 100644
index 0000000..42a8839
--- /dev/null
+++ b/package/debian/control
@@ -0,0 +1,14 @@
1Source: nbs-phpmalwarefinder
2Section: utils
3Priority: optional
4Maintainer: Julien Voisin <jvo@nbs-system.com>
5Build-Depends: debhelper (>= 9)
6Standards-Version: 3.9.5
7Vcs-Git: git@gitlab.nbs-system.com:packages/php-malware-finder.git
8Vcs-Browser: gitlab.nbs-system.com:packages/php-malware-finder.git
9
10Package: nbs-phpmalwarefinder
11Architecture: any
12Depends: nbs-yara
13Description: yara-based php webshell finder
14 PhpMalwareFinder is a webshell hunter using yara and signatures. \ No newline at end of file
diff --git a/package/debian/copyright b/package/debian/copyright
new file mode 100644
index 0000000..7f82bd9
--- /dev/null
+++ b/package/debian/copyright
@@ -0,0 +1,7 @@
1Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2Upstream-Name: phpmalwarefinder
3Source: gitlab.nbs-system.com:packages/php-malware-finder.git
4
5Files: *
6Copyright 2015 Julien (jvoisin) Voisin <jvo@nbs-system.com>
7License: GPLv2 \ No newline at end of file
diff --git a/package/debian/files b/package/debian/files
new file mode 100644
index 0000000..23f95ef
--- /dev/null
+++ b/package/debian/files
@@ -0,0 +1 @@
nbs-phpmalwarefinder_0.1_amd64.deb utils optional
diff --git a/package/debian/nbs-phpmalwarefinder.dirs b/package/debian/nbs-phpmalwarefinder.dirs
new file mode 100644
index 0000000..61a8d27
--- /dev/null
+++ b/package/debian/nbs-phpmalwarefinder.dirs
@@ -0,0 +1 @@
etc/phpmalwarefinder/ \ No newline at end of file
diff --git a/package/debian/nbs-phpmalwarefinder.install b/package/debian/nbs-phpmalwarefinder.install
new file mode 100644
index 0000000..82f2fa2
--- /dev/null
+++ b/package/debian/nbs-phpmalwarefinder.install
@@ -0,0 +1,2 @@
1debian/build/malwares.yara etc/phpmalwarefinder
2debian/build/phpmalwarefinder usr/bin/ \ No newline at end of file
diff --git a/package/debian/rules b/package/debian/rules
new file mode 100755
index 0000000..bcf500a
--- /dev/null
+++ b/package/debian/rules
@@ -0,0 +1,12 @@
1#!/usr/bin/make -f
2
3BUILDDIR=debian/build
4
5override_dh_auto_clean: #fuck you debian
6
7override_dh_auto_build:
8
9%:
10 dh $@
11
12.PHONY: build
diff --git a/phpmalwarefinder b/phpmalwarefinder
index 66cdb92..80cf7f0 100755
--- a/phpmalwarefinder
+++ b/phpmalwarefinder
@@ -5,7 +5,7 @@ CONFIG_PATH='/etc/phpmalwarefinder/malwares.yara'
5 5
6show_help() { 6show_help() {
7 cat << EOF 7 cat << EOF
8Usage ${0##*/} [-dhw] 8Usage ${0##*/} [-cfhw]
9 -c Optional path to a configuration file 9 -c Optional path to a configuration file
10 -f Fast mode 10 -f Fast mode
11 -h Show this help message 11 -h Show this help message
@@ -49,6 +49,12 @@ then
49 exit 1 49 exit 1
50fi 50fi
51 51
52if [ -z $@ ]
53then
54 show_help
55 exit 1
56fi
57
52OPTS="${OPTS} -r ${CONFIG_PATH}" 58OPTS="${OPTS} -r ${CONFIG_PATH}"
53 59
54$YARA $OPTS $@ \ No newline at end of file 60$YARA $OPTS $@