
=pod

=head1 History revision for Dicop-WorkerFrame

=head2 2005-03-08 (v2.14 build 35)

=over 2

=item fixed

	use "long long" for password counter
	init startlen/endlen for SET_EXTRACT situations
	16024 tests

=back

=head2 2004-12-06 (v2.14 build 34)

=over 2

=item fixed

	move some var declarations for strict ansi
	[BUFSIZE + 256] instead of [BUFSIZE + len + 1] for non-gcc compiler
	16024 tests

=back

=head2 2004-09-16 (v2.14 build 33)

=over 2

=item fixed

	forgot to include dictlist2.t, extract2.t into MANIFEST
	converted all *.t files to Test::More (like() makes it much easier!)
	when reading a charset/job description file, no longer prepend target
	 (make paths consistent, always expect the full path to the file or
	  as a desperate attempt, try one or two dirs up)
	16024 tests

=back

=head2 2004-06-23 (v2.14 build 32)

=over 2

=item fixed

	POD in CHANGES file
	nits in TODO, README
	16020 tests

=back

=head2 2004-06-13 (v2.14 build 31)

=over 2

=item fixed

	removed SIGNATURE and doc about it (external .gpg sig from now on)
	16020 tests

=back

=head2 2004-05-12 (v2.14 build 30)

=over 2

=item fixed

	when max_merge is still bigger than max_pwds (due to stages/mutations)
	even when reducing size of inputbuffer, then increase max_pwds until it is
	bigger (avoid SEGFAULT)

=back

=head2 2004-05-11 (v2.14 build 29)

=over 2

=item fixed

	limit input buffer size to 1/8 when doing mutations/stages otherwise
	 we end up extracting 20 times BUF_SIZE, which is 2.7 million, which
	 is way too many (e.g. larger than 1 million for the entire buffer!)
	16020 tests ()

=back

=head2 2004-05-03 (v2.14 build 28)

=over 2

=item added
	
	Extract code:
	  * print current time on outputting percentage done
	  * extract more strings at a time (formerly 2^20):
	    2-6 => 2^22, 7-8 => 3*2^20, 9-12 => 2^
	  * print amount of to-be-extracted-at-a-time strings

=item fixed

	compile extract worker for testsuite, too
	don't mutate extracted pwds when either mutations | stages == 0
	16020 tests ()

=back

=head2 2004-04-29 (v2.14 build 27)

=over 2

=item fixed

	The dictionary mutation/stage code now checks for generating the same
	 mutation again (for instance, for '00', the lower case would be '00'
	 again). This wasted checks for the same key over and over again.
	The extract charsets now honour the dictionary_mutations and
	 dictionary_stages settings (e.g. mutate the extracted words, too)
	 Set both of them to 0 (default) to disable this feature.
	added doc for extracting with case mutations/stages
	added tests for numbers in a dictionary with mutation/stage
	16020 tests (mutations/stages with extract)

=back

=head2 2004-04-28 (v2.14 build 26)

=over 2

=item added

	print current time on start of main loop, and at the very end

=item fixed

	15927 tests ()

=back

=head2 2004-04-01 (v2.14 build 25)

=over 2

=item added

	print current time on each extracted string length

=item fixed
	
	15927 tests ()

=back

=head2 2004-03-22 (v2.14 build 24)

=over 2

=item fixed

	define VERSION in dicop.h, not main.c and let Makefile.PL read it
	debug_trace: supports 0 (none), 1 (light) or 2 (heavy)
	shorter output on debug_trace level 2
	15927 tests ()

=back

=head2 2004-01-21 (v2.14 build 23)

=over 2

=item fixed

	small doc fixes in doc/Extract.pod

=back

=head2 2004-01-14 (v2.14 build 22)

=over 2 

=item fixed

	Prepared for release!
	fixed parameters to pwdgen_img_extract() in pwd_img.c
	wcr src: Total: lines 5145, words 21270, chars 146343
	15927 tests ()

=back

=head2 2003-12-02 (v2.14 build 21)

=over 2

=item fixed

	pwdgen_img_extract: removed image_type param, chanegd bufsize to long
	prevent segfault when extracting with odd/even at last buffer
	wcr src: Total: lines 5143, words 21265, chars 146291
	15927 tests ()

=back

=head2 2003-11-27 (v2.14 build 20)

=over 2

=item added

	chunk_2_[0-1].txt

=item fixed

	dictionary settings from chunk description file got overwritten
	 later with defaults
	store dictionary file offset in ssPWD struct
	wcr src: Total: lines 5127, words 21177, chars 145810
	15927 tests (tests for settings from chunk description file)

=back

=head2 2003-11-27 (v2.14 build 19)

=over 2

=item added

	image01[5-8].lst, chunk_0_1[5-8].txt, image005.img to MANIFEST

=item fixed

	wcr src: Total: lines 5125, words 21127, chars 145396
	14195 tests (added tests for extract_even_odd)

=back

=head2 2003-11-10 (v2.14 build 18)

=over 2

=item added

	build number to main version	
	print percentage done when extracting

=item fixed

	memmove() vs. memcpy() in pwd_img.c (relocate buffer)
	wcr src: Total: lines 5192, words 21387, chars 146733
	14173 tests ()

=back

=head2 2003-10-29 (v2.14 build 17)

=over 2

=item added

	allow dictionary_(file|mutations|stages) in chunk description file
	added Dict.pod to describe manual setups for dictionary attacks

=item fixed

	forgot to add Config.pod to MANIFEST
	wcr src: Total: lines 5192, words 21387, chars 146733
	14173 tests ()

=back

=head2 2003-10-24 (v2.14 build 16)

=over 2

=item added

	added fflush() in main and extract

=item fixed

	wcr src: Total: lines 5153, words 21210, chars 145416
	14173 tests ()

=back

=head2 2003-10-23 (v2.14 build 15)

=over 2

=item added

	option 'extract_even_odd' to chunk config file for extraction

=item fixed

	wcr src: Total: lines 5153, words 21210, chars 145416
	14173 tests ()

=back

=head2 2003-10-22 (v2.14 build 14)

=over 2

=item added

	mg - compile with debugging (for valgrind usage)
	pwdgen_img_merge() - merge two sorted lists
	trial (not used yet):
	 pwdgen_img_merge_sort_weed() - mergesort & weeding out doubles in place
	 pwdgen_idx_merge_sort() - mergesort using an index

=item fixed

	after sorting and weeding out doubles and extracting more, sort only
	 the freshly added strings and merge them in, instead of sorting the
	 entire list again (great speedup)
	fixed a bug in pwdimg_extract() when bytes read < len
	wcr src: Total: lines 4944, words 20380, chars 140301
	14173 tests ()

=back

=head2 2003-10-21 (v2.14 build 13)

=over 2

=item fixed

	rewrote extraction to extract until X strings, then compact, and
	 the extract again until really more than X strings
	noticed segfault, not found and no fix yet
	wcr src: Total: lines 4741, words 19462, chars 134447
	14173 tests ()

=back

=head2 2003-10-15 (v2.14 build 12)

=over 2

=item fixed

	added _swap
	handle 32 bits at once in _copy and _swap
	use fwrite() instead of fputc() in extract.c
	extract file is now about 17% faster (len 3..20, 250199 strings)
	wcr src: Total: lines 4476, words 18354, chars 127396
	14173 tests (extracting from big files, text multiple skip)

=back

=head2 2003-10-15 (v2.14 build 11)

=over 2

=item added

	'extract' worker

=item fixed

	segfault in extract when filesize was bigger than BUFLEN (>8192 bytes)
	moved merge_sort to it's own pwdsort.c file to experiment with it
	extract w/ skip did not work if more than one byte had to be skipped
	extract code can handle arbitrary big files by extracting N strings,
	 then checking them, then extract the next N etc
	ammended TODO and doc/Extract.pod
	wcr src: Total: lines 4398, words 18036, chars 125467
	14173 tests (extracting from big files, text multiple skip)

=back

=head2 2003-10-14 (v2.14 build 10)

=over 2

=item added

	chunk description file: image_type=0
	added CFG_FAIL and CFG_NOFAIL for pwdcfg_find_key() and pwdcfg_as_int()

=item fixed

	main.c: print (C) and version
	use CFG_FAIL and CFG_NOFAIL for simpler code
	wcr src: Total: lines 4194, words 17224, chars 119807
	13367 tests (image_type=raw)

=back

=head2 2003-10-10 (v2.14 build 9)

=over 2

=item added

	doc/Config.pod - explain config files and their format and contents
	pwdcfg_as_int( cfg, keyname) - find key by name and return as integer
	pwdgen_img_check - check list of (sorted) extracted strings
	option 'extract_skip_invalids'

=item fixed

	got rid of zero termination of extracted strings, can now extract strings
	 with embedded zeros
	amended doc/Extract.pod to reflect current status
	refactored code to extract strings until no more are found, to enable
	 it later on to handle larger image sizes without memory overflow
	use pwdcfg_as_int() to shorten code
	doc/Config.pod describes file format and options
	updated (c) in various files
	let pwdread_charset() use pwdcfg_read() instead of own hackery
	wcr src: Total: lines 4161, words 17031, chars 118403
	13367 tests (extract with skipping)

=back

=head2 2003-10-09 (v2.14 build 8)

=over 2

=item added

	dictionary generator can use dictionary_file_offset from a chunk
	 description file and skip faster to the start word

=item fixed

	hand-rolled _compare and _copy to replace strncmp/memcmp etc
	 in merge_sort (makes it equally fast as strnFOO, but does not depend
	 one zero termination so we can extract strings with zeros in them)
	removed needless return code in merge_sort
	pwdgen_extract: removed pruning, now doubles are just skipped 
	(all in all the extract-and-sort phase is now about 30-40% faster)
	remvoed DEBUG and testcode paths in pwd_img.c
	wcr src: Total: lines 4086, words 16787, chars 116923
	13271 tests (tests for dictionary w/ chunk files, more bad input)

=back

=head2 2003-10-08 (v2.14 build 7)

=over 2

=item added

	pwdcfg_keys_exist()
	pwdgen_find_set()
	field 'charsets' to ssPwd struct

=item fixed

	amended TODO, API.pod and Extract.pod
	chunk description files: imagefile => image_file
				 added extractset_id
	added extractset_id support for image extraction
	 (use a SIMPLE set as list for the valid characters)
	got rid of 'len' parameter in pwdcfg_find_key()
	pwdgen_init() needs to keep out of the way in case of SET_EXTRACT
	optimized merge_sort by special case for last-first == 1
	optimized merge_sort by using memcpy for copying entire string blocks
	wcr src: Total: lines 4105, words 16713, chars 116596
	11537 tests (more image file extract tests)

=back

=head2 2003-10-07 (v2.14 build 6)

=over 2

=item added

	field 'targetlen' to ssPwd struct and set it in pwdgen_init()
	call to pwdgen_extract() in main() for SET_EXTRACT

=item fixed

	dos2unix on all .h and .c files
	removed the now needless pwdimgtest worker
	fixed the bugs in pwdgen_img_merge_sort()
	t/extract.t passes now all tests
	wcr src: Total: lines 3921, words 15871, chars 114023
	11443 tests (image file extract tests)

=back

=head2 2003-10-06 (v2.14 build 5)

=over 2

=item added

	amended API.doc and added some preliminary info about the ssPwd struct
	pwdcfg.c, pwdcfg.h: pwdcfg_read     - general key=value reading
			    pwdcfg_find_key - find a key if it exists
	pwdgen: struct ssPwd contains a config field, pointing to a 
	 double-linked list of key=value structs
	removed the fopen() cascades and replaced them with pwdgen_find_file()

=item fixed

	need to compile pwdimgtest for testsuite, too
	forgot to include pwdimgtest/ into MANIFEST
	wcr src: Total: lines 3775, words 15171, chars 109311
	11308 tests (more tests for bad inputs, fixed extract.t a bit)
	(the extract.t test does not succeed due to bugs in merge_sort)

=back

=head2 2003-09-29 (v2.14 build 4)

=over 2

=item added

	test image and expected outputs for extraction

=item fixed

	relocated API and development info into doc/API.pod
	added info about public API (pwdgen_add() etc) to API.pod
	shorten README to the important bits
	moved the target/ dir under t/ where it belongs
	included doc/Extract.pod and t/extract.t in MANIFEST
	wcr src: Total: lines 3412, words 13725, chars 99473
	11189 tests (extract.t)

=back

=head2 2003-09-26 (v2.14 build 3)

=over 2

=item added

	doc/Extract.pod

=item fixed

	wcr src: Total: lines 3410, words 13722, chars 99454
	11177 tests

=back

=head2 2003-09-25 (v2.14 build 2)

=over 2

=item added

	added mergesort to pwd_img.c

=item fixed
	
	fixed extraction code when image > buffer size
	after extraction weed out doubles by sorting
	wcr src: Total: lines 3410, words 13722, chars 99454
	11177 tests

=back

=head2 2003-09-23 (v2.14 build 1)

=over 2

=item added

	first version of pwd_img.c (gen pwd's from image file)
	pwdgen_add() - modify pwd counter

=item fixed

	README (mention endfunction(), add some bits and pseudo code)
	pwdgen.c: exit vs. exit()
	wcr src: Total: lines 3182, words 12751, chars 93060
	11177 tests

=back

=head2 2003-09-15 (v2.13 build 18)

=over 2

=item fixed

	pod in CHANGES
	11177 tests

=back

=head2 2003-05-21 (v2.13 build 17)

=over 2

=item fixed

	timeout in dictionary generator returned 1, not 4
	output change ("\n" vs "") for first key broke testsuit's neck
	doc for timeout problem with long stages/mutation/append/prepend phase
	doc todo for useless pwddict_stage() return value
	wcr src: Total: lines 2942, words 11703, chars 85690
	11177 tests (test for timeout stop code in dictionary generator)

=back

=head2 2003-05-19 (v2.13 build 16)

=over 2

=item added

	prepared for release

=back

=head2 2003-04-23 (v2.13 build 15)

=over 2

=item fixed

	for some cases of dict-mutaions, wd->pwd was right, but pwd->length not
	  (happened when appending for the next mutation after appending all
	   possible characters that length was too long)
	  so print out length in pwdtest, too and test for it in dictlist.t
	11176 tests (test that dict mutations set correct length)

=back

=head2 2003-04-17 (v2.13 build 14)

=over 2

=item added

	pwdblock: testworker for pwd's in "block or batch mode
	define PWD_LEN in pwdgen.h and use it

=item fixed

	pwd_found: take pointer to pwd struct, and length (avoid strncpy due
	 to possible embedded \x00 bytes)
	wcr src: Total: lines 2933, words 11629, chars 85223
	6176 tests (pwdblock)

=back

=head2 2003-04-16 (v2.13 build 13)

=over 2

=item added

	endfunction() (in main and as stub to examples), this can be used
	  to "gather" pwds and do them in batches

=item fixed

=back

=head2 2003-04-02 (v2.13 build 12)

=over 2

=item fixed

	added tests for appending more than one charset
	pwddict_fastforward() skip one word, except for very first word (to
	  avoid overlap between chunks)
	ammended tests for fastforward() change
	prepending charsets to dictionary words works now, tests for that
	wcr src: Total: lines 2703, words 10788, chars 79360
	5866 tests (prepend, append more than one set, fastforward skip word)

=back

=head2 2003-03-26 (v2.13 build 11)

=over 2

=item fixed

	count of passwords per generator, instead of global
	finally fixed append logic in dict generator (added pwddict_trynext())
	extended testsuite to cover more dict+append cases
	pwdgen_stop() takes sPWD as argument
	3690 tests

=back

=head2 2003-03-25 (v2.13 build 10)

=over 2

=item fixed

	pwdgen_next(), pwdgen_update_crc() and pwdgne_init_tables() take ptr
	 to sPWD struct
	pwdgen_init: init seconary password generators
	logic flow in pwddict_nextword() with append
	(only problem seems to be that the last appended password is tested
	 twice and that appending more than one digit still fails.)
	2155 tests

=back

=head2 2003-03-20 (v2.13 build 9)

=over 2

=item added

	Read in parameters in DICTIONARY set lines from charset.def file
	files with test output for appending charsets to DICTIONARY sets

=item fixed

	DICTIONARY sets contain start/end len (and re-use pos/set and paircnt)
	Complain about unknown keys while reading job charset descr. file
	handling a trailing ':' in charset.def dictionary set lines
	wcr src: Total: lines 2538, words 10158, chars 74124
	2155 tests (unknown keys, dictionary with appended chars)

=back

=head2 2003-03-19 (v2.13 build 8)

=over 2

=item added

	pwddict.c: routines take a ptr to sPWD as argument (instead of global)
	pwdgen.c: restructured pwdgen_init, added pwdgen_reinit()
	prepared for supporting appending pwdgen-style pwds to pwddict ones
	(e.g. SIMPLE/GROUPED pwds to each pwd of a DICTIONARY list of words)

=item fixed

	abort init if end pwd is shorter than start for SIMPLE/GROUPED sets
	print error msg. if fastforward cannot find the word in the dictionary
	915 tests (endlen < startlen, other bad inputs, dicttest.l)

=back

=head2 2003-02-20 (v2.13 build 7)

=over 2

=item fixed

	#define PWD_SUCCESS and PWD_FAIL for dofunction
	wcr src: Total: lines 2222, words 8562, chars 62474
	896 tests

=back

=head2 2003-02-16 (v2.13 build 6)

=over 2

=item added

	init, update and print out CRC for chunk

=item fixed

	extended README
	use strict; in testfiles
	"normal" password generator also now handles fixed prefixes
	wcr src: Total: lines 2222, words 8562, chars 62474
	896 tests (generator w/ prefix, test for timeout w/ dictionaries)

=back

=head2 2003-02-11 (v2.13 build 5)

=over 2

=item fixed

	removed unnecc. variable "found" in pwdgen_next()
	calc correct sPWD.overflow when doing dictionaries
	fixed bug that prevented generator from finishing if endpwd was at
	 wraparound from N to N+1 characters (and N >= 5)
	wcr src: Total: lines 2190, words 8433, chars 61249
	585 tests

=back

=head2 2003-02-10 (v2.13 build 4)

=over 2

=item fixed

	search dictionaries in target/dictionaries/ instead of in target/

=back

=head2 2003-02-04 (v2.13 build 3)

=over 2

=item added

	1023.set - test all 10 possible case mutations
	p1023.set, p42.set, p2.set, p3.set and prefix.t to test prefixes
	ps42.set - test prefix, stages and mutations on dictionary
	pwddict_stages - mutate org_word into word (forward, reverse etc)
	uc_consonants() and uc_vowels()

=item fixed

	a off-by-one bug in reading in the job description file
	wcr src: Total: lines 2049, words 7933, chars 57400
	585 tests (all 10 mutations incl. vowels and consonants, prefix)

=back

=head2 2003-02-03 (v2.13 build 2)

=over 2

=item added

	pwddict.h - prototypes for dictionary stuff	
	dictionary, dict_file, prefix, startlen & prefix_length in sPWD struct
	pwddict_mutate() => pwddict_next() (uses also pwddict_nextword())
	pwddict_nextword() - get next word from dictionary
	pwddict_fastforward() - fast forward dict to start word
	pwddict_openfile() - open the dict file
	pwdgen_read(): added support for reading in dictionary sets (type '2')
	pwdgen_readset(): read in a job's charset definition set file
	pwdgen_init(): support for set = '42.set' and dictionaries
	00_compile.t: change to t dir to allow manual runs

=item fixed

	pwddict_next: support password prefix by copy behind it
		      uses global sPWD for speed
		      use pwddict_nextword() after all mutations done
	pwddict_nextword: implent reading in, and check for timeout
	pwdinit.(c|h) => pwdread.(c|h)
	main.c: call pwdgen_next or pwddict_next, depending on charset type
	cleaned timeout code in pwdgen_next() a bit
	wcr src: Total: lines 1997, words 7744, chars 56138
	351 tests

=back

=head2 2003-02-01 (v2.13 build 1)

=over 2

=item added

	pwddict.c - pwddict_mutate(), lc(), uc()
	00_compile.t to compile testworker automagically before running tests

=back

=head2 2003-01-21 (v2.12)

=over 2

=item added

	SIGNATURE and doc about it
	310 tests

=back

=head2 2002-11-31 (v2.12)

=over 2

=item added

	a lot of doc in the README file

=back

=head2 2002-10-29

=over 2

=item added

	Added licencing information on top of all source files.
	Added some general introduction in README.

=item fixed

	The password counter ("Did ... passwords in ... seconds") was wrong
	added 3 tests for the password counter correctly handling overflows
	(the downside is one incr., one cmp and one jump more for each pwd)
	310 tests

=back

=head2 2002-10-23

=over 2

=item fixed

	removed unnecc. timeout parameters in sample workers
	documented reading of targetfiles (instead of target keys)
	documented overflow parameter's values in ssPWD struct

=back

=head2 2002-08-22 (v2.11)

=over 2

=item fixed

	some spellings, TODO file
	print BUFSIZE, not 4090 in error msg

=back

=head2 2002-07-07

=over 2

=item fixed

	LICENSE is now BSD, prepared for release

=back

=head2 2002-05-22

=over 2

=item added

	more tests to make sure all boundary conditions are met
	speedup: pwd gen uses less cycles

=item fixed

	307 tests

=back

=head2 2002-05-15

=over 2

=item fixed

	fixed README to reflect newest stand
	made compile script copy pwdtest over to testsuite
	pwd generator can overflow/extend GROUPED charsets properly
	support for reading in charsets instead of compiled-in
	243 tests

=back

=head2 2002-03-15 (v2.10)

=over 2

=item added

	separated workerframe from main version

=item fixed

	192 tests

=back

=head2 2002-03-13

=over 2

=item fixed

	charsets.tpl to correctly generate grouped sets
	added tests for grouped charsets via pwdtest and worker.t
	192 tests

=back

=head1 AUTHOR

(c) Bundesamt fuer Sicherheit in der Informationstechnik 1998-2005

DiCoP is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License version 2 as published by the Free
Software Foundation.

See the file LICENSE or L<http://www.bsi.de/> for more information.

=cut

