Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge git://github.com/magnumripper/JohnTheRipper into magnum-jumbo

  • Loading branch information...
commit 295dc201890a8747539cc6e60d6366944e1ae518 2 parents 7049e2c + aaff301
@claudioandre claudioandre authored
Showing with 2,447 additions and 183 deletions.
  1. +302 −2 doc/CHANGES-jumbo.git
  2. +17 −0 doc/CREDITS-jumbo
  3. +4 −4 doc/ENCODINGS
  4. +5 −0 doc/OPTIONS
  5. +56 −3 doc/README-CUDA
  6. +69 −7 doc/{README.opencl → README-OPENCL}
  7. 0  doc/dynamic_history.txt
  8. +843 −0 run/sshng2john.py
  9. +5 −0 src/MSCHAPv2_fmt_plug.c
  10. +2 −2 src/Makefile
  11. +22 −2 src/common-opencl.c
  12. +1 −1  src/common_opencl_pbkdf2.c
  13. +1 −0  src/cuda/cryptmd5.cu
  14. +1 −0  src/cuda/cryptsha256.cu
  15. +1 −0  src/cuda/cryptsha512.cu
  16. +12 −0 src/cuda/cuda_common.cu
  17. +1 −0  src/cuda/mscash.cu
  18. +1 −0  src/cuda/mscash2.cu
  19. +1 −0  src/cuda/phpass.cu
  20. +1 −0  src/cuda/pwsafe.cu
  21. +4 −0 src/cuda/rawsha256.cu
  22. +2 −0  src/cuda/rawsha512.cu
  23. +1 −0  src/cuda/wpapsk.cu
  24. +2 −0  src/cuda/xsha512.cu
  25. +2 −2 src/cuda_common.h
  26. +0 −1  src/cuda_cryptmd5_fmt.c
  27. +455 −3 src/encoding_data.h
  28. +8 −2 src/john.c
  29. +16 −18 src/opencl/gpg_kernel.cl
  30. +7 −9 src/opencl/odf_kernel.cl
  31. +3 −3 src/opencl_agilekeychain_fmt.c
  32. +3 −3 src/opencl_cryptmd5_fmt.c
  33. +3 −3 src/opencl_dmg_fmt.c
  34. +18 −7 src/opencl_encfs_fmt.c
  35. +3 −3 src/opencl_gpg_fmt.c
  36. +3 −3 src/opencl_keychain_fmt.c
  37. +66 −61 src/opencl_nsldaps_fmt.c
  38. +3 −3 src/opencl_odf_fmt.c
  39. +3 −3 src/opencl_phpass_fmt.c
  40. +3 −3 src/opencl_pwsafe_fmt.c
  41. +4 −4 src/opencl_rawsha512_fmt.c
  42. +3 −3 src/opencl_strip_fmt.c
  43. +5 −3 src/opencl_sxc_fmt.c
  44. +3 −3 src/opencl_wpapsk_fmt.c
  45. +5 −5 src/opencl_xsha512_fmt.c
  46. +3 −3 src/opencl_zip_fmt.c
  47. +1 −7 src/options.c
  48. +3 −0  src/options.h
  49. +57 −0 src/rules.c
  50. +361 −0 src/ssh_ng_fmt_plug.c
  51. +52 −7 src/unicode.c
View
304 doc/CHANGES-jumbo.git
@@ -1,3 +1,302 @@
+The following changes were made between 1.7.9-jumbo-7 and 1.7.9-jumbo-8:
+
+magnum (120):
+ Use maxlen in dumb16 and dumb32 external modes.
+ Make sunmd5 check FMT_MAIN_VERSION, so the same file works for non-bleeding as well as bleeding. Also fix some Linux warnings. FIXME: This version still fails self-test under OMP. FIXME: Jim and Simon, add your license statements!
+ Fix new sunmd5 format struct so it works with bleeding too. Also fix the ALGORITHM_NAME enumeration to new-style. This now says it's using SSE2 but apparently it is not, on my gear.
+ Sunmd5: fix SSE2 for 64-bit
+ wordlist.c: fix segfault reported in http://www.openwall.com/lists/john-users/2012/08/01/5
+ Define MMX_COEF in x86-64.h and drop the workarounds in SSE2 formats that were needed cause it was missing.
+ Use clear_keys() for SSE2 buffer cleaning in a couple of formats, instead of doing it in set_key() if index == 0.
+ Backports from john-1.7.9.6-c6.
+ Replicate Vlatko's fix in 487c44ce to build_kernel_from_binary() in magnum-jumbo and downstream.
+ pass_gen.pl sync between branches
+ wow_srp: Use the OpenSSL version, revert the -lgmp from Makefile. TODO: put some (default commented out) HAVE_GMP stuff in Makefile.
+ Add HAVE_GMP to Makefile, default commented out
+ .gitignore update
+ sed -ri 's/\bfree\(/MEM_FREE(/g' *[ch] (and then selectively commit most changes)
+ Bugfix for previous commit
+ Limit External:Strip to 16 characters even if cipher_limit is higher.
+ Do not use cipher_limit directly in External:KnownForce, because the length is fixed - ie. no shorter lengths will be tried!
+ Change a couple more ISO-8859-1 files (not in -fixes branch) to UTF-8
+ mssql12: drop obsolete comments about SSE2. Also drop the UTF-8-specific version of set_key() as we're not working against vector buffers anyway and enc_to_utf16() can handle utf-8 too.
+ External:Subsets: Revert defaulting to cipher_limit because it's often too long. Instead, use cipher_limit to cap the used length.
+ RAR: #ifdef galore
+ dmg_fmt: #undef HTONL before defining it (warnings seen on OSX)
+ mssql12: Unicode fixes
+ Oldoffice: Proper Unicode support
+ Make opencl_DES_fmt.c compatible with bleeding's format struct
+ des-opencl: Use .h files for OpenCL includes (.c did not work on OSX)
+ Fix a benign warning in OSX
+ The new Kerberos formats depend on Kerberos 5 libs and headers. This patch make them non-default - you have to uncomment HAVE_KRB5 to build them.
+ Make new Kerberos formats' structs forward compatible
+ Use ASCII copyright signs
+ Makefile: change a couple of hard-coded gcc to $(CC).
+ Update some build targets with custom CFLAGS and LDFLAGS
+ sunmd5: bugfix and miniscule optimization
+ EncFS: Backport some fixes that was committed only to bleeding-jumbo
+ OSX: Only link against krb5 if HAVE_KRB5 is defined.
+ Office2john: Support multiple files in one run.
+ Office format simplifications. Avoid a lot of alloc/free and memcpy/memmove even though they did not hit performance much.
+ Office: regression fixes for last patch
+ Office: Get rid of the rest of malloc()'s + some other misc fixes.
+ Office: Move Unicode conversion to set_key() so we don't have to convert the same password several times. Add all sample hashes we've got, as test vectors.
+ OldOffice: Move Unicode conversion to set_key() so we don't have to convert the same password several times.
+ Ooops. Fix pbkdf2-sha512 format struct for bleeding.
+ Special wordlist rule for cracking old office documents truncated at 15 characters.
+ If ran under MPI though not built for it, complain!
+ Improve the "OldOffice" wordlist rule
+ Show SHA-1 in oldoffice FORMAT_NAME
+ OldOffice: Inner-loop optimisations and much smaller memory footprint per hash. Unfortunately the gain was smaller than I hoped for, but it may be better IRL.
+ Office: Very minor optimizations. OldOffice: For "salt-only" formats (non-hashes), BINARY_SIZE should be 0
+ RAR: gws_test() made static.
+ New format office-opencl. This first version handles only Office 2007 and a max plaintext length of 19.
+ Office-opencl: Fix some compiler warnings.
+ Office: Fix some over-long test vectors that was due to a bug in office2john.
+ Fix format structs for new formats so they are compatible with bleeding
+ .gitignore update
+ Office-opencl SALT_LENGTH bugfix
+ Office (CPU version), optimizations for 2007/2010, 2x boost!
+ Re-introduce APPLE in opencl_device_info.h
+ Office-opencl renamed to office2007-opencl, and office2010-opencl added. Both use split kernels, so durations should not exceed 200ms (by far).
+ hmac-sha1 bug fix: Certain optimisations did not take SHA_BUF_SIZ in account. Very few builds pick the old SHA-1 implementation that uses 320 bytes instead of the now normal 64 bytes but native OSX llvm now does, so triggered the bug.
+ Add a version of our shared find_best_workgroup() that supports vectorized formats.
+ Bugfix for d708f98 (find_best_workgroup_vector())
+ Revert recent find_best_workgroup() changes; they were no-ops. Also remove some older no-op code.
+ Merge 1.7.9-jumbo-7 as released, and bump the "unstable" version string accordingly
+ OpenCL: Read the LWS environment variable in the shared find_best function.
+ Fixes for new opencl_device_info.h names
+ Add "Rules:None". I have added this as temporary a dozen times. It's useful in some cases for Single mode and it really doesn't harm having it in place.
+ Office OpenCL formats: Run vectorized on some platforms (including CPU).
+ RAR kernel rearrangement, preparing for a split. This alone made for some boost.
+ OpenCL Office formats: Mitigate GPU hogging with much shorter kernel durations. Barely any performance impact but much better desktop response during cracking.
+ Add some license stuff to RAR format, just in case. The wording was already present in clamav's unrar sources.
+ Forward-compatible format structs for sha256crypt-opencl and postgreSQL
+ RAR OpenCL: Finally, split kernel into quicker subkernels. Lousy speed so far but passes self-tests. We use a 64x buffer, and run a non-destructive SHA-1 over it instead of copying and flogging bits around all the time. This eats loads of memory but we are forced to use global memory anyway after splitting.
+ RAR OpenCL: Use byte-addressed stores in some cases, if supported.
+ RAR OpenCL: Back to 1x buffer and use private memory in inner loop. Limit sub-kernel duration to 200 ms for GCN. Use local memory on nvidia.
+ RAR: Tweak GWS enumeration. Also a workaround to get the OpenCL kernel running on Mac MBPr with GT 650M. This does not make any sense at all, but it works. It is clearly a bug in OSX.
+ Office 2013 OpenCL format added with fair performance given the task. Currently fails self-test on HD7970 for no apparent reason.
+ Office 2013-OpenCL: Vectorize (but only for CPU).
+ Drop some bogus logic from Office OpenCL formats. I confused local work size with global ditto.
+ Office OpenCL formats: Add benchmark comments (iterations count)
+ Add option --status-every=N
+ Add a comment about Kepler (sm_30) in Makefile
+ Unify CUDA and OpenCL "human_format" functions.
+ RAR: Fix bugs with OpenCL profiling. In gws_test(), we did not take a changed value of HASH_LOOPS into account. Worse, in crypt_all() we had the global profilingEvent sent with clEnqueueNDRangeKernel() even though we did not use it. This lead to a memory leak and a slow but certain death.
+ Office OpenCL formats: Remove unused code for shared find_best_workgroup()
+ Fix an inner loop memory leak in most (22 of 24) OpenCL formats that use the shared find_best_workgroup() function. NOTE: opencl_cryptsha256_fmt.c and opencl_cryptsha512_fmt.c are NOT fixed here. They need some other fix, for example reverting to private functions or a fixed (semi-fixed) value.
+ Revert patch 4f12506 and implement a cleaner solution: We now use a pointer for profileEvent, and it's set to NULL after find_best_workgroup() so no more events will be created.
+ Office OpenCL formats: Now that I got profiling straight, use the shared find_best_workgroup() for a little boost on some platforms.
+ Add missing FMT_OMP to Office OpenCL formats.
+ Another tiny (and benign) cl_event memory leak fixed in common-opencl.c
+ OpenVMS format: forward-compatible format struct.
+ RAR: Prepare to use the shared find_best_workgroup() function - but don't. For some reason, it returns a suboptimal figure. Also, it takes time.
+ Office OpenCL formats: Revert to fixed LWS yet again. Auto-conf is simply too slow and unreliable.
+ --list=cuda-devices: show number of SP, if known.
+ Some added information in doc/BUGS - that might be candidate for moving to some other documentation because it's not really about bugs.
+ common-opencl.c: Support split kernels with opencl_find_best_workgroup(). RAR & Office OpenCL formats: Implement the above but still, use hard-coded figures.
+ RAR & Office OpenCL: Enumerate LWS if explicitly asked to.
+ common-opencl.c: Add a way to pass parameters when building kernel. RAR & Office OpenCL formats: Use this (more to come).
+ Make RAR (OpenCL) much more responsive, doing less per kernel call. Print Office kernel durations while benchmarking (GWS=0).
+ Office2013-opencl: Fix minor bug in enumeration.
+ RAR: GETCHAR/PUTCHAR macro optimisations (vs. arch)
+ RAR: Tweaks.
+ Silly bug: The new --status-every option clashed with the original --status option. Rename the former to --progress-every.
+ RAR: Fix bugs in auto-tuning to device. Office2013: Less X hogging.
+ NETLM/NTLM/v2 formats: Fix a signed vs unsigned char bug, and make case shifting UTF-8 aware (as opposed to just codepage-aware). Also bump some limits to accommodate for UTF-8 encoded user and domain names.
+ common-opencl.c: Add get_global_memory_size(), and tweak find_best_workgroup().
+ Add NTLMv2-opencl. Well behaved but I/O-bound. Vectorized on CPU, passes Test Suite. Full Unicode support.
+ NTLMv2-opencl: Change hard-coded challenge length figures to SALT_SIZE_MAX and fix a bug in salt_hash() (our salt format is different from the old).
+ NTLMv2-opencl: Only run vectorized on CPUs.
+ Drop an erroneous linefeed from --list=hidden-options.
+ Fix for common_opencl_pbkdf2.c that hid the actual error output on "SYNC FAILED"
+ Fix a common mispeling
+ Add missing error handling in all CUDA kernels. Also add some information in README-CUDA about too high THREADS settings as well as a specific hint from HANDLE_ERROR for the "too many resources requested" error. Finally, add some missing stuff in Makefile so a header file change will cause a rebuild of wpapsk-cuda or pwsafe-cuda.
+ ssha-opencl: Tweak the device auto-tuning, fixing several problems.
+ Bugfix in md5crypt-cuda. If we clear any_cracked we must also clean the outbuffer.
+ ssha-opencl: Further tweaks for work size selections
+ encfs-opencl: Make it possible to specify GWS. LWS can already be forced due to the shared find_best_workgroup function honoring it.
+ Respect "iterations" parameter in odf (sxc) PBKDF2 kernel
+ For some reason the OpenCL kernel for OpenPGP/GnuPG was using unsigned long for 32-bit integers. Fixing this made for a 20% boost on Tahiti but it did not help the nvidia, which fails with the cryptic message "Module-scoped variables in .local state space are not allowed with ABI". Maybe that is just another driver bug.
+ Some added information in GPU docs, regarding temperatures, watchdogs etc.
+ Rename doc/README.opencl to README-OPENCL for consistency with the CUDA docs.
+
+Dhiru Kholia (111):
+ Integrate psk-crack (from ike-scan) into john.
+ Add support for cracking Nuked-Klan CMS hashes.
+ Fix build.
+ Bump LINE_BUFFER_SIZE. Needed for pfx format.
+ OpenCL implementation of Keychain format
+ Keychain format is now 2.4x faster on CPU and scales almost linearly. Thanks to Lukas!
+ Fix keychain format crash due to stack smashing
+ Add support for cracking 1Password Agile Keychain files
+ Reduce false positives in agilekeychain format
+ OpenCL implementation of Agile Keychain format
+ integrate keychain2john program with john
+ Add support for cracking ODF 1.2 AES encrypted documents
+ Update FORMAT_NAME in ODF format
+ Remove my hacks from ODF format
+ misc. minor fixes
+ Add AES-256 encrypted ZIP file test vector.
+ OpenCL implementation of ZIP AES format
+ Do not build Truecrypt unless OpenSSL >= 1.0.1
+ Add support for cracking M$ Outlook's PST files
+ GNOME Keyring cracker patch for JtR
+ Add keyring2john program (for now it is standalone).
+ Add support for cracking Office 97-2003 encrypted files
+ EncFS cracker patch for JtR
+ OpenCL implementation of EncFS cracker
+ OpenCL implementation of ODF format
+ SXC cracker patch for JtR
+ OpenCL implementation of SXC format
+ Respect "iterations" parameter in PBKDF2 code
+ Respect "iterations" parameter in keychain PBKDF2 kernel
+ add test vectors from CMIYC 2012
+ add test vectors from CMIYC 2012
+ add test vectors from CMIYC 2012
+ pdf2john fixes by JimF
+ Add OMP support in PDF format.
+ Detect PDF files using AES encryption and bail out early
+ Fix bug in PDF format exposed by a new test vector (added to pdfdump)
+ Detect unsupported PDF files and bail out
+ Implement npdf format which will eventually replace the existing pdf format (once npdf2john is committed).
+ Remove ":" from npdf test vectors
+ Make npdf format compatible with core changes
+ Use our own SHA2 implementation
+ Fix breakage in keychain2john program
+ Add support for cracking PuTTY private keys
+ Rename ppk format to putty
+ Use our faster HMAC-SHA1 implementation
+ Add support for cracking OpenPGP / GnuPG private key files
+ Add support for more hashing algorithms
+ add test vectors from CMIYC 2012
+ OpenCL implementation of GPG format
+ Make NVIDIA OpenCL compiler happy
+ Integrate gpg2john with john
+ Add documentation for gpg format
+ Add OMP support in gpg-opencl format
+ Add support for cracking MS SQL 2012 hashes
+ Add support for cracking MySQL network authentication hashes
+ Make mysqlna format compatible with core changes
+ simplify DMG format
+ fix detection of plain DMG files
+ add more test vectors
+ Add dmg2john to .gitignore
+ Add OMP support in dmg format
+ OpenCL implementation of DMG format
+ Begin adding Office RC4 CryptoAPI Encryption support
+ Office RC4 CryptoAPI Encryption support is done for doc files
+ Office RC4 CryptoAPI Encryption support is done for ppt files
+ Office RC4 CryptoAPI Encryption support is done for xls files
+ Fix some correctness issues
+ Add support for cracking Office 2013 files
+ Add support for cracking STRIP Password Manager databases
+ ml2john.py extracts Mountain Lion hashes
+ fix permissions
+ fix shebang line
+ Fix OMP support in new KRB formats
+ Fix krb5-23 format on OSX
+ Fix krb5-18 format on OSX
+ Make Pyflakes happy
+ OMP build fixes for EncFS format
+ Add support for cracking GRUB2 and OS X 10.8 hashes. Coded by Lukas.
+ Remove my hacks from VNC format
+ Update for Office 2013
+ OpenCL implementation of STRIP format
+ Improve error handling
+ Add support for parsing newer Office files to office2john.py
+ Support cracking of iSCSI CHAP authentication hashes
+ dos2unix on chap_fmt_plug.c
+ Update OleFileIO_PL code
+ Use only filename instead of full path
+ Fix a correctness issue in Office format
+ Fix warnings and indentation in FGT format
+ Fix FGT format crash when built using linux-x86-64-clang-debug target
+ Add another test vector in CHAP format
+ Fix memory leaks in EncFS formats
+ Remove dead assignments
+ Fix license issues
+ Begin adding OMP-support to hmac formats
+ Add OMP support to hmac formats
+ Add support for cracking Oracle O5LOGON protocol hashes
+ PPC fixes
+ add more test vectors in o5logon format
+ Add support for PostgreSQL MD5 challenge-response cracking
+ Add usage instructions in VNC format
+ Speed-up o5logon format.
+ Remove my hacks from o5logon format
+ Revert "Remove my hacks from o5logon format"
+ Fix build when using ICC
+ Integrate OpenVMS support 2.4 patch by David Jones
+ Pull changes from v2 version of VMS patch
+ New version of office2john that rips keywords from document metadata and puts them in GECOS field for use by Single mode. Also bump some figures in params.h to cope with more words in said field.
+ Fix issue #100 gpg-opencl does not work
+ Fix static build on Owl-current systems
+ Add some more test vectors
+
+JimF (24):
+ Add our own SHA-2, enabling 19 new formats for users stuck with OpenSSL 0.9.7. OpenSSL or not, boost sha256crypt with 10-20%.
+ Fix radmin format under Windows.
+ Alignment fixes SHA2 on Sparc
+ Handle CommonCrypt in our SHA-2
+ CommonCrypto fix in sha256crypt
+ JtR-bleed-align-macro-fix-1.diff
+ JtR-Bleed-make-generic-unaligned.diff
+ JtR-New-Dynamic-35-36-SHA-types.diff
+ ike-crack.h: use our local stdint.h instead of global
+ JtR-MAG-UNSTABLE-ONLY-Dynamic-sha256-addition.diff
+ Updated dynamic adding sha2 formats, and GOST, also made a thin format formspring to do regen-salts type 6
+ Dynamic name change (for display), and adding config option and command line switch to cause dynamic to always use raw hashes
+ Missed this file in the dynamic raw-hashes-allways-valid patch
+ john-1.7.9.5-c6-sunmd5-v1.patch
+ New, SSE2 capable sunmd5
+ sunmd5 fixed for mmx, sunmd5 added to pass_gen.pl
+ Updated sunmd5 and added a couple of optimizations. Added finer granularity memory dumping to memory.c/.h
+ many changes I had staged. many were performance changes, some were porting changes. dynamic is now also updated. Also the POC wow_srp format added
+ Added OMP, removed a few compile warnings, depending upon compile conditions, oSSL/GMP builds
+ GMP fix for 64 bit
+ changes to dynamic, adding new methods to give more flexability to larger formats, multiple output types, upon rehashing. Also updated documentation
+ Portability issues fixed
+ stack overwrite bug fixed
+ added JtR tool to_dyna to the build. This tool converts hash:salt or salt:hash into proper dyna format, converting salt to $HEX$ if needed
+
+Frank Dittrich (4):
+ Silence -Wpointer-sign warnings in hmacSHA*_fmt_plug.c, take 2
+ Add --help option to john (prints usage summary)
+ Define new [List.External:Repeats_*] sections
+ New external mode variable "maxlen"
+
+Solar (3):
+ sunmd5: minor fixes
+ sunmd5: Get rid of modulo
+ Sunmd5: Eliminate some more uses of sizeof(string). Also replace one use of MAX_KEYS_PER_CRYPT with count - should help with single crack mode.
+
+Sam Novak (1):
+ Fix for sunmd5 for non-intel hardware.
+
+Alain Espinosa (1):
+ Truecrypt format as posted to www.openwall.com/lists/john-users/2012/07/18/3. Make target for truecrypt_volume2john is missing.
+
+Lukas Odzioba (1):
+ Make Truecrypt formats non-plugin and only build for OpenSSL >= 1.0.0
+
+Alexander Cherepanov (1):
+ sunmd5 coinflip speedup
+
+Camille Mougey (1):
+ New formats: KRB5-18 and KRB5-23
+
+Linus Lüssing (1):
+ MSCHAPv2: Add support for freeradius-wep-patch challenge/response format
+
+Mat G (1):
+ New format: Fortigate (FortiOS)
+
+bartavelle (1):
+ sunmd5.hack.diff
+
+
The following changes were made between 1.7.9-jumbo-6 and 1.7.9-jumbo-7:
magnum (109):
@@ -209,7 +508,7 @@ Dhiru Kholia (20):
Fix build.
Drop "inline" from rar malloc stuff. It was probably done wrong.
-Solar (8):
+Solar (9):
hccap2john fixes
RAdmin, SIP speedup
Optimized mscash2-opencl
@@ -218,9 +517,10 @@ Solar (8):
john-sha1-r3-bitselect.diff
wordlist.c truncation bugfix (from contest edition)
pwsafe-cuda: Bugfix (w[14] init) and optimisations
+ Final Jumbo-7 changes.
Lukas Odzioba (5):
- Jihaa, Jester's dead
+ Fix a multitude of declaration-after-statement warnings.
cudasha256speedpatchv3.diff
wpapsk-valid_fix.diff
Fixes for CUDA mscash formats.
View
17 doc/CREDITS-jumbo
@@ -1,3 +1,20 @@
+The following people have contributed patches between 1.7.9-jumbo-7 and jumbo-8:
+
+ Alain Espinosa
+ Alexander Cherepanov
+ bartavelle (Simon Marechal)
+ Camille Mougey
+ Dhiru Kholia
+ Frank Dittrich
+ JimF
+ Linus Lüssing
+ Lukas Odzioba
+ magnum
+ Mat G
+ Sam Novak
+ Solar
+
+
The following people have contributed patches between 1.7.9-jumbo-6 and jumbo-7:
Claudio André
View
8 doc/ENCODINGS
@@ -4,10 +4,10 @@ UTF-8" (or CP1252 etc). It does NOT mean you can feed John with eg. a UTF-8
encoded wordlist when cracking LM. It DOES make John recognise national vowels,
lower or upper case characters, etc. when specifying a codepage.
-Currently supported encodings: utf-8, iso-8859-1 (or ansi), iso-8859-7,
-iso-8859-15, koi8-r, cp437, cp737, cp850, cp858, cp866, cp1251, cp1252 and
-cp1253. New encodings can be added with ease, using automated tools that rely
-on the Unicode Database (see Openwall wiki).
+Currently supported encodings: utf-8, iso-8859-1 (or ansi), iso-8859-2,
+iso-8859-7, iso-8859-15, koi8-r, cp437, cp737, cp850, cp852, cp858, cp866,
+cp1250, cp1251, cp1252 and cp1253. New encodings can be added with ease, using
+automated tools that rely on the Unicode Database (see Openwall wiki).
Example usage:
View
5 doc/OPTIONS
@@ -269,6 +269,11 @@ running in --nolog mode may be used.
This will automagically emit a status line at every cracked password. This is
mostly for testing.
+--progress-every=N emit a status line every N seconds
+
+This will automagically emit a status line every N seconds. This is mostly
+for testing.
+
--mkpc=N force min/max keys per crypt to N
This option is for certain kinds of testing and is not mentioned in the usage
View
59 doc/README-CUDA
@@ -1,4 +1,13 @@
README CUDA:
+
+CUDA support is tested under Linux and OSX. Recent Linux distributions (eg.
+Ubuntu 12.10) have OpenCL and CUDA drivers included. OSX will support OpenCL
+natively but for using CUDA you need to download drivers from nvidia web site.
+
+If your device supports CUDA it very likely also supports OpenCL. The -cuda
+build targets will support CUDA only, while the -gpu build targets support
+both OpenCL and CUDA (thus the latter is recommended for most users).
+
If you have problems with JtR CUDA support:
Please check that paths to yours CUDA library are proper in Makefile:
CUDAPATH = /usr/local/cuda/lib
@@ -7,9 +16,17 @@ If you have problems with JtR CUDA support:
Please check that yours LD_LIBRARY_PATH contains cuda lib path
Performance issues:
- If you have got Fermi or newer card change "-arch sm_10" to "-arch sm_20" in the NVCC_FLAGS (Makefile). If you have Kepler or newer, you can experiment with using "-arch sm_30" as well.
- Default THREADS and BLOCKS settings might not be optimal.
- To get better performance you can experiment with THREADS and BLOCKS macros defined for each format in cuda*.h file.
+ If you have got Fermi or newer card change "-arch sm_10" to "-arch sm_20" in
+ the NVCC_FLAGS (Makefile). If you have Kepler or newer, you can experiment
+ with using "-arch sm_30" as well.
+
+ Default THREADS and BLOCKS settings might not be optimal. For some weaker
+ cards, THREADS may even be too high and this will show up as eg. "too many
+ resources requested for launch in cryptmd5.cu at line 241".
+
+ To get better performance you can experiment with THREADS and BLOCKS macros
+ defined for each format in cuda*.h file.
+
For MSCash2[1]:
CARD NAME BLOCKS THREADS SM RESULT
GTX460 14 128 20 14194 c/s
@@ -26,6 +43,42 @@ Performance issues:
CARD NAME BLOCKS THREADS SM RESULT
GTX570 7680 128 10 27561K c/s
+
+Watchdog Timer:
+ If your GPU is also your active display device, the display driver enables a
+ watchdog timer by default, killing any kernel that runs for more than about
+ five seconds. You will normally not get a proper error message, just some
+ kind of failure after five seconds or more. Our goal is to split such kernels
+ into subkernels with shorter durations but in the meantime (and especially if
+ running slow kernels on weak devices) you might need to disable this
+ watchdog. You can check this setting using "--list=cuda-devices":
+
+ CUDA Device #0
+ Name: GeForce GT 650M
+ Compute capability: sm_30
+ Number of stream processors: 384 (2 x 192)
+ Clock rate: 878 Mhz
+ Total global memory: 1.0 GB
+ Total shared memory per block: 48.0 KB
+ Total constant memory: 64.0 KB
+ Kernel execution timeout: No <-- disabled watchdog
+ Concurrent copy and execution: Yes
+ Concurrent kernels support: Yes
+ Warp size: 32
+
+ We are currently not aware of any way to disable this watchdog under OSX. Under
+ Linux, you can disable it by adding the 'Option "Interactive"' line to
+ /etc/X11/xorg.conf:
+
+ Section "Device"
+ Identifier "Device0"
+ Driver "nvidia"
+ VendorName "NVIDIA Corporation"
+ Option "Interactive" "False"
+ EndSection
+
+
+
You can contact us at
[1] lukas[dot]odzioba[at]gmail[dot]com
[2] qqlddg[at]gmail[dot]com
View
76 doc/README.opencl → doc/README-OPENCL
@@ -10,13 +10,19 @@ N.B. DON'T use X11 opensource drivers provided by your distribution,
either install fglrx or nvidia dkms package or go directly with the
ones provided by nvidia and ati.
-This code is still highly experimental, therefore we suggest you
-to try at your own risk.
-GPU should not get overheated due to some limitation from the hardware
-however keep checking your temperature .
+You can also use OpenCL with CPU, mostly useful if you have several
+(or loads of) cores. This sometimes outperforms the CPU-only formats
+due to better scaling than OMP, or due to vectorizing. See Intel's
+and AMD's web sites for drivers. Note that an Intel driver does
+support AMD CPU's and vice versa.
-This code has been tested on Linux, any chance it will work as it is
-under other Operating System is due to a luck factor :-)
+This code is still experimental, try at your own risk. GPU should not
+get overheated due to some protection in the hardware, however keep
+an eye on temperatures (use "aticonfig -odgt" for AMD cards, or
+"nvidia-smi" for nvidia cards).
+
+This code has been tested on Linux and OSX, see doc/BUGS for known
+issues.
OpenCL patches have been lately introduced to add GPU support to john;
unfortunately, due to opencl design they shine when you have million
@@ -53,7 +59,6 @@ if something is still wrong (but it shouldn't) send
an email to john-users@lists.openwall.com for help.
-
====================
USAGE:
====================
@@ -101,6 +106,7 @@ LWS and GWS are not yet in every opencl format john is using.
to set them to properly values, if in doubt just use the defaults
and unset them
+
====================
Optimization:
====================
@@ -115,6 +121,7 @@ a good idea to set up PLAINTEXT_LENGTH to a lower value than
- GWS should always be the possible product of LWS: you should always
be able to divide GWS / LWS and get an integer number
+
====================
Supported formats:
====================
@@ -140,6 +147,61 @@ the following hashes:
- Raw SHA-256
- Raw SHA-512
- WPA-PSK
+- FIXME: and SEVERAL more added in this version of Jumbo.
+
+
+=================
+Watchdog Timer:
+=================
+
+If your GPU is also your active display device, a watchdog timer is enabled
+by the nvidia driver by default, killing any kernel that runs for more than
+about five seconds. You will normally not get a proper error message, just
+some kind of failure after five seconds or more, like:
+
+ OpenCL error (CL_INVALID_COMMAND_QUEUE) in file (opencl_encfs_fmt.c) (...)
+
+Our goal is to split such kernels into subkernels with shorter durations but
+in the meantime (and especially if running slow kernels on weak devices) you
+might need to disable this watchdog. For nvidia cards, you can check this
+setting using "--list=opencl-devices". Example output:
+
+ Platform version: OpenCL 1.1 CUDA 4.2.1
+ Device #0 name: GeForce GT 650M
+ Device vendor: NVIDIA Corporation
+ Device type: GPU (LE)
+ Device version: OpenCL 1.1 CUDA
+ Driver version: 304.51
+ Global Memory: 1023.10 MB
+ Global Memory Cache: 32.0 KB
+ Local Memory: 48.0 KB (Local)
+ Max clock (MHz) : 900
+ Max Work Group Size: 1024
+ Parallel compute cores: 2
+ Stream processors: 384 (2 x 192)
+ Warp size: 32
+ Max. GPRs/work-group: 65536
+ Compute capability: 3.0 (sm_30)
+ Kernel exec. timeout: yes <-- enabled watchdog
+
+This particular output is not always available under OSX but you can get the
+information using "--list=cuda-devices" instead, see doc/README-CUDA. We are
+currently not aware of any way to disable this watchdog under OSX. Under
+Linux (and possibly other systems using X), you can disable it for nvidia
+cards by adding the 'Option "Interactive"' line to /etc/X11/xorg.conf:
+
+ Section "Device"
+ Identifier "Device0"
+ Driver "nvidia"
+ VendorName "NVIDIA Corporation"
+ Option "Interactive" "False"
+ EndSection
+
+At this time we are not aware of any way to check or change this for AMD cards.
+What we do know is that some old AMD drivers will crash after repeated runs of
+as short durations as 200 ms, necessating a reboot. If this happens, just
+upgrade your driver.
+
============================================================
Following is the verbatim original content of this file:
View
0  doc/dynamic_history.txt 100755 → 100644
File mode changed
View
843 run/sshng2john.py
@@ -0,0 +1,843 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2012, Dhiru Kholia <dhiru@openwall.com>
+#
+# Modified for JtR
+#
+# Copyright (C) 2011 Jeff Forcier <jeff@bitprophet.org>
+#
+# This file is part of ssh.
+#
+# 'ssh' is free software; you can redistribute it and/or modify it under the
+# terms of the GNU Lesser General Public License as published by the Free
+# Software Foundation; either version 2.1 of the License, or (at your option)
+# any later version.
+#
+# 'ssh' is distrubuted in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with 'ssh'; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+import traceback
+import binascii
+import base64
+import StringIO
+import sys
+from hashlib import md5 as MD5
+
+limited = False
+
+try:
+ from Crypto.Cipher import DES3, AES
+except ImportError:
+ print >> sys.stderr, "PyCrypto is missing in your Python installation, %s is operating is limited features mode!" % sys.argv[0]
+ limited = True
+
+
+class BERException (Exception):
+ pass
+
+
+class BER(object):
+ """
+ Robey's tiny little attempt at a BER decoder.
+ """
+
+ def __init__(self, content=''):
+ self.content = content
+ self.idx = 0
+
+ def __str__(self):
+ return self.content
+
+ def __repr__(self):
+ return 'BER(\'' + repr(self.content) + '\')'
+
+ def decode(self):
+ return self.decode_next()
+
+ def decode_next(self):
+ if self.idx >= len(self.content):
+ return None
+ ident = ord(self.content[self.idx])
+ self.idx += 1
+ if (ident & 31) == 31:
+ # identifier > 30
+ ident = 0
+ while self.idx < len(self.content):
+ t = ord(self.content[self.idx])
+ self.idx += 1
+ ident = (ident << 7) | (t & 0x7f)
+ if not (t & 0x80):
+ break
+ if self.idx >= len(self.content):
+ return None
+ # now fetch length
+ size = ord(self.content[self.idx])
+ self.idx += 1
+ if size & 0x80:
+ # more complimicated...
+ # FIXME: theoretically should handle indefinite-length (0x80)
+ t = size & 0x7f
+ if self.idx + t > len(self.content):
+ return None
+ size = inflate_long(self.content[self.idx: self.idx + t], True)
+ self.idx += t
+ if self.idx + size > len(self.content):
+ # can't fit
+ return None
+ data = self.content[self.idx: self.idx + size]
+ self.idx += size
+ # now switch on id
+ if ident == 0x30:
+ # sequence
+ return self.decode_sequence(data)
+ elif ident == 2:
+ # int
+ return inflate_long(data)
+ else:
+ # 1: boolean (00 false, otherwise true)
+ raise BERException('Unknown ber encoding type %d (robey is lazy)' % ident)
+
+ def decode_sequence(data):
+ out = []
+ b = BER(data)
+ while True:
+ x = b.decode_next()
+ if x is None:
+ break
+ out.append(x)
+ return out
+ decode_sequence = staticmethod(decode_sequence)
+
+"""
+Exceptions defined by ssh.
+"""
+
+
+class SSHException (Exception):
+ """
+ Exception raised by failures in SSH2 protocol negotiation or logic errors.
+ """
+ pass
+
+
+class AuthenticationException (SSHException):
+ """
+ Exception raised when authentication failed for some reason. It may be
+ possible to retry with different credentials. (Other classes specify more
+ specific reasons.)
+
+ @since: 1.6
+ """
+ pass
+
+
+class PasswordRequiredException (AuthenticationException):
+ """
+ Exception raised when a password is needed to unlock a private key file.
+ """
+ pass
+
+
+class BadAuthenticationType (AuthenticationException):
+ """
+ Exception raised when an authentication type (like password) is used, but
+ the server isn't allowing that type. (It may only allow public-key, for
+ example.)
+
+ @ivar allowed_types: list of allowed authentication types provided by the
+ server (possible values are: C{"none"}, C{"password"}, and
+ C{"publickey"}).
+ @type allowed_types: list
+
+ @since: 1.1
+ """
+ allowed_types = []
+
+ def __init__(self, explanation, types):
+ AuthenticationException.__init__(self, explanation)
+ self.allowed_types = types
+
+ def __str__(self):
+ return SSHException.__str__(self) + ' (allowed_types=%r)' % self.allowed_types
+
+
+class PartialAuthentication (AuthenticationException):
+ """
+ An internal exception thrown in the case of partial authentication.
+ """
+ allowed_types = []
+
+ def __init__(self, types):
+ AuthenticationException.__init__(self, 'partial authentication')
+ self.allowed_types = types
+
+
+class ChannelException (SSHException):
+ """
+ Exception raised when an attempt to open a new L{Channel} fails.
+
+ @ivar code: the error code returned by the server
+ @type code: int
+
+ @since: 1.6
+ """
+ def __init__(self, code, text):
+ SSHException.__init__(self, text)
+ self.code = code
+
+
+class BadHostKeyException (SSHException):
+ """
+ The host key given by the SSH server did not match what we were expecting.
+
+ @ivar hostname: the hostname of the SSH server
+ @type hostname: str
+ @ivar key: the host key presented by the server
+ @type key: L{PKey}
+ @ivar expected_key: the host key expected
+ @type expected_key: L{PKey}
+
+ @since: 1.6
+ """
+ def __init__(self, hostname, got_key, expected_key):
+ SSHException.__init__(self, 'Host key for server %s does not match!' % hostname)
+ self.hostname = hostname
+ self.key = got_key
+ self.expected_key = expected_key
+
+
+"""
+Useful functions used by the rest of ssh.
+"""
+
+
+from binascii import hexlify, unhexlify
+import sys
+import struct
+
+
+# Change by RogerB - python < 2.3 doesn't have enumerate so we implement it
+if sys.version_info < (2, 3):
+ class enumerate:
+ def __init__(self, sequence):
+ self.sequence = sequence
+
+ def __iter__(self):
+ count = 0
+ for item in self.sequence:
+ yield (count, item)
+ count += 1
+
+
+def inflate_long(s, always_positive=False):
+ "turns a normalized byte string into a long-int (adapted from Crypto.Util.number)"
+ out = 0L
+ negative = 0
+ if not always_positive and (len(s) > 0) and (ord(s[0]) >= 0x80):
+ negative = 1
+ if len(s) % 4:
+ filler = '\x00'
+ if negative:
+ filler = '\xff'
+ s = filler * (4 - len(s) % 4) + s
+ for i in range(0, len(s), 4):
+ out = (out << 32) + struct.unpack('>I', s[i:i + 4])[0]
+ if negative:
+ out -= (1L << (8 * len(s)))
+ return out
+
+
+def deflate_long(n, add_sign_padding=True):
+ "turns a long-int into a normalized byte string (adapted from Crypto.Util.number)"
+ # after much testing, this algorithm was deemed to be the fastest
+ s = ''
+ n = long(n)
+ while (n != 0) and (n != -1):
+ s = struct.pack('>I', n & 0xffffffffL) + s
+ n = n >> 32
+ # strip off leading zeros, FFs
+ for i in enumerate(s):
+ if (n == 0) and (i[1] != '\000'):
+ break
+ if (n == -1) and (i[1] != '\xff'):
+ break
+ else:
+ # degenerate case, n was either 0 or -1
+ i = (0,)
+ if n == 0:
+ s = '\000'
+ else:
+ s = '\xff'
+ s = s[i[0]:]
+ if add_sign_padding:
+ if (n == 0) and (ord(s[0]) >= 0x80):
+ s = '\x00' + s
+ if (n == -1) and (ord(s[0]) < 0x80):
+ s = '\xff' + s
+ return s
+
+
+def format_binary_weird(data):
+ out = ''
+ for i in enumerate(data):
+ out += '%02X' % ord(i[1])
+ if i[0] % 2:
+ out += ' '
+ if i[0] % 16 == 15:
+ out += '\n'
+ return out
+
+
+def format_binary(data, prefix=''):
+ x = 0
+ out = []
+ while len(data) > x + 16:
+ out.append(format_binary_line(data[x:x + 16]))
+ x += 16
+ if x < len(data):
+ out.append(format_binary_line(data[x:]))
+ return [prefix + x for x in out]
+
+
+def format_binary_line(data):
+ left = ' '.join(['%02X' % ord(c) for c in data])
+ right = ''.join([('.%c..' % c)[(ord(c) + 63) // 95] for c in data])
+ return '%-50s %s' % (left, right)
+
+
+def hexify(s):
+ return hexlify(s).upper()
+
+
+def unhexify(s):
+ return unhexlify(s)
+
+
+def safe_string(s):
+ out = ''
+ for c in s:
+ if (ord(c) >= 32) and (ord(c) <= 127):
+ out += c
+ else:
+ out += '%%%02X' % ord(c)
+ return out
+
+# ''.join([['%%%02X' % ord(c), c][(ord(c) >= 32) and (ord(c) <= 127)] for c in s])
+
+
+def bit_length(n):
+ norm = deflate_long(n, 0)
+ hbyte = ord(norm[0])
+ if hbyte == 0:
+ return 1
+ bitlen = len(norm) * 8
+ while not (hbyte & 0x80):
+ hbyte <<= 1
+ bitlen -= 1
+ return bitlen
+
+
+def tb_strings():
+ return ''.join(traceback.format_exception(*sys.exc_info())).split('\n')
+
+
+def generate_key_bytes(hashclass, salt, key, nbytes):
+ """
+ Given a password, passphrase, or other human-source key, scramble it
+ through a secure hash into some keyworthy bytes. This specific algorithm
+ is used for encrypting/decrypting private key files.
+
+ @param hashclass: class from L{Crypto.Hash} that can be used as a secure
+ hashing function (like C{MD5} or C{SHA}).
+ @type hashclass: L{Crypto.Hash}
+ @param salt: data to salt the hash with.
+ @type salt: string
+ @param key: human-entered password or passphrase.
+ @type key: string
+ @param nbytes: number of bytes to generate.
+ @type nbytes: int
+ @return: key data
+ @rtype: string
+ """
+ keydata = ''
+ digest = ''
+ if len(salt) > 8:
+ salt = salt[:8]
+ while nbytes > 0:
+ hash_obj = hashclass()
+ if len(digest) > 0:
+ hash_obj.update(digest)
+ hash_obj.update(key)
+ hash_obj.update(salt)
+ digest = hash_obj.digest()
+ size = min(nbytes, len(digest))
+ keydata += digest[:size]
+ nbytes -= size
+ return keydata
+
+"""
+Common API for all public keys.
+"""
+
+
+class PKey (object):
+ """
+ Base class for public keys.
+ """
+
+ # known encryption types for private key files:
+ _CIPHER_TABLE = {
+ 'AES-128-CBC': {'cipher': AES, 'keysize': 16, 'blocksize': 16, 'mode': AES.MODE_CBC},
+ 'DES-EDE3-CBC': {'cipher': DES3, 'keysize': 24, 'blocksize': 8, 'mode': DES3.MODE_CBC},
+ }
+
+ def __init__(self, msg=None, data=None):
+ """
+ Create a new instance of this public key type. If C{msg} is given,
+ the key's public part(s) will be filled in from the message. If
+ C{data} is given, the key's public part(s) will be filled in from
+ the string.
+
+ @param msg: an optional SSH L{Message} containing a public key of this
+ type.
+ @type msg: L{Message}
+ @param data: an optional string containing a public key of this type
+ @type data: str
+
+ @raise SSHException: if a key cannot be created from the C{data} or
+ C{msg} given, or no key was passed in.
+ """
+ pass
+
+ def __str__(self):
+ """
+ Return a string of an SSH L{Message} made up of the public part(s) of
+ this key. This string is suitable for passing to L{__init__} to
+ re-create the key object later.
+
+ @return: string representation of an SSH key message.
+ @rtype: str
+ """
+ return ''
+
+ def __cmp__(self, other):
+ """
+ Compare this key to another. Returns 0 if this key is equivalent to
+ the given key, or non-0 if they are different. Only the public parts
+ of the key are compared, so a public key will compare equal to its
+ corresponding private key.
+
+ @param other: key to compare to.
+ @type other: L{PKey}
+ @return: 0 if the two keys are equivalent, non-0 otherwise.
+ @rtype: int
+ """
+ hs = hash(self)
+ ho = hash(other)
+ if hs != ho:
+ return cmp(hs, ho)
+ return cmp(str(self), str(other))
+
+ def get_name(self):
+ """
+ Return the name of this private key implementation.
+
+ @return: name of this private key type, in SSH terminology (for
+ example, C{"ssh-rsa"}).
+ @rtype: str
+ """
+ return ''
+
+ def get_bits(self):
+ """
+ Return the number of significant bits in this key. This is useful
+ for judging the relative security of a key.
+
+ @return: bits in the key.
+ @rtype: int
+ """
+ return 0
+
+ def can_sign(self):
+ """
+ Return C{True} if this key has the private part necessary for signing
+ data.
+
+ @return: C{True} if this is a private key.
+ @rtype: bool
+ """
+ return False
+
+ def get_fingerprint(self):
+ """
+ Return an MD5 fingerprint of the public part of this key. Nothing
+ secret is revealed.
+
+ @return: a 16-byte string (binary) of the MD5 fingerprint, in SSH
+ format.
+ @rtype: str
+ """
+ return MD5.new(str(self)).digest()
+
+ def get_base64(self):
+ """
+ Return a base64 string containing the public part of this key. Nothing
+ secret is revealed. This format is compatible with that used to store
+ public key files or recognized host keys.
+
+ @return: a base64 string containing the public part of the key.
+ @rtype: str
+ """
+ return base64.encodestring(str(self)).replace('\n', '')
+
+ def sign_ssh_data(self, rng, data):
+ """
+ Sign a blob of data with this private key, and return a L{Message}
+ representing an SSH signature message.
+
+ @param rng: a secure random number generator.
+ @type rng: L{Crypto.Util.rng.RandomPool}
+ @param data: the data to sign.
+ @type data: str
+ @return: an SSH signature message.
+ @rtype: L{Message}
+ """
+ return ''
+
+ def verify_ssh_sig(self, data, msg):
+ """
+ Given a blob of data, and an SSH message representing a signature of
+ that data, verify that it was signed with this key.
+
+ @param data: the data that was signed.
+ @type data: str
+ @param msg: an SSH signature message
+ @type msg: L{Message}
+ @return: C{True} if the signature verifies correctly; C{False}
+ otherwise.
+ @rtype: boolean
+ """
+ return False
+
+ def from_private_key_file(cls, filename, password=None):
+ """
+ Create a key object by reading a private key file. If the private
+ key is encrypted and C{password} is not C{None}, the given password
+ will be used to decrypt the key (otherwise L{PasswordRequiredException}
+ is thrown). Through the magic of python, this factory method will
+ exist in all subclasses of PKey (such as L{RSAKey} or L{DSSKey}), but
+ is useless on the abstract PKey class.
+
+ @param filename: name of the file to read
+ @type filename: str
+ @param password: an optional password to use to decrypt the key file,
+ if it's encrypted
+ @type password: str
+ @return: a new key object based on the given private key
+ @rtype: L{PKey}
+
+ @raise IOError: if there was an error reading the file
+ @raise PasswordRequiredException: if the private key file is
+ encrypted, and C{password} is C{None}
+ @raise SSHException: if the key file is invalid
+ """
+ key = cls(filename=filename, password=password)
+ return key
+ from_private_key_file = classmethod(from_private_key_file)
+
+ def from_private_key(cls, file_obj, password=None):
+ """
+ Create a key object by reading a private key from a file (or file-like)
+ object. If the private key is encrypted and C{password} is not C{None},
+ the given password will be used to decrypt the key (otherwise
+ L{PasswordRequiredException} is thrown).
+
+ @param file_obj: the file to read from
+ @type file_obj: file
+ @param password: an optional password to use to decrypt the key, if it's
+ encrypted
+ @type password: str
+ @return: a new key object based on the given private key
+ @rtype: L{PKey}
+
+ @raise IOError: if there was an error reading the key
+ @raise PasswordRequiredException: if the private key file is encrypted,
+ and C{password} is C{None}
+ @raise SSHException: if the key file is invalid
+ """
+ key = cls(file_obj=file_obj, password=password)
+ return key
+ from_private_key = classmethod(from_private_key)
+
+ def _read_private_key_file(self, tag, filename, password=None):
+ """
+ Read an SSH2-format private key file, looking for a string of the type
+ C{"BEGIN xxx PRIVATE KEY"} for some C{xxx}, base64-decode the text we
+ find, and return it as a string. If the private key is encrypted and
+ C{password} is not C{None}, the given password will be used to decrypt
+ the key (otherwise L{PasswordRequiredException} is thrown).
+
+ @param tag: C{"RSA"} or C{"DSA"}, the tag used to mark the data block.
+ @type tag: str
+ @param filename: name of the file to read.
+ @type filename: str
+ @param password: an optional password to use to decrypt the key file,
+ if it's encrypted.
+ @type password: str
+ @return: data blob that makes up the private key.
+ @rtype: str
+
+ @raise IOError: if there was an error reading the file.
+ @raise PasswordRequiredException: if the private key file is
+ encrypted, and C{password} is C{None}.
+ @raise SSHException: if the key file is invalid.
+ """
+ f = open(filename, 'r')
+ data = self._read_private_key(tag, f, password)
+ f.close()
+ return data
+
+ def _read_private_key(self, tag, f, password=None):
+ lines = f.readlines()
+
+ if "BEGIN RSA PRIVATE" in lines[0]:
+ tag = "RSA"
+ self.type = 0
+ else:
+ self.type = 1
+ tag = "DSA"
+
+ start = 0
+ while (start < len(lines)) and (lines[start].strip() != '-----BEGIN ' + tag + ' PRIVATE KEY-----'):
+ start += 1
+ if start >= len(lines):
+ raise SSHException('not a valid ' + tag + ' private key file')
+ # parse any headers first
+ headers = {}
+ start += 1
+ while start < len(lines):
+ l = lines[start].split(': ')
+ if len(l) == 1:
+ break
+ headers[l[0].lower()] = l[1].strip()
+ start += 1
+ # find end
+ end = start
+ while (lines[end].strip() != '-----END ' + tag + ' PRIVATE KEY-----') and (end < len(lines)):
+ end += 1
+ # if we trudged to the end of the file, just try to cope.
+ try:
+ data = base64.decodestring(''.join(lines[start:end]))
+ except base64.binascii.Error, e:
+ raise SSHException('base64 decoding error: ' + str(e))
+
+ if 'proc-type' not in headers:
+ # unencryped: done
+ return data
+ # encrypted keyfile: will need a password
+ if headers['proc-type'] != '4,ENCRYPTED':
+ raise SSHException('Unknown private key structure "%s"' % headers['proc-type'])
+ try:
+ encryption_type, saltstr = headers['dek-info'].split(',')
+ except:
+ raise SSHException('Can\'t parse DEK-info in private key file')
+ if encryption_type not in self._CIPHER_TABLE:
+ raise SSHException('Unknown private key cipher "%s"' % encryption_type)
+ # if no password was passed in, raise an exception pointing out that we need one
+ if password is None:
+ raise PasswordRequiredException('Private key file is encrypted')
+ cipher = self._CIPHER_TABLE[encryption_type]['cipher']
+ keysize = self._CIPHER_TABLE[encryption_type]['keysize']
+ mode = self._CIPHER_TABLE[encryption_type]['mode']
+ salt = unhexlify(saltstr)
+ if keysize == 24:
+ self.hash = "%s:$sshng$%s$%s$%s$%s$%s" % (f.name, 0, len(saltstr) / 2, saltstr, len(binascii.hexlify(data)) / 2, binascii.hexlify(data))
+ elif keysize == 16:
+ self.hash = "%s:$sshng$%s$%s$%s$%s$%s" % (f.name, 1, len(saltstr) / 2, saltstr, len(binascii.hexlify(data)) / 2, binascii.hexlify(data))
+ else:
+ print >> sys.stderr, "%s uses unsupported cipher, please file a bug! " % f.name
+ return None
+
+ if not limited:
+ key = generate_key_bytes(MD5, salt, password, keysize)
+ data = cipher.new(key, mode, salt).decrypt(data)
+ # check encoding
+ try:
+ d = PKCS7Encoder()
+ ddata = d.decode(data)
+ return ddata
+ except ValueError: # incorrect password
+ return data
+ return None
+
+
+def chunks(l, n):
+ for i in xrange(0, len(l), n):
+ yield l[i:i + n]
+
+
+class RSADSSKey (PKey):
+
+ def __init__(self, msg=None, data=None, filename=None, password=None, vals=None, file_obj=None):
+ self.n = None
+ self.e = None
+ self.d = None
+ self.p = None
+ self.q = None
+ if file_obj is not None:
+ self._from_private_key(file_obj, password)
+ return
+ if filename is not None:
+ self._from_private_key_file(filename, password)
+ return
+ if vals is not None:
+ self.e, self.n = vals
+ self.size = bit_length(self.n)
+
+ def __hash__(self):
+ h = hash(self.get_name())
+ h = h * 37 + hash(self.e)
+ h = h * 37 + hash(self.n)
+ return hash(h)
+
+ def get_name(self):
+ return 'ssh-rsa'
+
+ def get_bits(self):
+ return self.size
+
+ ### internals...
+
+ def _from_private_key_file(self, filename, password):
+ data = self._read_private_key_file('RSA', filename, password)
+
+ if limited:
+ print self.hash
+ return
+ try:
+ if self.type == 0:
+ self._decode_key(data)
+ else:
+ self._decode_dss_key(data)
+ print >> sys.stderr, "%s has no password!" % filename
+ except SSHException:
+ print self.hash
+
+ def _from_private_key(self, file_obj, password):
+ """used for converting older format hashes"""
+ data = self._read_private_key('RSA', file_obj, password)
+ if limited:
+ print self.hash
+ return
+ try:
+ if self.type == 0:
+ self._decode_key(data)
+ else:
+ self._decode_dss_key(data)
+ print >> sys.stderr, "%s has no password!" % file_obj.name
+ except SSHException:
+ print self.hash
+
+ def _decode_key(self, data):
+ # private key file contains:
+ # RSAPrivateKey = { version = 0, n, e, d, p, q, d mod p-1, d mod q-1, q**-1 mod p }
+ try:
+ keylist = BER(data).decode()
+ except BERException:
+ raise SSHException('Unable to parse key file')
+ if (type(keylist) is not list) or (len(keylist) < 4) or (keylist[0] != 0):
+ raise SSHException('Not a valid RSA private key file (bad ber encoding)')
+ self.n = keylist[1]
+ self.e = keylist[2]
+ self.d = keylist[3]
+ # not really needed
+ self.p = keylist[4]
+ self.q = keylist[5]
+ self.size = bit_length(self.n)
+
+ def _decode_dss_key(self, data):
+ # private key file contains:
+ # DSAPrivateKey = { version = 0, p, q, g, y, x }
+ try:
+ keylist = BER(data).decode()
+ except BERException, x:
+ raise SSHException('Unable to parse key file: ' + str(x))
+ if (type(keylist) is not list) or (len(keylist) < 6) or (keylist[0] != 0):
+ raise SSHException('not a valid DSA private key file (bad ber encoding)')
+ self.p = keylist[1]
+ self.q = keylist[2]
+ self.g = keylist[3]
+ self.y = keylist[4]
+ self.x = keylist[5]
+ self.size = bit_length(self.p)
+
+
+# PKCS7Encoder is borrowed from http://japrogbits.blogspot.in/
+class PKCS7Encoder(object):
+ '''
+ RFC 2315: PKCS#7 page 21
+ Some content-encryption algorithms assume the
+ input length is a multiple of k octets, where k > 1, and
+ let the application define a method for handling inputs
+ whose lengths are not a multiple of k octets. For such
+ algorithms, the method shall be to pad the input at the
+ trailing end with k - (l mod k) octets all having value k -
+ (l mod k), where l is the length of the input. In other
+ words, the input is padded at the trailing end with one of
+ the following strings:
+
+ 01 -- if l mod k = k-1
+ 02 02 -- if l mod k = k-2
+ .
+ .
+ .
+ k k ... k k -- if l mod k = 0
+
+ The padding can be removed unambiguously since all input is
+ padded and no padding string is a suffix of another. This
+ padding method is well-defined if and only if k < 256;
+ methods for larger k are an open issue for further study.
+ '''
+ def __init__(self, k=16):
+ self.k = k
+
+ ## @param text The padded text for which the padding is to be removed.
+ # @exception ValueError Raised when the input padding is missing or corrupt.
+ def decode(self, text):
+ '''
+ Remove the PKCS#7 padding from a text string
+ '''
+ nl = len(text)
+ val = int(binascii.hexlify(text[-1]), 16)
+ if val > self.k:
+ raise ValueError('Input is not padded or padding is corrupt')
+
+ l = nl - val
+ return text[:l]
+
+ ## @param text The text to encode.
+ def encode(self, text):
+ '''
+ Pad an input string according to PKCS#7
+ '''
+ l = len(text)
+ output = StringIO.StringIO()
+ val = self.k - (l % self.k)
+ for _ in xrange(val):
+ output.write('%02x' % val)
+ return text + binascii.unhexlify(output.getvalue())
+
+
+if __name__ == "__main__":
+
+ if len(sys.argv) < 2:
+ print >> sys.stderr, "Usage: %s < RSA/DSA private key files >" % sys.argv[0]
+
+ for file in sys.argv[1:]:
+ key = RSADSSKey.from_private_key_file(file, '')
View
5 src/MSCHAPv2_fmt_plug.c
@@ -83,6 +83,11 @@ static struct fmt_tests tests[] = {
{"$MSCHAPv2$8710da60ebfc4cab$c4e3bb55904c966927ee68e5f1472e1f5d8ec165713b5360$$foo4", "bar4" },
{"$MSCHAPv2$8710da60ebfc4cab$c4e3bb55904c966927ee68e5f1472e1f5d8ec165713b5360$$", "bar4" },
+ /* Ettercap generated three test vectors */
+ {"$MSCHAPv2$3D79CC8CDC0261D4$B700770725F87739ADB110B310D9A289CDBB550ADCA6CB86$solar", "solarisalwaysbusy"},
+ {"$MSCHAPv2$BA75EB14EFBFBF25$ED8CC90FD40FAA2D6BCD0ABD0B1F562FD777DF6C5609C98B$lulu", "password"},
+ {"$MSCHAPv2$95A87FA62EBCD2E3C8B09E1B448A6C72$ED8CC90FD40FAA2D6BCD0ABD0B1F562FD777DF6C5609C98B$E2AE0995EAAC6CEFF0D9757428B51509$lulu", "password"},
+
{"", "clientPass", {"User", "", "", "5B5D7C7D7B3F2F3E3C2C602132262628", "82309ECD8D708B5EA08FAA3981CD83544233114A3D85D6DF", "21402324255E262A28295F2B3A337C7E"} },
{"", "Cricket8", {"testuser1", "", "", "d07054459a1fdbc266a006f0220e6fac", "33c8331a9b03b7e003f09dd253d740a2bead544143cc8bde", "3545cb1d89b507a5de104435e81b14a4"} },
{"", "OMG!BBQ!11!one", {"domain\\fred", "", "", "56d64cbe7bad61349a0b752335100eaf", "d7d829d9545cef1d631b4e568ffb7586050fa3a4d02dbc0b", "7f8a466cff2a6bf0c80218bbf56d76bc"} }, /* domain\fred */
View
4 src/Makefile
@@ -1503,7 +1503,7 @@ cuda_xsha512.o: cuda_xsha512.h cuda/xsha512.cu cuda_common.o
cuda_xsha512_fmt.o: cuda_xsha512.o cuda_xsha512_fmt.c
$(CC) $(CFLAGS) cuda_xsha512_fmt.c -o cuda_xsha512_fmt.o
-cuda_wpapsk.o: cuda/wpapsk.cu cuda_common.o
+cuda_wpapsk.o: cuda_wpapsk.h cuda/wpapsk.cu cuda_common.o
cd cuda; nvcc $(NVCC_FLAGS) wpapsk.cu -o ../cuda_wpapsk.o
cuda_wpapsk_fmt.o: cuda_wpapsk.o cuda_wpapsk_fmt.c
@@ -1515,7 +1515,7 @@ cuda_rawsha512.o: cuda_rawsha512.h cuda/rawsha512.cu cuda_common.o
cuda_rawsha512_fmt.o: cuda_rawsha512.o cuda_rawsha512_fmt.c
$(CC) $(CFLAGS) cuda_rawsha512_fmt.c -o cuda_rawsha512_fmt.o
-cuda_pwsafe.o: cuda/pwsafe.cu cuda_common.o
+cuda_pwsafe.o: cuda_pwsafe.h cuda/pwsafe.cu cuda_common.o
cd cuda; nvcc $(NVCC_FLAGS) pwsafe.cu -o ../cuda_pwsafe.o
cuda_pwsafe_fmt.o: cuda_pwsafe.o cuda_pwsafe_fmt.c
View
24 src/common-opencl.c
@@ -589,8 +589,8 @@ cl_uint get_processors_count(int dev_id)
cl_uint core_count = get_max_compute_units(dev_id);
cores_per_MP[dev_id] = 0;
-#ifdef CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
if (gpu_nvidia(device_info[dev_id])) {
+#ifdef CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
unsigned int major = 0, minor = 0;
get_compute_capability(dev_id, &major, &minor);
@@ -602,8 +602,28 @@ cl_uint get_processors_count(int dev_id)
core_count *= (cores_per_MP[dev_id] = 48); //2.1
else if (major == 3)
core_count *= (cores_per_MP[dev_id] = 192); //3.0
- } else
+#else
+ /* Apple does not expose get_compute_capability() so we need
+ to find out using mory hacky approaches. This needs more
+ much more clauses to be correct but it's a MESS:
+ http://en.wikipedia.org/wiki/Comparison_of_Nvidia_graphics_processing_units
+
+ Anything that not hits these will be listed as x8, right
+ or wrong. Note that --list=cuda-devices will show the right
+ figure even under OSX. */
+ char dname[MAX_OCLINFO_STRING_LEN];
+
+ HANDLE_CLERROR(clGetDeviceInfo(devices[dev_id], CL_DEVICE_NAME,
+ sizeof(dname), dname, NULL), "Error querying CL_DEVICE_NAME");
+
+ if (strstr(dname, "GT 65") || strstr(dname, "GTX 65") ||
+ strstr(dname, "GT 66") || strstr(dname, "GTX 66") ||
+ strstr(dname, "GT 67") || strstr(dname, "GTX 67") ||
+ strstr(dname, "GT 68") || strstr(dname, "GTX 68") ||
+ strstr(dname, "GT 69") || strstr(dname, "GTX 69"))
+ core_count *= (cores_per_MP[dev_id] = 192); // Kepler
#endif
+ } else
if (gpu_amd(device_info[dev_id])) {
core_count *= (cores_per_MP[dev_id] = (16 * //16 thread proc * 5 SP
((amd_gcn(device_info[dev_id]) ||
View
2  src/common_opencl_pbkdf2.c
@@ -310,7 +310,7 @@ static gpu_mem_buffer exec_pbkdf2(cl_uint *pass_api,cl_uint *salt_api,cl_uint sa
cl_ulong startTime, endTime;
- HANDLE_CLERROR(CL_SUCCESS!=clWaitForEvents(1,&evnt),"SYNC FAILED");
+ HANDLE_CLERROR(clWaitForEvents(1,&evnt),"SYNC FAILED");
HANDLE_CLERROR(clFinish(cmdq[platform_no][dev_no]), "clFinish error");
View
1  src/cuda/cryptmd5.cu
@@ -238,6 +238,7 @@ __host__ void md5_crypt_gpu(crypt_md5_password * inbuffer,
cudaMemcpyHostToDevice));
kernel_crypt_r <<< BLOCKS, THREADS >>> (cuda_inbuffer, cuda_outbuffer);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(outbuffer, cuda_outbuffer, outsize,
cudaMemcpyDeviceToHost));
View
1  src/cuda/cryptsha256.cu
@@ -317,6 +317,7 @@ void sha256_crypt_gpu(crypt_sha256_password * inbuffer,
kernel_crypt_r <<< dimGrid, dimBlock >>> (cuda_inbuffer,
cuda_outbuffer);
cudaThreadSynchronize();
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(outbuffer, cuda_outbuffer, outsize,
cudaMemcpyDeviceToHost));
View
1  src/cuda/cryptsha512.cu
@@ -347,6 +347,7 @@ void sha512_crypt_gpu(crypt_sha512_password * inbuffer,
kernel_crypt_r <<< dimGrid, dimBlock >>> (cuda_inbuffer,
cuda_outbuffer);
cudaThreadSynchronize();
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(outbuffer, cuda_outbuffer, outsize,
cudaMemcpyDeviceToHost));
View
12 src/cuda/cuda_common.cu
@@ -16,6 +16,8 @@ void HandleError(cudaError_t err, const char *file, int line)
if (err != cudaSuccess) {
fprintf(stderr, "%s in %s at line %d\n",
cudaGetErrorString(err), file, line);
+ if (err == cudaErrorLaunchOutOfResources)
+ fprintf(stderr, "Try decreasing THREADS in the corresponding cuda*h file. See doc/README-CUDA\n");
exit(EXIT_FAILURE);
}
}
@@ -73,6 +75,8 @@ void cuda_device_list()
cudaGetDeviceProperties(&devProp, i);
printf("\nCUDA Device #%d\n", i);
printf("\tName: %s\n", devProp.name);
+ printf("\tType: %s\n",
+ devProp.integrated ? "integrated" : "discrete");
printf("\tCompute capability: sm_%d%d\n",
devProp.major, devProp.minor);
if (devProp.major <= 3)
@@ -91,6 +95,8 @@ void cuda_device_list()
human_format(devProp.sharedMemPerBlock));
printf("\tTotal constant memory: %s\n",
human_format(devProp.totalConstMem));
+ printf("\tL2 cache size %s\n",
+ human_format(devProp.l2CacheSize));
printf("\tKernel execution timeout: %s\n",
(devProp.kernelExecTimeoutEnabled ? "Yes" : "No"));
printf("\tConcurrent copy and execution: %s\n",
@@ -99,6 +105,12 @@ void cuda_device_list()
(devProp.concurrentKernels ? "Yes" : "No"));
printf("\tWarp size: %d\n",
devProp.warpSize);
+ printf("\tMax. GPRs/thread block %d\n",
+ devProp.regsPerBlock);
+ printf("\tMax. threads per block %d\n",
+ devProp.maxThreadsPerBlock);
+ printf("\tMax. resident threads per MP %d\n",
+ devProp.maxThreadsPerMultiProcessor);
puts("");
}
}
View
1  src/cuda/mscash.cu
@@ -215,6 +215,7 @@ __host__ void cuda_mscash(mscash_password * inbuffer, mscash_hash * outbuffer,
cudaMemcpyHostToDevice));
mscash_kernel <<< BLOCKS, THREADS >>> (cuda_inbuffer, cuda_outbuffer);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(outbuffer, cuda_outbuffer, outsize,
cudaMemcpyDeviceToHost));
View
1  src/cuda/mscash2.cu
@@ -412,6 +412,7 @@ __host__ void mscash2_gpu(mscash2_password * inbuffer,
cudaMemcpyHostToDevice));
pbkdf2_kernel <<< BLOCKS, THREADS >>> (cuda_inbuffer, cuda_outbuffer);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(outbuffer, cuda_outbuffer, outsize,
cudaMemcpyDeviceToHost));
View
1  src/cuda/phpass.cu
@@ -30,6 +30,7 @@ extern "C" void gpu_phpass(uint8_t * host_data, phpass_salt * salt,
HANDLE_ERROR(cudaMemcpyToSymbol(cuda_salt, salt, SALT_SIZE));
kernel_phpass <<< BLOCKS, THREADS >>> (cuda_data, cuda_data_out);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaThreadSynchronize());
HANDLE_ERROR(cudaMemcpy(host_data_out, cuda_data_out, DATA_OUT_SIZE,
View
1  src/cuda/pwsafe.cu
@@ -167,6 +167,7 @@ extern "C" void gpu_pwpass(pwsafe_pass * host_in, pwsafe_salt * host_salt,
kernel_pwsafe <<< BLOCKS, THREADS >>> (cuda_pass, cuda_salt,
cuda_hash);
cudaThreadSynchronize();
+ HANDLE_ERROR(cudaGetLastError());
///Free memory and copy results back
cudaMemcpy(host_out, cuda_hash, PWSAFE_OUT_SIZE,
View
4 src/cuda/rawsha256.cu
@@ -77,17 +77,20 @@ static void cuda_rawsha256(sha256_password * host_in, void *out, int overlap)
DATA_IN_SIZE / 3, cudaMemcpyHostToDevice, stream0));
kernel_sha256 <<< dimGrid, dimBlock, 0,
stream0 >>> (cuda_data0, cuda_data_out0);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpyAsync(cuda_data1,
host_in + KEYS_PER_CRYPT / 3, DATA_IN_SIZE / 3,
cudaMemcpyHostToDevice, stream1));
kernel_sha256 <<< dimGrid, dimBlock, 0,
stream1 >>> (cuda_data1, cuda_data_out1);
+ HANDLE_ERROR(cudaGetLastError());
cudaMemcpyAsync(cuda_data2, host_in + 2 * KEYS_PER_CRYPT / 3,
DATA_IN_SIZE / 3, cudaMemcpyHostToDevice, stream2);
kernel_sha256 <<< dimGrid, dimBlock, 0,
stream2 >>> (cuda_data2, cuda_data_out2);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpyAsync((SHA_HASH *) out, cuda_data_out0,
DATA_OUT_SIZE / 3, cudaMemcpyDeviceToHost, stream0));
@@ -122,6 +125,7 @@ static void cuda_rawsha256(sha256_password * host_in, void *out, int overlap)
kernel_sha256 <<< BLOCKS, THREADS >>> (cuda_data,
cuda_data_out);
cudaThreadSynchronize();
+ HANDLE_ERROR(cudaGetLastError());
cudaMemcpy(host_out, cuda_data_out, DATA_OUT_SIZE,
cudaMemcpyDeviceToHost);
View
2  src/cuda/rawsha512.cu
@@ -223,6 +223,7 @@ void cuda_sha512(sha512_key *host_password, sha512_hash* host_hash)
dim3 dimGrid(BLOCKS);
dim3 dimBlock(THREADS);
kernel_sha512 <<< dimGrid, dimBlock >>> (cuda_password, cuda_hash);
+ HANDLE_ERROR(cudaGetLastError());
}
__global__ static void kernel_cmp_all(int count, uint64_t* hash, uint8_t *result)
@@ -249,6 +250,7 @@ int cuda_sha512_cmp_all(void *binary, int count)
dim3 dimGrid(BLOCKS);
dim3 dimBlock(THREADS);
kernel_cmp_all <<< dimGrid, dimBlock >>> (count, (uint64_t*)cuda_hash, cuda_result);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(&result, cuda_result, sizeof(uint8_t), cudaMemcpyDeviceToHost));
return result;
}
View
1  src/cuda/wpapsk.cu
@@ -239,6 +239,7 @@ __host__ void wpapsk_gpu(wpapsk_password * inbuffer, wpapsk_hash * outbuffer,
wpapsk_pbkdf2_kernel <<< BLOCKS, THREADS >>> (cuda_inbuffer,
cuda_outbuffer);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(outbuffer, cuda_outbuffer, outsize,
cudaMemcpyDeviceToHost));
View
2  src/cuda/xsha512.cu
@@ -257,6 +257,7 @@ void cuda_xsha512(xsha512_key *host_password,
dim3 dimGrid((count-1)/THREADS+1);
dim3 dimBlock(THREADS);
kernel_xsha512 <<< dimGrid, dimBlock >>> (count, cuda_password, cuda_hash, cuda_ext_password);
+ HANDLE_ERROR(cudaGetLastError());
cracked_hash_copy_out = 0;
}
@@ -284,6 +285,7 @@ int cuda_cmp_all(void *binary, int count)
dim3 dimGrid((count-1)/THREADS+1);
dim3 dimBlock(THREADS);
kernel_cmp_all <<< dimGrid, dimBlock >>> (count, (uint64_t*)cuda_hash, cuda_result);
+ HANDLE_ERROR(cudaGetLastError());
HANDLE_ERROR(cudaMemcpy(&result, cuda_result, sizeof(uint8_t), cudaMemcpyDeviceToHost));
return result;
}
View
4 src/cuda_common.h
@@ -15,11 +15,11 @@ extern void cuda_init(unsigned int cuda_gpu_id);
#define check_mem_allocation(inbuffer,outbuffer)\
if(inbuffer==NULL){\
- fprintf(stderr,"Cannot alocate memory for passwords file:%s line:%d\n",__FILE__,__LINE__);\
+ fprintf(stderr,"Cannot allocate memory for passwords file:%s line:%d\n",__FILE__,__LINE__);\
exit(1);\
}\
if(inbuffer==NULL){\
- fprintf(stderr,"Cannot alocate memory for hashes file:%s line:%d\n",__FILE__,__LINE__);\
+ fprintf(stderr,"Cannot allocate memory for hashes file:%s line:%d\n",__FILE__,__LINE__);\
exit(1);\
}
View
1  src/cuda_cryptmd5_fmt.c
@@ -220,7 +220,6 @@ static void *salt(char *ciphertext)
static void set_salt(void *salt)
{
memcpy(&host_salt, salt, sizeof(crypt_md5_salt));
- any_cracked = 0;
}
static void set_key(char *key, int index)
View
458 src/encoding_data.h
@@ -34,10 +34,14 @@
// combinations that are invalid but can't be matched this easily.
#define CHARS_INVALID_UTF8 "\xc0\xc1\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
-// for i in iso-8859-1 koi8-r cp1251 cp866 cp1252 iso-8859-15 cp437 cp850 cp858 cp737; do ../run/cmpt_cp.pl $i; done >> encoding_data.h
+// for i in iso-8859-1 iso-8859-2 iso-8859-7 iso-8859-15 koi8-r cp437 cp737 cp850 cp852 cp858 cp866 cp1250 cp1251 cp1252 cp1253 ; do Unicode/cmpt_cp.pl -v $i; done >> encoding_data.h
// ----8<------8<---- AUTO-GENERATED DATA BELOW THIS POINT ----8<------8<----
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
+
// here is the ISO_8859_1 to Unicode conversion for ISO_8859_1 characters from 0x80 to 0xFF
static const UTF16 ISO_8859_1_to_unicode_high128[] = {
0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
@@ -49,25 +53,110 @@ static const UTF16 ISO_8859_1_to_unicode_high128[] = {
0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF };
// *** WARNING, char at 0xDF U+00DF (ß -> SS) needs to be looked into. Single to multi-byte conversion
+
+// àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ
#define CHARS_LOWER_ISO_8859_1 \
"\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE"
+
+// ªµºßÿ
#define CHARS_LOW_ONLY_ISO_8859_1 "\xAA\xB5\xBA\xDF\xFF"
+
+// ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ
#define CHARS_UPPER_ISO_8859_1 \
"\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE"
+
+//
#define CHARS_UP_ONLY_ISO_8859_1
+
+// ²³¹¼½¾
#define CHARS_DIGITS_ISO_8859_1 "\xB2\xB3\xB9\xBC\xBD\xBE"
+
+// ¡«·»¿
#define CHARS_PUNCTUATION_ISO_8859_1 "\xA1\xAB\xB7\xBB\xBF"
+
+// ¢£¤¥¦§¨©¬­®¯°±´¶¸×÷
#define CHARS_SPECIALS_ISO_8859_1 "\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAC\xAD\xAE\xAF\xB0\xB1\xB4\xB6\xB8\xD7\xF7"
+
+// ªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
#define CHARS_ALPHA_ISO_8859_1 \
"\xAA\xB5\xBA\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"
+
#define CHARS_WHITESPACE_ISO_8859_1 "\xA0"
+
#define CHARS_CONTROL_ISO_8859_1 \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F"
+
#define CHARS_INVALID_ISO_8859_1 ""
+
+// YyÀÁÂÃÄÅÆÈÉÊËÌÍÎÏÒÓÔÕÖØÙÚÛÜÝàáâãäåæèéêëìíîïòóôõöøùúûüýÿ
#define CHARS_VOWELS_ISO_8859_1 \
"\x59\x79\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFF"
+
+// ªµºÇÐÑÝÞßçðñýþÿ
#define CHARS_CONSONANTS_ISO_8859_1 "\xAA\xB5\xBA\xC7\xD0\xD1\xDD\xDE\xDF\xE7\xF0\xF1\xFD\xFE\xFF"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙
+
+// here is the ISO_8859_2 to Unicode conversion for ISO_8859_2 characters from 0x80 to 0xFF
+static const UTF16 ISO_8859_2_to_unicode_high128[] = {
+0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
+0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
+0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
+0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
+0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
+0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
+0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 };
+// *** WARNING, char at 0xDF U+00DF (ß -> SS) needs to be looked into. Single to multi-byte conversion
+
+// ąłľśšşťźžżŕáâăäĺćçčéęëěíîďđńňóôőöřůúűüýţ
+#define CHARS_LOWER_ISO_8859_2 \
+ "\xB1\xB3\xB5\xB6\xB9\xBA\xBB\xBC\xBE\xBF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE"
+
+// ß
+#define CHARS_LOW_ONLY_ISO_8859_2 "\xDF"
+
+// ĄŁĽŚŠŞŤŹŽŻŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖŘŮÚŰÜÝŢ
+#define CHARS_UPPER_ISO_8859_2 \
+ "\xA1\xA3\xA5\xA6\xA9\xAA\xAB\xAC\xAE\xAF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE"
+
+//
+#define CHARS_UP_ONLY_ISO_8859_2
+
+//
+#define CHARS_DIGITS_ISO_8859_2
+
+//
+#define CHARS_PUNCTUATION_ISO_8859_2
+
+// ˘¤§¨­°˛´ˇ¸˝×÷˙
+#define CHARS_SPECIALS_ISO_8859_2 "\xA2\xA4\xA7\xA8\xAD\xB0\xB2\xB4\xB7\xB8\xBD\xD7\xF7\xFF"
+
+// ĄŁĽŚŠŞŤŹŽŻąłľśšşťźžżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőöřůúűüýţ
+#define CHARS_ALPHA_ISO_8859_2 \
+ "\xA1\xA3\xA5\xA6\xA9\xAA\xAB\xAC\xAE\xAF\xB1\xB3\xB5\xB6\xB9\xBA\xBB\xBC\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE"
+
+#define CHARS_WHITESPACE_ISO_8859_2 "\xA0"
+
+#define CHARS_CONTROL_ISO_8859_2 \
+ "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F"
+
+#define CHARS_INVALID_ISO_8859_2 ""
+
+// YyĄąÁÂĂÄÉĘËĚÍÎÓÔŐÖŮÚŰÜÝáâăäéęëěíîóôőöůúűüý
+#define CHARS_VOWELS_ISO_8859_2 \
+ "\x59\x79\xA1\xB1\xC1\xC2\xC3\xC4\xC9\xCA\xCB\xCC\xCD\xCE\xD3\xD4\xD5\xD6\xD9\xDA\xDB\xDC\xDD\xE1\xE2\xE3\xE4\xE9\xEA\xEB\xEC\xED\xEE\xF3\xF4\xF5\xF6\xF9\xFA\xFB\xFC\xFD"
+
+// ŁĽŚŠŞŤŹŽŻłľśšşťźžżŔĹĆÇČĎĐŃŇŘÝŢßŕĺćçčďđńňřýţ
+#define CHARS_CONSONANTS_ISO_8859_2 \
+ "\xA3\xA5\xA6\xA9\xAA\xAB\xAC\xAE\xAF\xB3\xB5\xB6\xB9\xBA\xBB\xBC\xBE\xBF\xC0\xC5\xC6\xC7\xC8\xCF\xD0\xD1\xD2\xD8\xDD\xDE\xDF\xE0\xE5\xE6\xE7\xE8\xEF\xF0\xF1\xF2\xF8\xFD\xFE"
+
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�
+
// here is the ISO_8859_7 to Unicode conversion for ISO_8859_7 characters from 0x80 to 0xFF
static const UTF16 ISO_8859_7_to_unicode_high128[] = {
0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
@@ -92,7 +181,7 @@ static const UTF16 ISO_8859_7_to_unicode_high128[] = {
#define CHARS_UPPER_ISO_8859_7 \
"\xB6\xB8\xB9\xBA\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD3\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xBC\xBE\xBF"
-//
+//
#define CHARS_UP_ONLY_ISO_8859_7
// ²³½
@@ -123,6 +212,10 @@ static const UTF16 ISO_8859_7_to_unicode_high128[] = {
#define CHARS_CONSONANTS_ISO_8859_7 \
"\xC2\xC3\xC4\xC6\xC8\xCA\xCB\xCC\xCD\xCE\xD0\xD1\xD3\xD4\xD6\xD7\xD8\xE2\xE3\xE4\xE6\xE8\xEA\xEB\xEC\xED\xEE\xF0\xF1\xF2\xF3\xF4\xF6\xF7\xF8"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// €‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
+
// here is the ISO_8859_15 to Unicode conversion for ISO_8859_15 characters from 0x80 to 0xFF
static const UTF16 ISO_8859_15_to_unicode_high128[] = {
0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
@@ -134,25 +227,52 @@ static const UTF16 ISO_8859_15_to_unicode_high128[] = {
0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF };
// *** WARNING, char at 0xDF U+00DF (ß -> SS) needs to be looked into. Single to multi-byte conversion
+
+// šžœàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
#define CHARS_LOWER_ISO_8859_15 \
"\xA8\xB8\xBD\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"
+
+// ªµºß
#define CHARS_LOW_ONLY_ISO_8859_15 "\xAA\xB5\xBA\xDF"
+
+// ŠŽŒÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞŸ
#define CHARS_UPPER_ISO_8859_15 \
"\xA6\xB4\xBC\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xBE"
+
+//
#define CHARS_UP_ONLY_ISO_8859_15
+
+// ²³¹
#define CHARS_DIGITS_ISO_8859_15 "\xB2\xB3\xB9"
+
+// ¡«·»¿
#define CHARS_PUNCTUATION_ISO_8859_15 "\xA1\xAB\xB7\xBB\xBF"
+
+// ¢£€¥§©¬­®¯°±¶×÷
#define CHARS_SPECIALS_ISO_8859_15 "\xA2\xA3\xA4\xA5\xA7\xA9\xAC\xAD\xAE\xAF\xB0\xB1\xB6\xD7\xF7"
+
+// ŠšªŽµžºŒœŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
#define CHARS_ALPHA_ISO_8859_15 \
"\xA6\xA8\xAA\xB4\xB5\xB8\xBA\xBC\xBD\xBE\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"
+
#define CHARS_WHITESPACE_ISO_8859_15 "\xA0"
+
#define CHARS_CONTROL_ISO_8859_15 \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F"
+
#define CHARS_INVALID_ISO_8859_15 ""
+
+// YyŒœŸÀÁÂÃÄÅÆÈÉÊËÌÍÎÏÒÓÔÕÖØÙÚÛÜÝàáâãäåæèéêëìíîïòóôõöøùúûüýÿ
#define CHARS_VOWELS_ISO_8859_15 \
"\x59\x79\xBC\xBD\xBE\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFF"
+
+// ŠšªŽµžºŸÇÐÑÝÞßçðñýþÿ
#define CHARS_CONSONANTS_ISO_8859_15 "\xA6\xA8\xAA\xB4\xB5\xB8\xBA\xBE\xC7\xD0\xD1\xDD\xDE\xDF\xE7\xF0\xF1\xFD\xFE\xFF"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// ─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ
+
// here is the KOI8_R to Unicode conversion for KOI8_R characters from 0x80 to 0xFF
static const UTF16 KOI8_R_to_unicode_high128[] = {
0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
@@ -163,26 +283,53 @@ static const UTF16 KOI8_R_to_unicode_high128[] = {
0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A };
+
+// ёюабцдефгхийклмнопярстужвьызшэщчъ
#define CHARS_LOWER_KOI8_R \
"\xA3\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF"
+
+//
#define CHARS_LOW_ONLY_KOI8_R
+
+// ЁЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ
#define CHARS_UPPER_KOI8_R \
"\xB3\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"
+
+//
#define CHARS_UP_ONLY_KOI8_R
+
+// ²
#define CHARS_DIGITS_KOI8_R "\x9D"
+
+// ·
#define CHARS_PUNCTUATION_KOI8_R "\x9E"
+
+// ─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥⌡°÷═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬©
#define CHARS_SPECIALS_KOI8_R \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9B\x9C\x9F\xA0\xA1\xA2\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF"
+
+// ёЁюабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ
#define CHARS_ALPHA_KOI8_R \
"\xA3\xB3\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"
+
#define CHARS_WHITESPACE_KOI8_R "\x9A"
+
#define CHARS_CONTROL_KOI8_R
+
#define CHARS_INVALID_KOI8_R ""
+
+// YyёЁюаеийояуыэЮАЕИЙОЯУЫЭ
#define CHARS_VOWELS_KOI8_R \
"\x59\x79\xA3\xB3\xC0\xC1\xC5\xC9\xCA\xCF\xD1\xD5\xD9\xDC\xE0\xE1\xE5\xE9\xEA\xEF\xF1\xF5\xF9\xFC"
+
+// бцдфгхклмнпрстжвьзшщчъБЦДФГХКЛМНПРСТЖВЬЗШЩЧЪ
#define CHARS_CONSONANTS_KOI8_R \
"\xC2\xC3\xC4\xC6\xC7\xC8\xCB\xCC\xCD\xCE\xD0\xD2\xD3\xD4\xD6\xD7\xD8\xDA\xDB\xDD\xDE\xDF\xE2\xE3\xE4\xE6\xE7\xE8\xEB\xEC\xED\xEE\xF0\xF2\xF3\xF4\xF6\xF7\xF8\xFA\xFB\xFD\xFE\xFF"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ 
+
// here is the CP437 to Unicode conversion for CP437 characters from 0x80 to 0xFF
static const UTF16 CP437_to_unicode_high128[] = {
0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7,0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5,
@@ -194,24 +341,51 @@ static const UTF16 CP437_to_unicode_high128[] = {
0x03B1,0x00DF,0x0393,0x03C0,0x03A3,0x03C3,0x00B5,0x03C4,0x03A6,0x0398,0x03A9,0x03B4,0x221E,0x03C6,0x03B5,0x2229,
0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248,0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 };
// *** WARNING, char at 0xE1 U+00DF (ß -> SS) needs to be looked into. Single to multi-byte conversion
+
+// üéäåçæöñσφ
#define CHARS_LOWER_CP437 "\x81\x82\x84\x86\x87\x91\x94\xA4\xE5\xED"
+
+// âàêëèïîìôòûùÿƒáíóúªºαßπµτδε
#define CHARS_LOW_ONLY_CP437 \
"\x83\x85\x88\x89\x8A\x8B\x8C\x8D\x93\x95\x96\x97\x98\x9F\xA0\xA1\xA2\xA3\xA6\xA7\xE0\xE1\xE3\xE6\xE7\xEB\xEE"
+
+// ÜÉÄÅÇÆÖÑΣΦ
#define CHARS_UPPER_CP437 "\x9A\x90\x8E\x8F\x80\x92\x99\xA5\xE4\xE8"
+
+//
#define CHARS_UP_ONLY_CP437
+
+// ½¼²
#define CHARS_DIGITS_CP437 "\xAB\xAC\xFD"
+
+// ¿¡«»·
#define CHARS_PUNCTUATION_CP437 "\xA8\xAD\xAE\xAF\xFA"
+
+// ¢£¥₧⌐¬░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀∞∩≡±≥≤⌠⌡÷≈°∙√ⁿ■
#define CHARS_SPECIALS_CP437 \
"\x9B\x9C\x9D\x9E\xA9\xAA\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xEC\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFB\xFC\xFE"
+
+// ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖ܃áíóúñѪºαßΓπΣσµτΦΘΩδφε
#define CHARS_ALPHA_CP437 \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xED\xEE"
+
#define CHARS_WHITESPACE_CP437 "\xFF"
+
#define CHARS_CONTROL_CP437
+
#define CHARS_INVALID_CP437 ""
+
+// YyüéâäàåêëèïîìÄÅÉæÆôöòûùÿÖÜáíóúαΩε
#define CHARS_VOWELS_CP437 \
"\x59\x79\x81\x82\x83\x84\x85\x86\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\xA0\xA1\xA2\xA3\xE0\xEA\xEE"
+
+// ÇçÿƒñѪºßΓπΣσµτΦΘδφ
#define CHARS_CONSONANTS_CP437 "\x80\x87\x98\x9F\xA4\xA5\xA6\xA7\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEB\xED"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ 
+
// here is the CP737 to Unicode conversion for CP737 characters from 0x80 to 0xFF
static const UTF16 CP737_to_unicode_high128[] = {
0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,0x03A0,
@@ -222,26 +396,53 @@ static const UTF16 CP737_to_unicode_high128[] = {
0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B,0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580,
0x03C9,0x03AC,0x03AD,0x03AE,0x03CA,0x03AF,0x03CC,0x03CD,0x03CB,0x03CE,0x0386,0x0388,0x0389,0x038A,0x038C,0x038E,
0x038F,0x00B1,0x2265,0x2264,0x03AA,0x03AB,0x00F7,0x2248,0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0 };
+
+// αβγδεζηθικλμνξοπρσςτυφχψωάέήϊίόύϋώ
#define CHARS_LOWER_CP737 \
"\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9"
+
+//
#define CHARS_LOW_ONLY_CP737
+
+// ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΣΤΥΦΧΨΩΆΈΉΪΊΌΎΫΏ
#define CHARS_UPPER_CP737 \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x91\x92\x93\x94\x95\x96\x97\xEA\xEB\xEC\xF4\xED\xEE\xEF\xF5\xF0"
+
+//
#define CHARS_UP_ONLY_CP737
+
+// ²
#define CHARS_DIGITS_CP737 "\xFD"
+
+// ·
#define CHARS_PUNCTUATION_CP737 "\xFA"
+
+// ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀±≥≤÷≈°∙√ⁿ■
#define CHARS_SPECIALS_CP737 \
"\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xF1\xF2\xF3\xF6\xF7\xF8\xF9\xFB\xFC\xFE"
+
+// ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψωάέήϊίόύϋώΆΈΉΊΌΎΏΪΫ
#define CHARS_ALPHA_CP737 \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF4\xF5"
+
#define CHARS_WHITESPACE_CP737 "\xFF"
+
#define CHARS_CONTROL_CP737
+
#define CHARS_INVALID_CP737 ""
+
+// YyΑΕΗΙΟΥΩαεηιουωάέήϊίόύϋώΆΈΉΊΌΎΏΪΫ
#define CHARS_VOWELS_CP737 \
"\x59\x79\x80\x84\x86\x88\x8E\x93\x97\x98\x9C\x9E\xA0\xA6\xAC\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF4\xF5"
+
+// ΒΓΔΖΘΚΛΜΝΞΠΡΣΤΦΧΨβγδζθκλμνξπρσςτφχψ
#define CHARS_CONSONANTS_CP737 \
"\x81\x82\x83\x85\x87\x89\x8A\x8B\x8C\x8D\x8F\x90\x91\x92\x94\x95\x96\x99\x9A\x9B\x9D\x9F\xA1\xA2\xA3\xA4\xA5\xA7\xA8\xA9\xAA\xAB\xAD\xAE\xAF"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ 
+
// here is the CP850 to Unicode conversion for CP850 characters from 0x80 to 0xFF
static const UTF16 CP850_to_unicode_high128[] = {
0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7,0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5,
@@ -254,25 +455,110 @@ static const UTF16 CP850_to_unicode_high128[] = {
0x00AD,0x00B1,0x2017,0x00BE,0x00B6,0x00A7,0x00F7,0x00B8,0x00B0,0x00A8,0x00B7,0x00B9,0x00B3,0x00B2,0x25A0,0x00A0 };
// *** WARNING, char at 0xD5 -> U+0131 -> U+0049 -> 0x49 (ı -> I) needs to be looked into. Likely one way casing conversion
// *** WARNING, char at 0xE1 U+00DF (ß -> SS) needs to be looked into. Single to multi-byte conversion
+
+// üéâäàåçêëèïîìæôöòûùøáíóúñãðõþý
#define CHARS_LOWER_CP850 \
"\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x91\x93\x94\x95\x96\x97\x9B\xA0\xA1\xA2\xA3\xA4\xC6\xD0\xE4\xE7\xEC"
+
+// ÿƒªºıßµ
#define CHARS_LOW_ONLY_CP850 "\x98\x9F\xA6\xA7\xD5\xE1\xE6"
+
+// ÜÉÂÄÀÅÇÊËÈÏÎÌÆÔÖÒÛÙØÁÍÓÚÑÃÐÕÞÝ
#define CHARS_UPPER_CP850 \
"\x9A\x90\xB6\x8E\xB7\x8F\x80\xD2\xD3\xD4\xD8\xD7\xDE\x92\xE2\x99\xE3\xEA\xEB\x9D\xB5\xD6\xE0\xE9\xA5\xC7\xD1\xE5\xE8\xED"
+
+//
#define CHARS_UP_ONLY_CP850
+
+// ½¼¾¹³²
#define CHARS_DIGITS_CP850 "\xAB\xAC\xF3\xFB\xFC\xFD"
+
+// ¿¡«»‗·
#define CHARS_PUNCTUATION_CP850 "\xA8\xAD\xAE\xAF\xF2\xFA"
+
+// £×®¬░▒▓│┤©╣║╗╝¢¥┐└┴┬├─┼╚╔╩╦╠═╬¤┘┌█▄¦▀¯´­±¶§÷¸°¨■
#define CHARS_SPECIALS_CP850 \
"\x9C\x9E\xA9\xAA\xB0\xB1\xB2\xB3\xB4\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD9\xDA\xDB\xDC\xDD\xDF\xEE\xEF\xF0\xF1\xF4\xF5\xF6\xF7\xF8\xF9\xFE"
+
+// ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø؃áíóúñѪºÁÂÀãÃðÐÊËÈıÍÎÏÌÓßÔÒõÕµþÞÚÛÙýÝ
#define CHARS_ALPHA_CP850 \
"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9D\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xB5\xB6\xB7\xC6\xC7\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xDE\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED"
+
#define CHARS_WHITESPACE_CP850 "\xFF"
+
#define CHARS_CONTROL_CP850
+
#define CHARS_INVALID_CP850 ""
+
+// YyüéâäàåêëèïîìÄÅÉæÆôöòûùÿÖÜøØáíóúÁÂÀãÃÊËÈıÍÎÏÌÓÔÒõÕÚÛÙýÝ
#define CHARS_VOWELS_CP850 \
"\x59\x79\x81\x82\x83\x84\x85\x86\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9D\xA0\xA1\xA2\xA3\xB5\xB6\xB7\xC6\xC7\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xDE\xE0\xE2\xE3\xE4\xE5\xE9\xEA\xEB\xEC\xED"
+
+// ÇçÿƒñѪºðÐßµþÞýÝ
#define CHARS_CONSONANTS_CP850 "\x80\x87\x98\x9F\xA4\xA5\xA6\xA7\xD0\xD1\xE1\xE6\xE7\xE8\xEC\xED"
+// 8 9 A B C D E F
+// 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
+// ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ 
+
+// here is the CP852 to Unicode conversion for CP852 characters from 0x80 to 0xFF
+static const UTF16 CP852_to_unicode_high128[] = {
+0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x016F,0x0107,0x00E7,0x0142,0x00EB,0x0150,0x0151,0x00EE,0x0179,0x00C4,0x0106,
+0x00C9,0x0139,0x013A,0x00F4,0x00F6,0x013D,0x013E,0x015A,0x015B,0x00D6,0x00DC,0x0164,0x0165,0x0141,0x00D7,0x010D,
+0x00E1,0x00ED,0x00F3,0x00FA,0x0104,0x0105,0x017D,0x017E,0x0118,0x0119,0x00AC,0x017A,0x010C,0x015F,0x00AB,0x00BB,
+0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x011A,0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510,
+0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x0102,0x0103,0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4,
+0x0111,0x0110,0x010E,0x00CB,0x010F,0x0147,0x00CD,0x00CE,0x011B,0x2518,0x250C,0x2588,0x2584,0x0162,0x016E,0x2580,
+0x00D3,0x00DF,0x00D4,0x0143,0x0144,0x0148,0x0160,0x0161,0x0154,0x00DA,0x0155,0x0170,0x00FD,0x00DD,0x0163,0x00B4,
+0x00AD,0x02DD,0x02DB,0x02C7,0x02D8,0x00A7,0x00F7,0x00B8,0x00B0,0x00A8,0x02D9,0x0171,0x0158,0x0159,0x25A0,0x00A0 };
+// *** WARNING, char at 0xE1 U+00DF (ß -> SS) needs to be looked into. Single to multi-byte conversion
+
+// üéâäůćçłëőîĺôöľśťčáíóúąžęźşżăđďěńňšŕýţűř
+#define CHARS_LOWER_CP852 \
+ "\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8B\x8C\x92\x93\x94\x96\x98\x9C\x9F\xA0\xA1\xA2\xA3\xA5\xA7\xA9\xAB\xAD\xBE\xC7\xD0\xD4\xD8\xE4\xE5\xE7\xEA\xEC\xEE\xFB\xFD"
+
+// ß
+#define CHARS_LOW_ONLY_CP852 "\xE1"
+
+// ÜÉÂÄŮĆÇŁËŐÎĹÔÖĽŚŤČÁÍÓÚĄŽĘŹŞŻĂĐĎĚŃŇŠŔÝŢŰŘ
+#define CHARS_UPPER_CP852 \
+ "\x9A\x90\xB6\x8E\xDE\x8F\x80\x9D\xD3\x8A\xD7\x91\xE2\x99\x95\x97\x9B\xAC\xB5\xD6\xE0\xE9\xA4\xA6\xA8\x8D\xB8\xBD\xC6\xD1\xD2\xB7\xE3\xD5\xE6\xE8\xED\xDD\xEB\xFC"
+
+//
+#define CHARS_UP_ONLY_CP852
+
+//
+#