Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 11th, 2012  |  syntax: None  |  size: 9.78 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/Makefile.in b/Makefile.in
  2. index 4bfbb1e..0a61813 100644
  3. --- a/Makefile.in
  4. +++ b/Makefile.in
  5. @@ -70,7 +70,7 @@ AUTOMAKE_OPTIONS = foreign no-dependencies
  6.  
  7.  JPEGDIR = ./jpeg-6b
  8.  JPEGINC = -I$(JPEGDIR)
  9. -JPEGLIB = -L$(JPEGDIR) -ljpeg
  10. +JPEGLIB = $(JPEGDIR)/libjpeg.a
  11.  JPEGDEP = $(JPEGDIR)/libjpeg.a
  12.  
  13.  FILEDIR = ./file
  14. diff --git a/configure b/configure
  15. index 8953760..6c5610a 100755
  16. --- a/configure
  17. +++ b/configure
  18. @@ -2563,6 +2563,10 @@ echo "$as_me:2562: checking blowfish object" >&5
  19.  echo $ECHO_N "checking blowfish object... $ECHO_C" >&6
  20.  
  21.  case "$target" in
  22. +*-*-darwin*)
  23. + echo "$as_me:2563: result: bf_enc.o" >&5
  24. +echo "${ECHO_T}bf_enc.o" >&6
  25. + BFOBJ=bf_enc.o;;
  26.  i386-*-*)
  27.   echo "$as_me:2567: result: bf-586.o" >&5
  28.  echo "${ECHO_T}bf-586.o" >&6
  29. diff --git a/file/Makefile.in b/file/Makefile.in
  30. index 7dcb893..b569184 100644
  31. --- a/file/Makefile.in
  32. +++ b/file/Makefile.in
  33. @@ -504,9 +504,9 @@ magic: Header Localstuff $(magic_FRAGMENTS)
  34.         done >> $@
  35.  
  36.  magic.inc: magic
  37. -       echo -n "\"" > $@
  38. +       /bin/echo -n "\"" > $@
  39.         sed -e 's/\\/\\\\/g' -e 's/"/\\\"/g' -e 's/$$/\ \\/' magic >> $@
  40. -       echo -n "\"" >> $@
  41. +       /bin/echo -n "\"" >> $@
  42.  
  43.  file.1:        Makefile file.man
  44.         @rm -f $@
  45. diff --git a/stegdetect.c b/stegdetect.c
  46. index 74814a5..ea521f5 100644
  47. --- a/stegdetect.c
  48. +++ b/stegdetect.c
  49. @@ -78,7 +78,7 @@ char *progname;
  50.  float DCThist[257];
  51.  float scale = 1;               /* Sensitivity scaling */
  52.  
  53. -static int debug = 0;
  54. +static int stegdebug = 0;
  55.  static int quiet = 0;
  56.  static int ispositive = 0;     /* Current images contain stego */
  57.  static char *transformname;    /* Current transform name */
  58. @@ -135,7 +135,7 @@ buildDCThist(short *data, int x, int y)
  59.         sum = count = 0;
  60.         for (i = x; i < y; i++) {
  61.                 if ((i & ~63) == i) {
  62. -                       if (debug & DBG_PRINTONES)
  63. +                       if (stegdebug & DBG_PRINTONES)
  64.                                 fprintf(stdout, "%d] %d\n", i, count);
  65.                         sum += count;
  66.                         count = 0;
  67. @@ -159,7 +159,7 @@ buildDCThist(short *data, int x, int y)
  68.                 DCThist[off + 128]++;
  69.         }
  70.  
  71. -       if (debug & DBG_PRINTHIST) {
  72. +       if (stegdebug & DBG_PRINTHIST) {
  73.                 for (i = 0; i < 256; i++) {
  74.                         fprintf(stdout, "%4d: %8.1f\n", i - 128, DCThist[i]);
  75.                 }
  76. @@ -291,7 +291,7 @@ unify_outguess(float *hist, float *theo, float *obs, float *pdiscard)
  77.                  */
  78.                 if ((fbar > f/4) &&
  79.                     ((f - f/3) - (fbar + f/3) > 0)) {
  80. -                       if ((debug & DBG_CHIDIFF) && (one || two))
  81. +                       if ((stegdebug & DBG_CHIDIFF) && (one || two))
  82.                                 fprintf(stdout,
  83.                                         "%4d: %8.3f - %8.3f skipped (%f)\n",
  84.                                         i*2 - 128,
  85. @@ -356,7 +356,7 @@ chi2(float *DCTtheo, float *DCTobs, int size, float discard)
  86.                 ymt += DCTobs[i];
  87.                 ytt += DCTtheo[i];
  88.  
  89. -               if (debug & DBG_CHIDIFF) {
  90. +               if (stegdebug & DBG_CHIDIFF) {
  91.                         if (DCTobs[i] || DCTtheo[i])
  92.                                 fprintf(stdout, "%4d: %8.3f - %8.3f\n", i,
  93.                                         DCTobs[i],
  94. @@ -368,7 +368,7 @@ chi2(float *DCTtheo, float *DCTobs, int size, float discard)
  95.                         chi = ymt - ytt;
  96.  
  97.  
  98. -                       if (debug & DBG_CHICALC) {
  99. +                       if (stegdebug & DBG_CHICALC) {
  100.                                 fprintf(stdout,
  101.                                         "     (%8.3f - %8.3f)^2 = %8.3f / %8.3f = %8.3f | %8.3f\n",
  102.                                         ymt, ytt,
  103. @@ -388,7 +388,7 @@ chi2(float *DCTtheo, float *DCTobs, int size, float discard)
  104.  
  105.         f = 1 - chi2cdf(sumchi, dgf - 1);
  106.  
  107. -       if (debug & DBG_CHIEND) {
  108. +       if (stegdebug & DBG_CHIEND) {
  109.                 fprintf(stdout,
  110.                         "Categories: %d, Chi: %f, Q: %f, dis: %f -> %f\n",
  111.                         dgf, sumchi, f, discard, f * (1 - discard));
  112. @@ -435,7 +435,7 @@ chi2test(short *data, int bits,
  113.         while (_iteration < (imaxiter))
  114.  
  115.  #define BINSEARCH_NEXT(thresh) \
  116. -       if (debug & DBG_BINSRCH) \
  117. +       if (stegdebug & DBG_BINSRCH) \
  118.                 fprintf(stdout, "sum: %f, percent: %f,  good: %f\n", \
  119.                         sum, percent, _good); \
  120.         if (_iteration == 0) { \
  121. @@ -481,7 +481,7 @@ histogram_chi_jsteg(short *data, int bits)
  122.                                 break;
  123.                         if (f > 0.4)
  124.                                 sum += f * percent;
  125. -                       if ((debug & DBG_CHI) && f != 0)
  126. +                       if ((stegdebug & DBG_CHI) && f != 0)
  127.                                 fprintf(stdout, "%04f[:] %8.5f%% %f\n",
  128.                                         i, f * 100, sum);
  129.                 }
  130. @@ -491,7 +491,7 @@ histogram_chi_jsteg(short *data, int bits)
  131.  
  132.         BINSEARCH_IFABORT(end) {
  133.         abort:
  134. -               if (debug & DBG_ENDVAL)
  135. +               if (stegdebug & DBG_ENDVAL)
  136.                         fprintf(stdout,
  137.                                 "Accumulation: no detection possible\n");
  138.                 return (-1);
  139. @@ -528,8 +528,8 @@ histogram_chi_jsteg(short *data, int bits)
  140.                         }
  141.                 }
  142.  
  143. -               if ((debug & DBG_CHI) &&
  144. -                   ((debug & DBG_PRINTZERO) || f != 0))
  145. +               if ((stegdebug & DBG_CHI) &&
  146. +                   ((stegdebug & DBG_PRINTZERO) || f != 0))
  147.                         fprintf(stdout, "%04f: %8.5f%%\n",
  148.                                 i, f * 100);
  149.         }
  150. @@ -537,7 +537,7 @@ histogram_chi_jsteg(short *data, int bits)
  151.         length = jsteg_size(data, bits, NULL);
  152.         minlen = where/8;
  153.         maxlen = (where + percent)/8;
  154. -       if (debug & DBG_ENDVAL) {
  155. +       if (stegdebug & DBG_ENDVAL) {
  156.                 fprintf(stdout,
  157.                     "Accumulation (%d): %f%% - %f (%f) (%d:%d - %d)\n",
  158.                     (int)percent,
  159. @@ -596,7 +596,7 @@ histogram_chi_outguess(short *data, int bits)
  160.                         f = chi2test(data, bits, unify_false_outguess,
  161.                                      off - range, off + range);
  162.                         sum += f;
  163. -                       if ((debug & DBG_CHI) && f != 0)
  164. +                       if ((stegdebug & DBG_CHI) && f != 0)
  165.                                 fprintf(stdout, "%04d[:] %8.5f%%\n",
  166.                                         i, f * 100);
  167.                 }
  168. @@ -618,8 +618,8 @@ histogram_chi_outguess(short *data, int bits)
  169.                         sum += f;
  170.                 if (f > 0.001)
  171.                         count++;
  172. -               if ((debug & DBG_CHI) &&
  173. -                   ((debug & DBG_PRINTZERO) || f != 0))
  174. +               if ((stegdebug & DBG_CHI) &&
  175. +                   ((stegdebug & DBG_PRINTZERO) || f != 0))
  176.                         fprintf(stdout, "%04d: %8.5f%%\n", i, f * 100);
  177.         }
  178.  
  179. @@ -631,7 +631,7 @@ histogram_chi_outguess(short *data, int bits)
  180.  
  181.         norm = sum / norm_outguess[off];
  182.  
  183. -       if (debug & DBG_ENDVAL)
  184. +       if (stegdebug & DBG_ENDVAL)
  185.                 fprintf(stdout,
  186.                         "Accumulation (%4.1f%%): %8.3f%% (%8.3f%%) (%4.1f)\n",
  187.                         percent,
  188. @@ -714,7 +714,7 @@ jphide_zero_one(void)
  189.                 else if (sum >= 15 && res <= -1)
  190.                         negative = 1;
  191.  
  192. -               if (debug & DBG_ENDVAL)
  193. +               if (stegdebug & DBG_ENDVAL)
  194.                         printf("Zero/One: %d : %d -> %5.1f%s\n",
  195.                             one, zero, (float)res/2, negative ? " **" : "");
  196.  
  197. @@ -740,7 +740,7 @@ jphide_empty_pair(void)
  198.                     (!DCThist[i] || !DCThist[i+1]))
  199.                         res++;
  200.         }
  201. -       if (debug & DBG_ENDVAL)
  202. +       if (stegdebug & DBG_ENDVAL)
  203.                 printf("Empty pairs: %d\n", res);
  204.         if (res > 3)
  205.                 return (1);
  206. @@ -770,7 +770,7 @@ histogram_chi_jphide(short *data, int bits)
  207.  
  208.         buildDCTreset();
  209.         f = chi2test(data, bits, unify_jphide, 0, jphpos[0]);
  210. -       if (debug & DBG_ENDVAL)
  211. +       if (stegdebug & DBG_ENDVAL)
  212.                 fprintf(stdout, "Pos[0]: %04d: %8.5f%%\n", jphpos[0], f*100);
  213.  
  214.         /* If JPhide was used, we should get a high value at this position */
  215. @@ -793,7 +793,7 @@ histogram_chi_jphide(short *data, int bits)
  216.  
  217.         false = 0;
  218.         f2 = chi2test(data, bits, unify_false_jphide, 0, jphpos[0]);
  219. -       if (debug & DBG_ENDVAL)
  220. +       if (stegdebug & DBG_ENDVAL)
  221.                 fprintf(stdout, "Pos[0]: %04d[:] %8.5f%%: %8.5f%%\n",
  222.                     jphpos[0], f2*100, (f2 - f)*100);
  223.  
  224. @@ -802,13 +802,13 @@ histogram_chi_jphide(short *data, int bits)
  225.                 return (0);
  226.  
  227.         f = chi2test(data, bits, unify_jphide, jphpos[0]/2, jphpos[0]);
  228. -       if (debug & DBG_ENDVAL)
  229. +       if (stegdebug & DBG_ENDVAL)
  230.                 fprintf(stdout, "Pos[0]/2: %04d: %8.5f%%\n", jphpos[0], f*100);
  231.         if (f < 0.9)
  232.                 return (0);
  233.  
  234.         f2 = chi2test(data, bits, unify_false_jphide, jphpos[0]/2, jphpos[0]);
  235. -       if (debug & DBG_ENDVAL)
  236. +       if (stegdebug & DBG_ENDVAL)
  237.                 fprintf(stdout, "Pos[0]/2: %04d[:] %8.5f%%: %8.5f%%\n",
  238.                     jphpos[0], f2*100, (f2 - f)*100);
  239.         if (f2 * 0.95 > f)
  240. @@ -816,7 +816,7 @@ histogram_chi_jphide(short *data, int bits)
  241.  
  242.         f = chi2test(data, bits, unify_jphide, 0, jphpos[0]/2);
  243.         f2 = chi2test(data, bits, unify_false_jphide, 0, jphpos[0]/2);
  244. -       if (debug & DBG_ENDVAL)
  245. +       if (stegdebug & DBG_ENDVAL)
  246.                 fprintf(stdout, "0->1/2: %04d[:] %8.5f%% %8.5f%%\n",
  247.                     jphpos[0], f*100, f2*100);
  248.  
  249. @@ -864,8 +864,8 @@ histogram_chi_jphide(short *data, int bits)
  250.                 else if (f < 0.2)
  251.                         break;
  252.  
  253. -               if ((debug & DBG_CHI) &&
  254. -                   ((debug & DBG_PRINTZERO) || f != 0))
  255. +               if ((stegdebug & DBG_CHI) &&
  256. +                   ((stegdebug & DBG_PRINTZERO) || f != 0))
  257.                         fprintf(stdout, "%04d: %8.5f%% %8.5f%% %.2f %.2f %s\n",
  258.                             i, f * 100, f2*100, sum, false,
  259.                             (i <= jphpos[0] && f2*0.99 > f) ||
  260. @@ -876,7 +876,7 @@ histogram_chi_jphide(short *data, int bits)
  261.  
  262.         sum /= 1000;
  263.  
  264. -       if (debug & DBG_ENDVAL)
  265. +       if (stegdebug & DBG_ENDVAL)
  266.                 fprintf(stdout, "Accumulation (neg = %d, %d): %f%% [%d]\n",
  267.                     negative, range, sum * 100, jphpos[1]);
  268.  
  269. @@ -913,7 +913,7 @@ histogram_chi_jphide_old(short *data, int bits)
  270.                                 sum += f;
  271.                         else if (f < 0.2)
  272.                                 break;
  273. -                       if ((debug & DBG_CHI) && f != 0)
  274. +                       if ((stegdebug & DBG_CHI) && f != 0)
  275.                                 fprintf(stdout, "%04d[:] %8.5f%%\n",
  276.                                         i, f * 100);
  277.                 }
  278. @@ -939,12 +939,12 @@ histogram_chi_jphide_old(short *data, int bits)
  279.                 else if (f < 0.2)
  280.                         break;
  281.  
  282. -               if ((debug & DBG_CHI) &&
  283. -                   ((debug & DBG_PRINTZERO) || f != 0))
  284. +               if ((stegdebug & DBG_CHI) &&
  285. +                   ((stegdebug & DBG_PRINTZERO) || f != 0))
  286.                         fprintf(stdout, "%04d: %8.5f%%\n", i, f * 100);
  287.         }
  288.  
  289. -       if (debug & DBG_ENDVAL)
  290. +       if (stegdebug & DBG_ENDVAL)
  291.                 fprintf(stdout, "Accumulation (%4.0f): %f%%\n",
  292.                         percent,
  293.                         sum * 100);
  294. @@ -1277,7 +1277,7 @@ detect(char *filename, int scans)
  295.                         if (jdcts != NULL)
  296.                                 free(jdcts);
  297.                         scans = 0;
  298. -                       if (debug & DBG_ENDVAL)
  299. +                       if (stegdebug & DBG_ENDVAL)
  300.                                 fprintf(stdout,
  301.                                     "Disabled by comment check: %d\n",
  302.                                     ncomments);
  303. @@ -1291,7 +1291,7 @@ detect(char *filename, int scans)
  304.                                 if (jdcts != NULL)
  305.                                         free(jdcts);
  306.                                 scans = 0;
  307. -                               if (debug & DBG_ENDVAL)
  308. +                               if (stegdebug & DBG_ENDVAL)
  309.                                         fprintf(stdout,
  310.                                             "Disabled by header check: %d.%d %#0x\n",
  311.                                             major, minor, marker);
  312. @@ -1478,7 +1478,7 @@ main(int argc, char *argv[])
  313.                         fprintf(stdout, "Stegdetect Version %s\n", VERSION);
  314.                         exit(1);
  315.                 case 'd':
  316. -                       debug = atoi(optarg);
  317. +                       stegdebug = atoi(optarg);
  318.                         break;
  319.                 case 't':
  320.                         scans = 0;
  321. @@ -1580,7 +1580,7 @@ main(int argc, char *argv[])
  322.                                 detect(line, scans);
  323.         }
  324.  
  325. -       if (debug & FLAG_JPHIDESTAT) {
  326. +       if (stegdebug & FLAG_JPHIDESTAT) {
  327.                 fprintf(stdout, "Positive rejected because of\n"
  328.                     "\tRunlength: %d\n"
  329.                     "\tZero-One: %d\n"