• Home
  • Software
  • About
Deepthought

Driftnet x64 Fix

April 16, 2011 7:42 am / Leave a Comment / admin

apt-get source driftnet

START COPY BELOW LINE ———https://bugzilla.redhat.com/attachment.cgi?id=134667———

--- driftnet-0.1.6/image.c 2002-07-09 20:26:41.000000000 +0100
+++ driftnet-0.1.6.new/image.c 2006-08-22 21:14:38.000000000 +0100
@@ -15,29 +15,20 @@ static const char rcsid[] = "$Id: image.

/* memstr:
* Locate needle, of length n_len, in haystack, of length h_len, returning NULL.
- * Uses the Boyer-Moore search algorithm. Cf.
- * http://www-igm.univ-mlv.fr/~lecroq/string/node14.html */
-static unsigned char *memstr(const unsigned char *haystack, const size_t hlen,
- const unsigned char *needle, const size_t nlen) {
- int skip[256], k;
-
- if (nlen == 0) return (char*)haystack;
-
- /* Set up the finite state machine we use. */
- for (k = 0; k < 255; ++k) skip[k] = nlen;
- for (k = 0; k < nlen - 1; ++k) skip[needle[k]] = nlen - k - 1;
-
- /* Do the search. */
- for (k = nlen - 1; k < hlen; k += skip[haystack[k]]) {
- int i, j;
- for (j = nlen - 1, i = k; j >= 0 && haystack[i] == needle[j]; j--) i--;
- if (j == -1) return (unsigned char*)(haystack + i + 1);
- }
-
- return NULL;
+ */
+char *memstr(const unsigned char *haystack, const size_t hlen,
+ const unsigned char *needle, const size_t nlen)
+{
+ char *p;
+
+ for (p = haystack; p <= (haystack - nlen + hlen); p++)
+ {
+ if (memcmp(p, needle, nlen) == 0)
+ return p; /* found */
+ }
+ return NULL;
}

-
/* If we run out of space, put us back to the last candidate GIF header. */
/*#define spaceleft do { if (block > data + len) { printf("ran out of space\n"); return gifhdr; } } while (0)*/
#define spaceleft if (block > data + len) return gifhdr

END COPY ABOVE LINE ——————–

patch < PATCHFILE
dpkg-buildpackage -rfakeroot -uc -b ;from within the directory that was created for the package after downloading.
dpkg -i PACKAGE.deb

driftnet -i eth0 -p -a -d /tmp/test

Posted in: Debian, Networking / Tagged: CLI, Data Recovery, File Carving, File Patching, Fix, Linux, Security

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CAPTCHA Image
Refresh Image

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*

*

Post Navigation

← Previous Post
Next Post →

Categories

  • Development (4)
    • Bash (3)
    • Perl (1)
  • Hardware (2)
    • DD-Wrt (1)
    • USB (1)
  • Linux (21)
    • Debian (11)
    • Ubuntu (3)
  • Media (6)
    • Encoding (1)
    • OCR (1)
    • Sharing (1)
    • Streaming (3)
  • Mobile (7)
    • Huawei (3)
    • iPhone (3)
    • n900 (1)
  • News (1)
  • OSX (6)
    • Brew (2)
  • Security (9)
    • Networking (8)
  • Software (1)
    • OSX (1)
  • VoIP (5)
    • Asterisk (5)
    • Skype (1)

Tag Cloud

3G APT Asterisk Bash Brew CLI Copy Debian DISA Disk EMail ext2 ext3 Files Filesystem GPRS GSM HSDPA Huawei IOS Linux Media Mobile Modem Monitor Networking News OSX Partitions Perl reiser Repo Scripting Security Sensors SSL System Temp Terminal Text to Speech TTS Ubuntu Updates VoIP VPN

Join the Bitcoin Revolution!

What's this?Bitcoin Plus
© Copyright 2013 - Deepthought
Infinity Theme by DesignCoral / WordPress