pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

php-malware-finder: updated to 0.3.2. Upstream changed a lot of things, starting by creating releases. Configuration files evolved a lot, there are more of them, including whitelists. Sample files are now included to test PMF. Yara dependency bumped because of issue 13 : https://github.com/nbs-system/php-malware-finder/issues/13



Module Name:	pkgsrc-wip
Committed By:	Nils Ratusznik <nils%NetBSD.org@localhost>
Pushed By:	nils
Date:		Sun Aug 7 19:32:13 2016 +0200
Changeset:	79844483d8e4fddbd08cc162bbfa965f5fac7034

Modified Files:
	php-malware-finder/Makefile
	php-malware-finder/PLIST
	php-malware-finder/distinfo

Log Message:
php-malware-finder: updated to 0.3.2.
Upstream changed a lot of things, starting by creating releases.
Configuration files evolved a lot, there are more of them,
including whitelists.
Sample files are now included to test PMF.
Yara dependency bumped because of issue 13 :
https://github.com/nbs-system/php-malware-finder/issues/13

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=79844483d8e4fddbd08cc162bbfa965f5fac7034

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 php-malware-finder/Makefile | 51 ++++++++++++++++++++++++++++++---------------
 php-malware-finder/PLIST    | 41 +++++++++++++++++++++++++++++++-----
 php-malware-finder/distinfo |  7 ++++---
 3 files changed, 74 insertions(+), 25 deletions(-)

diffs:
diff --git a/php-malware-finder/Makefile b/php-malware-finder/Makefile
index f477ab7..641b109 100644
--- a/php-malware-finder/Makefile
+++ b/php-malware-finder/Makefile
@@ -10,39 +10,56 @@ HOMEPAGE=	https://github.com/nbs-system/php-malware-finder/
 COMMENT=	Detect potentially malicious PHP files
 LICENSE=	gnu-gpl-v3
 
-VERSION=	0.1.1.20151126
-GHCOMMIT=	ccbefed99a639c5c91463bf3edc343cc13b65d36
-DEPENDS+=	yara-[0-9]*:../../security/yara
+VERSION=	0.3.2
+GHCOMMIT=	dff16c18a2c16ae426fd27506074957f4060302f
+DEPENDS+=	yara>=3.4.0:../../security/yara
 WRKSRC=		${WRKDIR}/php-malware-finder-${GHCOMMIT}
 NO_BUILD=	yes
 USE_LANGUAGES=	# none
-USE_TOOLS+=	bash:run
+USE_TOOLS+=	bash:run pax
 EGDIR=		${PREFIX}/share/examples/php-malware-finder
+
 PKG_SYSCONFSUBDIR=	phpmalwarefinder
-CONF_FILES=	${EGDIR}/malwares.yara ${PKG_SYSCONFDIR}/malwares.yara \
-		${EGDIR}/whitelist.yara ${PKG_SYSCONFDIR}/whitelist.yara
-INSTALLATION_DIRS+=	bin ${EGDIR} share/php-malware-finder ${DOCDIR}
+
+.for config in asp.yar bad_php.yar common.yar php.yar whitelist.yar
+CONF_FILES+=	${EGDIR}/${config} ${PKG_SYSCONFDIR}/${config}
+.endfor
+
+.for whitelist in custom.yar drupal.yar magento2.yar phpmyadmin.yar prestashop.yar symfony.yar wordpress.yar
+CONF_FILES+=	${EGDIR}/whitelists/${whitelist} ${PKG_SYSCONFDIR}/whitelists/${whitelist}
+.endfor
+
+INSTALLATION_DIRS+=	bin ${DOCDIR} share/php-malware-finder \
+			share/php-malware-finder/samples share/php-malware-finder/utils \
+			${EGDIR} ${EGDIR}/whitelists/ \
+			${PKG_SYSCONFDIR} ${PKG_SYSCONFDIR}/whitelists/
+
 AUTO_MKDIRS=	yes
 DOCDIR=		share/doc/php-malware-finder
 
 REPLACE_INTERPRETER+=	bash
 REPLACE.bash.old=	.*sh[^ ]*
 REPLACE.bash.new=	${TOOLS_PATH.bash}
-REPLACE_FILES.bash=	${WRKSRC}/phpmalwarefinder
+REPLACE_FILES.bash=	${WRKSRC}/php-malware-finder/phpmalwarefinder
 
-SUBST_CLASSES+=	install
+SUBST_CLASSES+=		install
 SUBST_STAGE.install=	pre-install
 SUBST_MESSAGE.install=	correcting installation path
-SUBST_FILES.install=	${WRKSRC}/phpmalwarefinder
-SUBST_SED.install=	-e 's,/etc,${PREFIX}/etc,g'
+SUBST_FILES.install=	${WRKSRC}/php-malware-finder/phpmalwarefinder
+SUBST_SED.install=	-e 's,/etc/phpmalwarefinder,${PREFIX}/etc/phpmalwarefinder,g'
 
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/phpmalwarefinder ${DESTDIR}${PREFIX}/bin
-	${INSTALL_DATA} ${WRKSRC}/malwares.yara ${DESTDIR}${EGDIR}
-	${INSTALL_DATA} ${WRKSRC}/whitelist.yara ${DESTDIR}${EGDIR}
-	${INSTALL_DATA} ${WRKSRC}/generate_whitelist.py ${DESTDIR}${PREFIX}/share/php-malware-finder/
-	${INSTALL_DATA} ${WRKSRC}/poc.py ${DESTDIR}${PREFIX}/share/php-malware-finder/
-	${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${PREFIX}/${DOCDIR}
+.for conffile in asp.yar bad_php.yar common.yar php.yar whitelist.yar
+	${INSTALL_DATA} ${WRKSRC}/php-malware-finder/${conffile} ${DESTDIR}${EGDIR}
+.endfor
+.for whitelistfile in custom.yar drupal.yar magento2.yar phpmyadmin.yar prestashop.yar symfony.yar wordpress.yar
+	${INSTALL_DATA} ${WRKSRC}/php-malware-finder/whitelists/${whitelistfile} ${DESTDIR}${EGDIR}/whitelists/
+.endfor
+	${INSTALL_SCRIPT} ${WRKSRC}/php-malware-finder/phpmalwarefinder ${DESTDIR}${PREFIX}/bin
+	${INSTALL_DATA} ${WRKSRC}/php-malware-finder/utils/generate_whitelist.py ${DESTDIR}${PREFIX}/share/php-malware-finder/utils/
+	${INSTALL_DATA} ${WRKSRC}/php-malware-finder/utils/mass_whitelist.py ${DESTDIR}${PREFIX}/share/php-malware-finder/utils/
+	${INSTALL_DATA} ${WRKSRC}/php-malware-finder/LICENSE ${DESTDIR}${PREFIX}/${DOCDIR}
 	${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/${DOCDIR}
+	cd ${WRKSRC}/php-malware-finder/samples && pax -rw -pm . ${DESTDIR}${PREFIX}/share/samples/
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/php-malware-finder/PLIST b/php-malware-finder/PLIST
index b4c3f44..bad6552 100644
--- a/php-malware-finder/PLIST
+++ b/php-malware-finder/PLIST
@@ -1,8 +1,39 @@
-@comment $NetBSD: PLIST,v 1.1 2015/07/14 11:10:49 ahp-nils Exp $
+@comment $NetBSD$
 bin/phpmalwarefinder
 share/doc/php-malware-finder/LICENSE
 share/doc/php-malware-finder/README.md
-share/examples/php-malware-finder/malwares.yara
-share/examples/php-malware-finder/whitelist.yara
-share/php-malware-finder/generate_whitelist.py
-share/php-malware-finder/poc.py
+share/examples/php-malware-finder/asp.yar
+share/examples/php-malware-finder/bad_php.yar
+share/examples/php-malware-finder/common.yar
+share/examples/php-malware-finder/php.yar
+share/examples/php-malware-finder/whitelist.yar
+share/examples/php-malware-finder/whitelists/custom.yar
+share/examples/php-malware-finder/whitelists/drupal.yar
+share/examples/php-malware-finder/whitelists/magento2.yar
+share/examples/php-malware-finder/whitelists/phpmyadmin.yar
+share/examples/php-malware-finder/whitelists/prestashop.yar
+share/examples/php-malware-finder/whitelists/symfony.yar
+share/examples/php-malware-finder/whitelists/wordpress.yar
+share/php-malware-finder/utils/generate_whitelist.py
+share/php-malware-finder/utils/mass_whitelist.py
+share/samples/artificial/bypasses.php
+share/samples/artificial/dodgy.php
+share/samples/artificial/obfuscated.php
+share/samples/classic/ajaxshell.php
+share/samples/classic/angel.php
+share/samples/classic/b374k.php
+share/samples/classic/c100.php
+share/samples/classic/c99.php
+share/samples/classic/cmdasp.asp
+share/samples/classic/cyb3rsh3ll.php
+share/samples/classic/r57.php
+share/samples/classic/simattacker.php
+share/samples/classic/sosyete.php
+share/samples/cpanel.php
+share/samples/freepbx.php
+share/samples/obfuscators/cipher_design.php
+share/samples/obfuscators/online_php_obfuscator.php
+share/samples/obfuscators/phpencode.php
+share/samples/real/sucuri_2014_04.php
+@pkgdir share/php-malware-finder/samples
+@pkgdir etc/phpmalwarefinder/whitelists
diff --git a/php-malware-finder/distinfo b/php-malware-finder/distinfo
index 6ddc80b..9bb81ac 100644
--- a/php-malware-finder/distinfo
+++ b/php-malware-finder/distinfo
@@ -1,5 +1,6 @@
 $NetBSD: distinfo,v 1.1 2015/07/14 11:10:49 ahp-nils Exp $
 
-SHA1 (ccbefed99a639c5c91463bf3edc343cc13b65d36.tar.gz) = d2a57f437424a368a2ad3dd3ab10425237ef10c6
-RMD160 (ccbefed99a639c5c91463bf3edc343cc13b65d36.tar.gz) = 72256bac9a8f82dfb4c462135978ff9cac0b1145
-Size (ccbefed99a639c5c91463bf3edc343cc13b65d36.tar.gz) = 20910 bytes
+SHA1 (dff16c18a2c16ae426fd27506074957f4060302f.tar.gz) = 56449d2c1c14d5a3e3478511a219a7c89a1f3136
+RMD160 (dff16c18a2c16ae426fd27506074957f4060302f.tar.gz) = 6944e8e5cea5e33e5d5d1e6df1b863976ddc295b
+SHA512 (dff16c18a2c16ae426fd27506074957f4060302f.tar.gz) = 32a17c5c8f6e59dedcc4dd84b03e1366646af747c99ee562666c5c509d4cf70516005fd8a9da643d34ae440894ab571602b249cc634ef7537881a7dd6e53c5df
+Size (dff16c18a2c16ae426fd27506074957f4060302f.tar.gz) = 389738 bytes


Home | Main Index | Thread Index | Old Index