aboutsummaryrefslogtreecommitdiff
path: root/sysutils/dc3dd
diff options
context:
space:
mode:
authorMANTANI Nobutaka <nobutaka@FreeBSD.org>2011-02-15 15:59:43 +0000
committerMANTANI Nobutaka <nobutaka@FreeBSD.org>2011-02-15 15:59:43 +0000
commit3843072da5ff94afb5a22e98ab4e81809611c4a9 (patch)
tree054ecf9cfe07e850a2d91d92a52f5461715e2bbe /sysutils/dc3dd
parent194ea4f05c41fdc73b68da35a7a7bb220514337d (diff)
downloadports-3843072da5ff94afb5a22e98ab4e81809611c4a9.tar.gz
ports-3843072da5ff94afb5a22e98ab4e81809611c4a9.zip
Add dc3dd, a dd program useful for computer forensics.
Notes
Notes: svn path=/head/; revision=269205
Diffstat (limited to 'sysutils/dc3dd')
-rw-r--r--sysutils/dc3dd/Makefile36
-rw-r--r--sysutils/dc3dd/distinfo2
-rw-r--r--sysutils/dc3dd/files/patch-lib_Makefile.in21
-rw-r--r--sysutils/dc3dd/files/patch-src_dc3dd.c68
-rw-r--r--sysutils/dc3dd/pkg-descr18
-rw-r--r--sysutils/dc3dd/pkg-plist106
6 files changed, 251 insertions, 0 deletions
diff --git a/sysutils/dc3dd/Makefile b/sysutils/dc3dd/Makefile
new file mode 100644
index 000000000000..1c26cb6fb9ab
--- /dev/null
+++ b/sysutils/dc3dd/Makefile
@@ -0,0 +1,36 @@
+# New ports collection makefile for: dc3dd
+# Date created: 15 February 2011
+# Whom: MANTANI Nobutaka <nobutaka@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dc3dd
+PORTVERSION= 7.0.0
+CATEGORIES= sysutils
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
+
+MAINTAINER= nobutaka@FreeBSD.org
+COMMENT= A dd program useful for computer forensics
+
+USE_BZIP2= yes
+USE_GETTEXT= yes
+USE_ICONV= yes
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+ LIBS="${LIBS} -L${LOCALBASE}/lib"
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+MAN1= dc3dd.1
+
+.if defined(WITHOUT_NLS)
+CONFIGURE_ARGS= --disable-nls
+PLIST_SUB+= NLS="@comment "
+.else
+PLIST_SUB+= NLS=""
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/dc3dd/distinfo b/sysutils/dc3dd/distinfo
new file mode 100644
index 000000000000..6666c168f804
--- /dev/null
+++ b/sysutils/dc3dd/distinfo
@@ -0,0 +1,2 @@
+SHA256 (dc3dd-7.0.0.tar.bz2) = 90aa98ebe89c19360b58703aec104de4846f784ba8e1e0e653f46c5aa4889976
+SIZE (dc3dd-7.0.0.tar.bz2) = 2970428
diff --git a/sysutils/dc3dd/files/patch-lib_Makefile.in b/sysutils/dc3dd/files/patch-lib_Makefile.in
new file mode 100644
index 000000000000..b226689be8be
--- /dev/null
+++ b/sysutils/dc3dd/files/patch-lib_Makefile.in
@@ -0,0 +1,21 @@
+--- lib/Makefile.in.orig 2011-02-14 00:45:49.000000000 +0900
++++ lib/Makefile.in 2011-02-14 00:50:19.000000000 +0900
+@@ -1629,18 +1629,6 @@
+
+ all-local: charset.alias ref-add.sed ref-del.sed
+ install-exec-local: all-local
+- test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
+- if test -f $(charset_alias); then \
+- sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+- rm -f $(charset_tmp) ; \
+- else \
+- if test $(GLIBC21) = no; then \
+- sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+- $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+- rm -f $(charset_tmp) ; \
+- fi ; \
+- fi
+
+ uninstall-local: all-local
+ if test -f $(charset_alias); then \
diff --git a/sysutils/dc3dd/files/patch-src_dc3dd.c b/sysutils/dc3dd/files/patch-src_dc3dd.c
new file mode 100644
index 000000000000..ddcf0382e881
--- /dev/null
+++ b/sysutils/dc3dd/files/patch-src_dc3dd.c
@@ -0,0 +1,68 @@
+--- src/dc3dd.c.orig 2011-02-14 00:17:13.000000000 +0900
++++ src/dc3dd.c 2011-02-14 00:22:11.000000000 +0900
+@@ -45,7 +45,7 @@
+ #include <linux/types.h>
+ #include "hdparm/hpa_dco.h"
+ #endif
+-#elif defined (__APPLE__)
++#elif defined (__APPLE__) || defined (__FreeBSD__)
+ #include <sys/disk.h>
+ #include <sys/ioctl.h>
+ #elif defined (__CYGWIN__)
+@@ -2325,6 +2325,56 @@
+ }
+ }
+
++#elif defined (__FreeBSD__)
++
++static void
++get_file_stats(file_t* file)
++{
++ file->probed = false;
++ file->is_device = false;
++ file->is_block_device = false;
++ file->probed_sector_size = 0;
++ file->probed_size_in_sectors= 0;
++ file->probed_size_in_bytes = 0;
++
++ struct stat file_info;
++ if (fstat(file->descriptor, &file_info) == 0)
++ {
++ if (file_info.st_mode & S_IFBLK)
++ {
++ // The file is a character device or a block device. It is necessary to
++ // use ioctl to query the OS to get the data to compute the size of the
++ // device.
++ file->is_device = true;
++ file->is_block_device = true;
++
++ uint32_t sector_size = 0;
++ uintmax_t size_in_sectors = 0;
++ off_t size_in_bytes = 0;
++ if (ioctl(file->descriptor, DIOCGSECTORSIZE, &sector_size) >= 0 &&
++ ioctl(file->descriptor, DIOCGMEDIASIZE, &size_in_bytes) >= 0)
++ {
++ size_in_sectors = (uintmax_t)size_in_bytes / sector_size;
++ file->probed_size_in_sectors = (uintmax_t)size_in_sectors;
++ file->probed_sector_size = (uintmax_t)sector_size;
++ file->probed_size_in_bytes = file->probed_size_in_sectors * file->probed_sector_size;
++ file->probed = true;
++ }
++ }
++ else
++ {
++ // The file is a file (an image).
++ off_t start_of_file = lseek(file->descriptor, 0 , SEEK_CUR);
++ off_t end_of_file = lseek(file->descriptor, 0, SEEK_END);
++ if (lseek(file->descriptor, start_of_file, SEEK_SET) == 0)
++ {
++ file->probed_size_in_bytes = end_of_file - start_of_file;
++ file->probed = true;
++ }
++ }
++ }
++}
++
+ #endif // ifdef __LINUX__
+
+ // End code copied (and modified) from md5deep helpers.c
diff --git a/sysutils/dc3dd/pkg-descr b/sysutils/dc3dd/pkg-descr
new file mode 100644
index 000000000000..9485dc9675ea
--- /dev/null
+++ b/sysutils/dc3dd/pkg-descr
@@ -0,0 +1,18 @@
+dc3dd is a patched version of GNU dd to include a number of features useful
+for computer forensics. Many of these features were inspired by dcfldd, but
+were rewritten for dc3dd.
+
+- Pattern writes. The program can write a single hexadecimal value or a text
+ string to the output device for wiping purposes.
+- Piecewise and overall hashing with multiple algorithms. Supports MD5, SHA-1,
+ SHA-256, and SHA-512.
+- Progress meter with automatic input/output file size probing.
+- Combined log for hashes and errors.
+- Error grouping. Produces one error message for identical sequential errors.
+- Verify mode. Able to hash output files and compare hashes to the acquisition
+ hash.
+- Ability to split the output into chunks with numerical or alphabetic
+ extensions.
+- Ability to write multiple output files simultaneuously.
+
+WWW: http://dc3dd.sourceforge.net/
diff --git a/sysutils/dc3dd/pkg-plist b/sysutils/dc3dd/pkg-plist
new file mode 100644
index 000000000000..8bcab839550f
--- /dev/null
+++ b/sysutils/dc3dd/pkg-plist
@@ -0,0 +1,106 @@
+bin/dc3dd
+%%NLS%%share/locale/af/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/af/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/be/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/be/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/bg/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/bg/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/ca/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/cs/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/da/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/da/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/de/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/de/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/el/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/el/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/es/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/es/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/et/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/et/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/eu/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/eu/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/fi/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/fi/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/fr/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/ga/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/ga/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/gl/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/hu/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/it/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/it/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/ja/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/ko/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/lt/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/lt/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/ms/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/ms/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/nb/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/nl/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/pl/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/pt/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/pt_BR/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/ru/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/sk/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/sl/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/sl/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/sv/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/tr/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/uk/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/uk/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/vi/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/zh_CN/LC_TIME/dc3dd.mo
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/dc3dd.mo
+%%NLS%%share/locale/zh_TW/LC_TIME/dc3dd.mo
+%%NLS%%@dirrmtry share/locale/zh_TW/LC_TIME
+%%NLS%%@dirrmtry share/locale/zh_CN/LC_TIME
+%%NLS%%@dirrmtry share/locale/vi/LC_TIME
+%%NLS%%@dirrmtry share/locale/uk/LC_TIME
+%%NLS%%@dirrmtry share/locale/tr/LC_TIME
+%%NLS%%@dirrmtry share/locale/sv/LC_TIME
+%%NLS%%@dirrmtry share/locale/sl/LC_TIME
+%%NLS%%@dirrmtry share/locale/sk/LC_TIME
+%%NLS%%@dirrmtry share/locale/ru/LC_TIME
+%%NLS%%@dirrmtry share/locale/pt_BR/LC_TIME
+%%NLS%%@dirrmtry share/locale/pt/LC_TIME
+%%NLS%%@dirrmtry share/locale/pl/LC_TIME
+%%NLS%%@dirrmtry share/locale/nl/LC_TIME
+%%NLS%%@dirrmtry share/locale/nb/LC_TIME
+%%NLS%%@dirrmtry share/locale/ms/LC_TIME
+%%NLS%%@dirrmtry share/locale/lt/LC_TIME
+%%NLS%%@dirrmtry share/locale/ko/LC_TIME
+%%NLS%%@dirrmtry share/locale/ja/LC_TIME
+%%NLS%%@dirrmtry share/locale/it/LC_TIME
+%%NLS%%@dirrmtry share/locale/hu/LC_TIME
+%%NLS%%@dirrmtry share/locale/gl/LC_TIME
+%%NLS%%@dirrmtry share/locale/ga/LC_TIME
+%%NLS%%@dirrmtry share/locale/fr/LC_TIME
+%%NLS%%@dirrmtry share/locale/fi/LC_TIME
+%%NLS%%@dirrmtry share/locale/eu/LC_TIME
+%%NLS%%@dirrmtry share/locale/et/LC_TIME
+%%NLS%%@dirrmtry share/locale/es/LC_TIME
+%%NLS%%@dirrmtry share/locale/el/LC_TIME
+%%NLS%%@dirrmtry share/locale/de/LC_TIME
+%%NLS%%@dirrmtry share/locale/da/LC_TIME
+%%NLS%%@dirrmtry share/locale/cs/LC_TIME
+%%NLS%%@dirrmtry share/locale/ca/LC_TIME
+%%NLS%%@dirrmtry share/locale/bg/LC_TIME
+%%NLS%%@dirrmtry share/locale/be/LC_TIME
+%%NLS%%@dirrmtry share/locale/af/LC_TIME