From 5c72d62c9007d68b98e132ed9caa63afe6cb6805 Mon Sep 17 00:00:00 2001 From: Mathias Svensson Date: Thu, 30 Mar 2017 20:07:07 +0200 Subject: [PATCH] Update the CRC list --- pwnlib/data/crcsums.txt | 171 ++++++++++++++----------- pwnlib/util/crc/known.py | 263 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 352 insertions(+), 82 deletions(-) diff --git a/pwnlib/data/crcsums.txt b/pwnlib/data/crcsums.txt index 614ad6281..ab1d6e7e1 100644 --- a/pwnlib/data/crcsums.txt +++ b/pwnlib/data/crcsums.txt @@ -4,75 +4,102 @@ # At the time of download, that page was available under the GPLv3 license, which can found here: # https://www.gnu.org/licenses/gpl.html # -crc.cat-bits.3 width=3 poly=0x3 init=0x7 refin=true refout=true xorout=0x0 check=0x6 name="CRC-3/ROHC" -crc.cat-bits.4 width=4 poly=0x3 init=0x0 refin=true refout=true xorout=0x0 check=0x7 name="CRC-4/ITU" -crc.cat-bits.5 width=5 poly=0x09 init=0x09 refin=false refout=false xorout=0x00 check=0x00 name="CRC-5/EPC" -crc.cat.crc-5-itu width=5 poly=0x15 init=0x00 refin=true refout=true xorout=0x00 check=0x07 name="CRC-5/ITU" -crc.cat.crc-5-usb width=5 poly=0x05 init=0x1f refin=true refout=true xorout=0x1f check=0x19 name="CRC-5/USB" -crc.cat-bits.6 width=6 poly=0x27 init=0x3f refin=false refout=false xorout=0x00 check=0x0d name="CRC-6/CDMA2000-A" -crc.cat.crc-6-cdma2000-b width=6 poly=0x07 init=0x3f refin=false refout=false xorout=0x00 check=0x3b name="CRC-6/CDMA2000-B" -crc.cat.crc-6-darc width=6 poly=0x19 init=0x00 refin=true refout=true xorout=0x00 check=0x26 name="CRC-6/DARC" -crc.cat.crc-6-itu width=6 poly=0x03 init=0x00 refin=true refout=true xorout=0x00 check=0x06 name="CRC-6/ITU" -crc.cat-bits.7 width=7 poly=0x09 init=0x00 refin=false refout=false xorout=0x00 check=0x75 name="CRC-7" -crc.cat.crc-7-rohc width=7 poly=0x4f init=0x7f refin=true refout=true xorout=0x00 check=0x53 name="CRC-7/ROHC" -crc.cat-bits.8 width=8 poly=0x07 init=0x00 refin=false refout=false xorout=0x00 check=0xf4 name="CRC-8" -crc.cat.crc-8-cdma2000 width=8 poly=0x9b init=0xff refin=false refout=false xorout=0x00 check=0xda name="CRC-8/CDMA2000" -crc.cat.crc-8-darc width=8 poly=0x39 init=0x00 refin=true refout=true xorout=0x00 check=0x15 name="CRC-8/DARC" -crc.cat.crc-8-dvb-s2 width=8 poly=0xd5 init=0x00 refin=false refout=false xorout=0x00 check=0xbc name="CRC-8/DVB-S2" -crc.cat.crc-8-ebu width=8 poly=0x1d init=0xff refin=true refout=true xorout=0x00 check=0x97 name="CRC-8/EBU" -crc.cat.crc-8-i-code width=8 poly=0x1d init=0xfd refin=false refout=false xorout=0x00 check=0x7e name="CRC-8/I-CODE" -crc.cat.crc-8-itu width=8 poly=0x07 init=0x00 refin=false refout=false xorout=0x55 check=0xa1 name="CRC-8/ITU" -crc.cat.crc-8-maxim width=8 poly=0x31 init=0x00 refin=true refout=true xorout=0x00 check=0xa1 name="CRC-8/MAXIM" -crc.cat.crc-8-rohc width=8 poly=0x07 init=0xff refin=true refout=true xorout=0x00 check=0xd0 name="CRC-8/ROHC" -crc.cat.crc-8-wdcma width=8 poly=0x9b init=0x00 refin=true refout=true xorout=0x00 check=0x25 name="CRC-8/WCDMA" -crc.cat-bits.10 width=10 poly=0x233 init=0x000 refin=false refout=false xorout=0x000 check=0x199 name="CRC-10" -crc.cat.crc-10-cdma2000 width=10 poly=0x3d9 init=0x3ff refin=false refout=false xorout=0x000 check=0x233 name="CRC-10/CDMA2000" -crc.cat-bits.11 width=11 poly=0x385 init=0x01a refin=false refout=false xorout=0x000 check=0x5a3 name="CRC-11" -crc.cat-bits.12 width=12 poly=0x80f init=0x000 refin=false refout=true xorout=0x000 check=0xdaf name="CRC-12/3GPP" -crc.cat.crc-12-cdma2000 width=12 poly=0xf13 init=0xfff refin=false refout=false xorout=0x000 check=0xd4d name="CRC-12/CDMA2000" -crc.cat.crc-12-dect width=12 poly=0x80f init=0x000 refin=false refout=false xorout=0x000 check=0xf5b name="CRC-12/DECT" -crc.cat-bits.13 width=13 poly=0x1cf5 init=0x0000 refin=false refout=false xorout=0x0000 check=0x04fa name="CRC-13/BBC" -crc.cat-bits.14 width=14 poly=0x0805 init=0x0000 refin=true refout=true xorout=0x0000 check=0x082d name="CRC-14/DARC" -crc.cat-bits.15 width=15 poly=0x4599 init=0x0000 refin=false refout=false xorout=0x0000 check=0x059e name="CRC-15" -crc.cat.crc-15-mpt1327 width=15 poly=0x6815 init=0x0000 refin=false refout=false xorout=0x0001 check=0x2566 name="CRC-15/MPT1327" -crc.cat-bits.16 width=16 poly=0x8005 init=0x0000 refin=true refout=true xorout=0x0000 check=0xbb3d name="ARC" -crc.cat.crc-16-aug-ccitt width=16 poly=0x1021 init=0x1d0f refin=false refout=false xorout=0x0000 check=0xe5cc name="CRC-16/AUG-CCITT" -crc.cat.crc-16-buypass width=16 poly=0x8005 init=0x0000 refin=false refout=false xorout=0x0000 check=0xfee8 name="CRC-16/BUYPASS" -crc.cat.crc-16-ccitt-false width=16 poly=0x1021 init=0xffff refin=false refout=false xorout=0x0000 check=0x29b1 name="CRC-16/CCITT-FALSE" -crc.cat.crc-16-cdma2000 width=16 poly=0xc867 init=0xffff refin=false refout=false xorout=0x0000 check=0x4c06 name="CRC-16/CDMA2000" -crc.cat.crc-16-dds-110 width=16 poly=0x8005 init=0x800d refin=false refout=false xorout=0x0000 check=0x9ecf name="CRC-16/DDS-110" -crc.cat.crc-16-dect-r width=16 poly=0x0589 init=0x0000 refin=false refout=false xorout=0x0001 check=0x007e name="CRC-16/DECT-R" -crc.cat.crc-16-dect-x width=16 poly=0x0589 init=0x0000 refin=false refout=false xorout=0x0000 check=0x007f name="CRC-16/DECT-X" -crc.cat.crc-16-dnp width=16 poly=0x3d65 init=0x0000 refin=true refout=true xorout=0xffff check=0xea82 name="CRC-16/DNP" -crc.cat.crc-16-en-13757 width=16 poly=0x3d65 init=0x0000 refin=false refout=false xorout=0xffff check=0xc2b7 name="CRC-16/EN-13757" -crc.cat.crc-16-genibus width=16 poly=0x1021 init=0xffff refin=false refout=false xorout=0xffff check=0xd64e name="CRC-16/GENIBUS" -crc.cat.crc-16-maxim width=16 poly=0x8005 init=0x0000 refin=true refout=true xorout=0xffff check=0x44c2 name="CRC-16/MAXIM" -crc.cat.crc-16-mcrf4xx width=16 poly=0x1021 init=0xffff refin=true refout=true xorout=0x0000 check=0x6f91 name="CRC-16/MCRF4XX" -crc.cat.crc-16-riello width=16 poly=0x1021 init=0xb2aa refin=true refout=true xorout=0x0000 check=0x63d0 name="CRC-16/RIELLO" -crc.cat.crc-16-t10-dif width=16 poly=0x8bb7 init=0x0000 refin=false refout=false xorout=0x0000 check=0xd0db name="CRC-16/T10-DIF" -crc.cat.crc-16-teledisk width=16 poly=0xa097 init=0x0000 refin=false refout=false xorout=0x0000 check=0x0fb3 name="CRC-16/TELEDISK" -crc.cat.crc-16-tms37157 width=16 poly=0x1021 init=0x89ec refin=true refout=true xorout=0x0000 check=0x26b1 name="CRC-16/TMS37157" -crc.cat.crc-16-usb width=16 poly=0x8005 init=0xffff refin=true refout=true xorout=0xffff check=0xb4c8 name="CRC-16/USB" -crc.cat.crc-a width=16 poly=0x1021 init=0xc6c6 refin=true refout=true xorout=0x0000 check=0xbf05 name="CRC-A" -crc.cat.kermit width=16 poly=0x1021 init=0x0000 refin=true refout=true xorout=0x0000 check=0x2189 name="KERMIT" -crc.cat.modbus width=16 poly=0x8005 init=0xffff refin=true refout=true xorout=0x0000 check=0x4b37 name="MODBUS" -crc.cat.x-25 width=16 poly=0x1021 init=0xffff refin=true refout=true xorout=0xffff check=0x906e name="X-25" -crc.cat.xmodem width=16 poly=0x1021 init=0x0000 refin=false refout=false xorout=0x0000 check=0x31c3 name="XMODEM" -crc.cat-bits.24 width=24 poly=0x864cfb init=0xb704ce refin=false refout=false xorout=0x000000 check=0x21cf02 name="CRC-24" -crc.cat.crc-24-flexray-a width=24 poly=0x5d6dcb init=0xfedcba refin=false refout=false xorout=0x000000 check=0x7979bd name="CRC-24/FLEXRAY-A" -crc.cat.crc-24-flexray-b width=24 poly=0x5d6dcb init=0xabcdef refin=false refout=false xorout=0x000000 check=0x1f23b8 name="CRC-24/FLEXRAY-B" -crc.cat-bits.31 width=31 poly=0x04c11db7 init=0x7fffffff refin=false refout=false xorout=0x7fffffff check=0x0ce9e46c name="CRC-31/PHILIPS" -crc.cat-bits.32 width=32 poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0xffffffff check=0xcbf43926 name="CRC-32" -crc.cat.crc-32-bzip2 width=32 poly=0x04c11db7 init=0xffffffff refin=false refout=false xorout=0xffffffff check=0xfc891918 name="CRC-32/BZIP2" -crc.cat.crc-32c width=32 poly=0x1edc6f41 init=0xffffffff refin=true refout=true xorout=0xffffffff check=0xe3069283 name="CRC-32C" -crc.cat.crc-32d width=32 poly=0xa833982b init=0xffffffff refin=true refout=true xorout=0xffffffff check=0x87315576 name="CRC-32D" -crc.cat.crc-32-mpeg-2 width=32 poly=0x04c11db7 init=0xffffffff refin=false refout=false xorout=0x00000000 check=0x0376e6e7 name="CRC-32/MPEG-2" -crc.cat.crc-32-posix width=32 poly=0x04c11db7 init=0x00000000 refin=false refout=false xorout=0xffffffff check=0x765e7680 name="CRC-32/POSIX" -crc.cat.crc-32q width=32 poly=0x814141ab init=0x00000000 refin=false refout=false xorout=0x00000000 check=0x3010bf7f name="CRC-32Q" -crc.cat.jamcrc width=32 poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0x00000000 check=0x340bc6d9 name="JAMCRC" -crc.cat.xfer width=32 poly=0x000000af init=0x00000000 refin=false refout=false xorout=0x00000000 check=0xbd0be338 name="XFER" -crc.cat-bits.40 width=40 poly=0x0004820009 init=0x0000000000 refin=false refout=false xorout=0xffffffffff check=0xd4164fc646 name="CRC-40/GSM" -crc.cat-bits.64 width=64 poly=0x42f0e1eba9ea3693 init=0x0000000000000000 refin=false refout=false xorout=0x0000000000000000 check=0x6c40df5f0b497347 name="CRC-64" -crc.cat.crc-64-we width=64 poly=0x42f0e1eba9ea3693 init=0xffffffffffffffff refin=false refout=false xorout=0xffffffffffffffff check=0x62ec59e3f1a4f00a name="CRC-64/WE" -crc.cat.crc-64-xz width=64 poly=0x42f0e1eba9ea3693 init=0xffffffffffffffff refin=true refout=true xorout=0xffffffffffffffff check=0x995dc9bbdf1939fa name="CRC-64/XZ" -crc.cat-bits.82 width=82 poly=0x0308c0111011401440411 init=0x000000000000000000000 refin=true refout=true xorout=0x000000000000000000000 check=0x09ea83f625023801fd612 name="CRC-82/DARC" +crc.cat.crc-3-rohc width=3 poly=0x3 init=0x7 refin=true refout=true xorout=0x0 check=0x6 residue=0x0 name="CRC-3/ROHC" +crc.cat-bits.3 width=3 poly=0x3 init=0x0 refin=false refout=false xorout=0x7 check=0x4 residue=0x2 name="CRC-3/GSM" +crc.cat-bits.4 width=4 poly=0x3 init=0xf refin=false refout=false xorout=0xf check=0xb residue=0x2 name="CRC-4/INTERLAKEN" +crc.cat.crc-4-itu width=4 poly=0x3 init=0x0 refin=true refout=true xorout=0x0 check=0x7 residue=0x0 name="CRC-4/ITU" +crc.cat-bits.5 width=5 poly=0x09 init=0x09 refin=false refout=false xorout=0x00 check=0x00 residue=0x00 name="CRC-5/EPC" +crc.cat.crc-5-itu width=5 poly=0x15 init=0x00 refin=true refout=true xorout=0x00 check=0x07 residue=0x00 name="CRC-5/ITU" +crc.cat.crc-5-usb width=5 poly=0x05 init=0x1f refin=true refout=true xorout=0x1f check=0x19 residue=0x06 name="CRC-5/USB" +crc.cat-bits.6 width=6 poly=0x27 init=0x3f refin=false refout=false xorout=0x00 check=0x0d residue=0x00 name="CRC-6/CDMA2000-A" +crc.cat.crc-6-cdma2000-b width=6 poly=0x07 init=0x3f refin=false refout=false xorout=0x00 check=0x3b residue=0x00 name="CRC-6/CDMA2000-B" +crc.cat.crc-6-darc width=6 poly=0x19 init=0x00 refin=true refout=true xorout=0x00 check=0x26 residue=0x00 name="CRC-6/DARC" +crc.cat.crc-6-gsm width=6 poly=0x2f init=0x00 refin=false refout=false xorout=0x3f check=0x13 residue=0x3a name="CRC-6/GSM" +crc.cat.crc-6-itu width=6 poly=0x03 init=0x00 refin=true refout=true xorout=0x00 check=0x06 residue=0x00 name="CRC-6/ITU" +crc.cat-bits.7 width=7 poly=0x09 init=0x00 refin=false refout=false xorout=0x00 check=0x75 residue=0x00 name="CRC-7" +crc.cat.crc-7-rohc width=7 poly=0x4f init=0x7f refin=true refout=true xorout=0x00 check=0x53 residue=0x00 name="CRC-7/ROHC" +crc.cat.crc-7-umts width=7 poly=0x45 init=0x00 refin=false refout=false xorout=0x00 check=0x61 residue=0x00 name="CRC-7/UMTS" +crc.cat-bits.8 width=8 poly=0x07 init=0x00 refin=false refout=false xorout=0x00 check=0xf4 residue=0x00 name="CRC-8" +crc.cat.crc-8-autosar width=8 poly=0x2f init=0xff refin=false refout=false xorout=0xff check=0xdf residue=0x42 name="CRC-8/AUTOSAR" +crc.cat.crc-8-cdma2000 width=8 poly=0x9b init=0xff refin=false refout=false xorout=0x00 check=0xda residue=0x00 name="CRC-8/CDMA2000" +crc.cat.crc-8-darc width=8 poly=0x39 init=0x00 refin=true refout=true xorout=0x00 check=0x15 residue=0x00 name="CRC-8/DARC" +crc.cat.crc-8-dvb-s2 width=8 poly=0xd5 init=0x00 refin=false refout=false xorout=0x00 check=0xbc residue=0x00 name="CRC-8/DVB-S2" +crc.cat.crc-8-ebu width=8 poly=0x1d init=0xff refin=true refout=true xorout=0x00 check=0x97 residue=0x00 name="CRC-8/EBU" +crc.cat.crc-8-gsm-a width=8 poly=0x1d init=0x00 refin=false refout=false xorout=0x00 check=0x37 residue=0x00 name="CRC-8/GSM-A" +crc.cat.crc-8-gsm-b width=8 poly=0x49 init=0x00 refin=false refout=false xorout=0xff check=0x94 residue=0x53 name="CRC-8/GSM-B" +crc.cat.crc-8-i-code width=8 poly=0x1d init=0xfd refin=false refout=false xorout=0x00 check=0x7e residue=0x00 name="CRC-8/I-CODE" +crc.cat.crc-8-itu width=8 poly=0x07 init=0x00 refin=false refout=false xorout=0x55 check=0xa1 residue=0xac name="CRC-8/ITU" +crc.cat.crc-8-lte width=8 poly=0x9b init=0x00 refin=false refout=false xorout=0x00 check=0xea residue=0x00 name="CRC-8/LTE" +crc.cat.crc-8-maxim width=8 poly=0x31 init=0x00 refin=true refout=true xorout=0x00 check=0xa1 residue=0x00 name="CRC-8/MAXIM" +crc.cat.crc-8-opensafety width=8 poly=0x2f init=0x00 refin=false refout=false xorout=0x00 check=0x3e residue=0x00 name="CRC-8/OPENSAFETY" +crc.cat.crc-8-rohc width=8 poly=0x07 init=0xff refin=true refout=true xorout=0x00 check=0xd0 residue=0x00 name="CRC-8/ROHC" +crc.cat.crc-8-sae-j1850 width=8 poly=0x1d init=0xff refin=false refout=false xorout=0xff check=0x4b residue=0xc4 name="CRC-8/SAE-J1850" +crc.cat.crc-8-wdcma width=8 poly=0x9b init=0x00 refin=true refout=true xorout=0x00 check=0x25 residue=0x00 name="CRC-8/WCDMA" +crc.cat-bits.10 width=10 poly=0x233 init=0x000 refin=false refout=false xorout=0x000 check=0x199 residue=0x000 name="CRC-10" +crc.cat.crc-10-cdma2000 width=10 poly=0x3d9 init=0x3ff refin=false refout=false xorout=0x000 check=0x233 residue=0x000 name="CRC-10/CDMA2000" +crc.cat.crc-10-gsm width=10 poly=0x175 init=0x000 refin=false refout=false xorout=0x3ff check=0x12a residue=0x0c6 name="CRC-10/GSM" +crc.cat-bits.11 width=11 poly=0x385 init=0x01a refin=false refout=false xorout=0x000 check=0x5a3 residue=0x000 name="CRC-11" +crc.cat.crc-11-umts width=11 poly=0x307 init=0x000 refin=false refout=false xorout=0x000 check=0x061 residue=0x000 name="CRC-11/UMTS" +crc.cat-bits.12 width=12 poly=0xf13 init=0xfff refin=false refout=false xorout=0x000 check=0xd4d residue=0x000 name="CRC-12/CDMA2000" +crc.cat.crc-12-dect width=12 poly=0x80f init=0x000 refin=false refout=false xorout=0x000 check=0xf5b residue=0x000 name="CRC-12/DECT" +crc.cat.crc-12-gsm width=12 poly=0xd31 init=0x000 refin=false refout=false xorout=0xfff check=0xb34 residue=0x178 name="CRC-12/GSM" +crc.cat.crc-12-umts width=12 poly=0x80f init=0x000 refin=false refout=true xorout=0x000 check=0xdaf residue=0x000 name="CRC-12/UMTS" +crc.cat-bits.13 width=13 poly=0x1cf5 init=0x0000 refin=false refout=false xorout=0x0000 check=0x04fa residue=0x0000 name="CRC-13/BBC" +crc.cat-bits.14 width=14 poly=0x0805 init=0x0000 refin=true refout=true xorout=0x0000 check=0x082d residue=0x0000 name="CRC-14/DARC" +crc.cat.crc-14-gsm width=14 poly=0x202d init=0x0000 refin=false refout=false xorout=0x3fff check=0x30ae residue=0x031e name="CRC-14/GSM" +crc.cat-bits.15 width=15 poly=0x4599 init=0x0000 refin=false refout=false xorout=0x0000 check=0x059e residue=0x0000 name="CRC-15" +crc.cat.crc-15-mpt1327 width=15 poly=0x6815 init=0x0000 refin=false refout=false xorout=0x0001 check=0x2566 residue=0x6815 name="CRC-15/MPT1327" +crc.cat-bits.16 width=16 poly=0x8005 init=0x0000 refin=true refout=true xorout=0x0000 check=0xbb3d residue=0x0000 name="ARC" +crc.cat.crc-16-aug-ccitt width=16 poly=0x1021 init=0x1d0f refin=false refout=false xorout=0x0000 check=0xe5cc residue=0x0000 name="CRC-16/AUG-CCITT" +crc.cat.crc-16-buypass width=16 poly=0x8005 init=0x0000 refin=false refout=false xorout=0x0000 check=0xfee8 residue=0x0000 name="CRC-16/BUYPASS" +crc.cat.crc-16-ccitt-false width=16 poly=0x1021 init=0xffff refin=false refout=false xorout=0x0000 check=0x29b1 residue=0x0000 name="CRC-16/CCITT-FALSE" +crc.cat.crc-16-cdma2000 width=16 poly=0xc867 init=0xffff refin=false refout=false xorout=0x0000 check=0x4c06 residue=0x0000 name="CRC-16/CDMA2000" +crc.cat.crc-16-cms width=16 poly=0x8005 init=0xffff refin=false refout=false xorout=0x0000 check=0xaee7 residue=0x0000 name="CRC-16/CMS" +crc.cat.crc-16-dds-110 width=16 poly=0x8005 init=0x800d refin=false refout=false xorout=0x0000 check=0x9ecf residue=0x0000 name="CRC-16/DDS-110" +crc.cat.crc-16-dect-r width=16 poly=0x0589 init=0x0000 refin=false refout=false xorout=0x0001 check=0x007e residue=0x0589 name="CRC-16/DECT-R" +crc.cat.crc-16-dect-x width=16 poly=0x0589 init=0x0000 refin=false refout=false xorout=0x0000 check=0x007f residue=0x0000 name="CRC-16/DECT-X" +crc.cat.crc-16-dnp width=16 poly=0x3d65 init=0x0000 refin=true refout=true xorout=0xffff check=0xea82 residue=0x66c5 name="CRC-16/DNP" +crc.cat.crc-16-en-13757 width=16 poly=0x3d65 init=0x0000 refin=false refout=false xorout=0xffff check=0xc2b7 residue=0xa366 name="CRC-16/EN-13757" +crc.cat.crc-16-genibus width=16 poly=0x1021 init=0xffff refin=false refout=false xorout=0xffff check=0xd64e residue=0x1d0f name="CRC-16/GENIBUS" +crc.cat.crc-16-gsm width=16 poly=0x1021 init=0x0000 refin=false refout=false xorout=0xffff check=0xce3c residue=0x1d0f name="CRC-16/GSM" +crc.cat.crc-16-lj1200 width=16 poly=0x6f63 init=0x0000 refin=false refout=false xorout=0x0000 check=0xbdf4 residue=0x0000 name="CRC-16/LJ1200" +crc.cat.crc-16-maxim width=16 poly=0x8005 init=0x0000 refin=true refout=true xorout=0xffff check=0x44c2 residue=0xb001 name="CRC-16/MAXIM" +crc.cat.crc-16-mcrf4xx width=16 poly=0x1021 init=0xffff refin=true refout=true xorout=0x0000 check=0x6f91 residue=0x0000 name="CRC-16/MCRF4XX" +crc.cat.crc-16-opensafety-a width=16 poly=0x5935 init=0x0000 refin=false refout=false xorout=0x0000 check=0x5d38 residue=0x0000 name="CRC-16/OPENSAFETY-A" +crc.cat.crc-16-opensafety-a width=16 poly=0x755b init=0x0000 refin=false refout=false xorout=0x0000 check=0x20fe residue=0x0000 name="CRC-16/OPENSAFETY-B" +crc.cat.crc-16-profibus width=16 poly=0x1dcf init=0xffff refin=false refout=false xorout=0xffff check=0xa819 residue=0xe394 name="CRC-16/PROFIBUS" +crc.cat.crc-16-riello width=16 poly=0x1021 init=0xb2aa refin=true refout=true xorout=0x0000 check=0x63d0 residue=0x0000 name="CRC-16/RIELLO" +crc.cat.crc-16-t10-dif width=16 poly=0x8bb7 init=0x0000 refin=false refout=false xorout=0x0000 check=0xd0db residue=0x0000 name="CRC-16/T10-DIF" +crc.cat.crc-16-teledisk width=16 poly=0xa097 init=0x0000 refin=false refout=false xorout=0x0000 check=0x0fb3 residue=0x0000 name="CRC-16/TELEDISK" +crc.cat.crc-16-tms37157 width=16 poly=0x1021 init=0x89ec refin=true refout=true xorout=0x0000 check=0x26b1 residue=0x0000 name="CRC-16/TMS37157" +crc.cat.crc-16-usb width=16 poly=0x8005 init=0xffff refin=true refout=true xorout=0xffff check=0xb4c8 residue=0xb001 name="CRC-16/USB" +crc.cat.crc-a width=16 poly=0x1021 init=0xc6c6 refin=true refout=true xorout=0x0000 check=0xbf05 residue=0x0000 name="CRC-A" +crc.cat.kermit width=16 poly=0x1021 init=0x0000 refin=true refout=true xorout=0x0000 check=0x2189 residue=0x0000 name="KERMIT" +crc.cat.modbus width=16 poly=0x8005 init=0xffff refin=true refout=true xorout=0x0000 check=0x4b37 residue=0x0000 name="MODBUS" +crc.cat.x-25 width=16 poly=0x1021 init=0xffff refin=true refout=true xorout=0xffff check=0x906e residue=0xf0b8 name="X-25" +crc.cat.xmodem width=16 poly=0x1021 init=0x0000 refin=false refout=false xorout=0x0000 check=0x31c3 residue=0x0000 name="XMODEM" +crc.cat-bits.24 width=24 poly=0x864cfb init=0xb704ce refin=false refout=false xorout=0x000000 check=0x21cf02 residue=0x000000 name="CRC-24" +crc.cat.crc-24-ble width=24 poly=0x00065b init=0x555555 refin=true refout=true xorout=0x000000 check=0xc25a56 residue=0x000000 name="CRC-24/BLE" +crc.cat.crc-24-flexray-a width=24 poly=0x5d6dcb init=0xfedcba refin=false refout=false xorout=0x000000 check=0x7979bd residue=0x000000 name="CRC-24/FLEXRAY-A" +crc.cat.crc-24-flexray-b width=24 poly=0x5d6dcb init=0xabcdef refin=false refout=false xorout=0x000000 check=0x1f23b8 residue=0x000000 name="CRC-24/FLEXRAY-B" +crc.cat.crc-24-interlaken width=24 poly=0x328b63 init=0xffffff refin=false refout=false xorout=0xffffff check=0xb4f3e6 residue=0x144e63 name="CRC-24/INTERLAKEN" +crc.cat.crc-24-lte-a width=24 poly=0x864cfb init=0x000000 refin=false refout=false xorout=0x000000 check=0xcde703 residue=0x000000 name="CRC-24/LTE-A" +crc.cat.crc-24-lte-b width=24 poly=0x800063 init=0x000000 refin=false refout=false xorout=0x000000 check=0x23ef52 residue=0x000000 name="CRC-24/LTE-B" +crc.cat-bits.30 width=30 poly=0x2030b9c7 init=0x3fffffff refin=false refout=false xorout=0x3fffffff check=0x04c34abf residue=0x34efa55a name="CRC-30/CDMA" +crc.cat-bits.31 width=31 poly=0x04c11db7 init=0x7fffffff refin=false refout=false xorout=0x7fffffff check=0x0ce9e46c residue=0x4eaf26f1 name="CRC-31/PHILIPS" +crc.cat-bits.32 width=32 poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0xffffffff check=0xcbf43926 residue=0xdebb20e3 name="CRC-32" +crc.cat.crc-32-autosar width=32 poly=0xf4acfb13 init=0xffffffff refin=true refout=true xorout=0xffffffff check=0x1697d06a residue=0x904cddbf name="CRC-32/AUTOSAR" +crc.cat.crc-32-bzip2 width=32 poly=0x04c11db7 init=0xffffffff refin=false refout=false xorout=0xffffffff check=0xfc891918 residue=0xc704dd7b name="CRC-32/BZIP2" +crc.cat.crc-32c width=32 poly=0x1edc6f41 init=0xffffffff refin=true refout=true xorout=0xffffffff check=0xe3069283 residue=0xb798b438 name="CRC-32C" +crc.cat.crc-32d width=32 poly=0xa833982b init=0xffffffff refin=true refout=true xorout=0xffffffff check=0x87315576 residue=0x45270551 name="CRC-32D" +crc.cat.crc-32-mpeg-2 width=32 poly=0x04c11db7 init=0xffffffff refin=false refout=false xorout=0x00000000 check=0x0376e6e7 residue=0x00000000 name="CRC-32/MPEG-2" +crc.cat.crc-32-posix width=32 poly=0x04c11db7 init=0x00000000 refin=false refout=false xorout=0xffffffff check=0x765e7680 residue=0xc704dd7b name="CRC-32/POSIX" +crc.cat.crc-32q width=32 poly=0x814141ab init=0x00000000 refin=false refout=false xorout=0x00000000 check=0x3010bf7f residue=0x00000000 name="CRC-32Q" +crc.cat.jamcrc width=32 poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0x00000000 check=0x340bc6d9 residue=0x00000000 name="JAMCRC" +crc.cat.xfer width=32 poly=0x000000af init=0x00000000 refin=false refout=false xorout=0x00000000 check=0xbd0be338 residue=0x00000000 name="XFER" +crc.cat-bits.40 width=40 poly=0x0004820009 init=0x0000000000 refin=false refout=false xorout=0xffffffffff check=0xd4164fc646 residue=0xc4ff8071ff name="CRC-40/GSM" +crc.cat-bits.64 width=64 poly=0x42f0e1eba9ea3693 init=0x0000000000000000 refin=false refout=false xorout=0x0000000000000000 check=0x6c40df5f0b497347 residue=0x0000000000000000 name="CRC-64" +crc.cat.crc-64-go-iso width=64 poly=0x000000000000001b init=0xffffffffffffffff refin=true refout=true xorout=0xffffffffffffffff check=0xb90956c775a41001 residue=0x5300000000000000 name="CRC-64/GO-ISO" +crc.cat.crc-64-we width=64 poly=0x42f0e1eba9ea3693 init=0xffffffffffffffff refin=false refout=false xorout=0xffffffffffffffff check=0x62ec59e3f1a4f00a residue=0xfcacbebd5931a992 name="CRC-64/WE" +crc.cat.crc-64-xz width=64 poly=0x42f0e1eba9ea3693 init=0xffffffffffffffff refin=true refout=true xorout=0xffffffffffffffff check=0x995dc9bbdf1939fa residue=0x49958c9abd7d353f name="CRC-64/XZ" +crc.cat-bits.82 width=82 poly=0x0308c0111011401440411 init=0x000000000000000000000 refin=true refout=true xorout=0x000000000000000000000 check=0x09ea83f625023801fd612 residue=0x000000000000000000000 name="CRC-82/DARC" diff --git a/pwnlib/util/crc/known.py b/pwnlib/util/crc/known.py index f50e3650a..ccea0320f 100644 --- a/pwnlib/util/crc/known.py +++ b/pwnlib/util/crc/known.py @@ -10,7 +10,7 @@ def generate(self): """ curdir, _ = os.path.split(__file__) - path = os.path.join(curdir, '..', 'data', 'crcsums.txt') + path = os.path.join(curdir, '..', '..', 'data', 'crcsums.txt') with open(path) as fd: data = fd.read() out = {} @@ -76,6 +76,15 @@ def fixup(s): 'refout': False, 'width': 10, 'xorout': 0}, + 'crc_10_gsm': {'check': 298, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-10-gsm', + 'name': 'crc_10_gsm', + 'poly': 373, + 'refin': False, + 'refout': False, + 'width': 10, + 'xorout': 1023}, 'crc_11': {'check': 1443, 'init': 26, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.11', @@ -85,18 +94,18 @@ def fixup(s): 'refout': False, 'width': 11, 'xorout': 0}, - 'crc_12_3gpp': {'check': 3503, + 'crc_11_umts': {'check': 97, 'init': 0, - 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.12', - 'name': 'crc_12_3gpp', - 'poly': 2063, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-11-umts', + 'name': 'crc_11_umts', + 'poly': 775, 'refin': False, - 'refout': True, - 'width': 12, + 'refout': False, + 'width': 11, 'xorout': 0}, 'crc_12_cdma2000': {'check': 3405, 'init': 4095, - 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-12-cdma2000', + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.12', 'name': 'crc_12_cdma2000', 'poly': 3859, 'refin': False, @@ -112,6 +121,24 @@ def fixup(s): 'refout': False, 'width': 12, 'xorout': 0}, + 'crc_12_gsm': {'check': 2868, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-12-gsm', + 'name': 'crc_12_gsm', + 'poly': 3377, + 'refin': False, + 'refout': False, + 'width': 12, + 'xorout': 4095}, + 'crc_12_umts': {'check': 3503, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-12-umts', + 'name': 'crc_12_umts', + 'poly': 2063, + 'refin': False, + 'refout': True, + 'width': 12, + 'xorout': 0}, 'crc_13_bbc': {'check': 1274, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.13', @@ -130,6 +157,15 @@ def fixup(s): 'refout': True, 'width': 14, 'xorout': 0}, + 'crc_14_gsm': {'check': 12462, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-14-gsm', + 'name': 'crc_14_gsm', + 'poly': 8237, + 'refin': False, + 'refout': False, + 'width': 14, + 'xorout': 16383}, 'crc_15': {'check': 1438, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.15', @@ -184,6 +220,15 @@ def fixup(s): 'refout': False, 'width': 16, 'xorout': 0}, + 'crc_16_cms': {'check': 44775, + 'init': 65535, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-cms', + 'name': 'crc_16_cms', + 'poly': 32773, + 'refin': False, + 'refout': False, + 'width': 16, + 'xorout': 0}, 'crc_16_dds_110': {'check': 40655, 'init': 32781, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-dds-110', @@ -238,6 +283,24 @@ def fixup(s): 'refout': False, 'width': 16, 'xorout': 65535}, + 'crc_16_gsm': {'check': 52796, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-gsm', + 'name': 'crc_16_gsm', + 'poly': 4129, + 'refin': False, + 'refout': False, + 'width': 16, + 'xorout': 65535}, + 'crc_16_lj1200': {'check': 48628, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-lj1200', + 'name': 'crc_16_lj1200', + 'poly': 28515, + 'refin': False, + 'refout': False, + 'width': 16, + 'xorout': 0}, 'crc_16_maxim': {'check': 17602, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-maxim', @@ -256,6 +319,33 @@ def fixup(s): 'refout': True, 'width': 16, 'xorout': 0}, + 'crc_16_opensafety_a': {'check': 23864, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-opensafety-a', + 'name': 'crc_16_opensafety_a', + 'poly': 22837, + 'refin': False, + 'refout': False, + 'width': 16, + 'xorout': 0}, + 'crc_16_opensafety_b': {'check': 8446, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-opensafety-a', + 'name': 'crc_16_opensafety_b', + 'poly': 30043, + 'refin': False, + 'refout': False, + 'width': 16, + 'xorout': 0}, + 'crc_16_profibus': {'check': 43033, + 'init': 65535, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-profibus', + 'name': 'crc_16_profibus', + 'poly': 7631, + 'refin': False, + 'refout': False, + 'width': 16, + 'xorout': 65535}, 'crc_16_riello': {'check': 25552, 'init': 45738, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-16-riello', @@ -310,6 +400,15 @@ def fixup(s): 'refout': False, 'width': 24, 'xorout': 0}, + 'crc_24_ble': {'check': 12737110, + 'init': 5592405, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-24-ble', + 'name': 'crc_24_ble', + 'poly': 1627, + 'refin': True, + 'refout': True, + 'width': 24, + 'xorout': 0}, 'crc_24_flexray_a': {'check': 7961021, 'init': 16702650, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-24-flexray-a', @@ -328,6 +427,42 @@ def fixup(s): 'refout': False, 'width': 24, 'xorout': 0}, + 'crc_24_interlaken': {'check': 11858918, + 'init': 16777215, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-24-interlaken', + 'name': 'crc_24_interlaken', + 'poly': 3312483, + 'refin': False, + 'refout': False, + 'width': 24, + 'xorout': 16777215}, + 'crc_24_lte_a': {'check': 13494019, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-24-lte-a', + 'name': 'crc_24_lte_a', + 'poly': 8801531, + 'refin': False, + 'refout': False, + 'width': 24, + 'xorout': 0}, + 'crc_24_lte_b': {'check': 2355026, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-24-lte-b', + 'name': 'crc_24_lte_b', + 'poly': 8388707, + 'refin': False, + 'refout': False, + 'width': 24, + 'xorout': 0}, + 'crc_30_cdma': {'check': 79907519, + 'init': 1073741823, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.30', + 'name': 'crc_30_cdma', + 'poly': 540064199, + 'refin': False, + 'refout': False, + 'width': 30, + 'xorout': 1073741823}, 'crc_31_philips': {'check': 216654956, 'init': 2147483647, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.31', @@ -346,6 +481,15 @@ def fixup(s): 'refout': True, 'width': 32, 'xorout': 4294967295}, + 'crc_32_autosar': {'check': 379048042, + 'init': 4294967295, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-32-autosar', + 'name': 'crc_32_autosar', + 'poly': 4104977171, + 'refin': True, + 'refout': True, + 'width': 32, + 'xorout': 4294967295}, 'crc_32_bzip2': {'check': 4236843288, 'init': 4294967295, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-32-bzip2', @@ -400,9 +544,18 @@ def fixup(s): 'refout': False, 'width': 32, 'xorout': 0}, + 'crc_3_gsm': {'check': 4, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.3', + 'name': 'crc_3_gsm', + 'poly': 3, + 'refin': False, + 'refout': False, + 'width': 3, + 'xorout': 7}, 'crc_3_rohc': {'check': 6, 'init': 7, - 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.3', + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-3-rohc', 'name': 'crc_3_rohc', 'poly': 3, 'refin': True, @@ -418,9 +571,18 @@ def fixup(s): 'refout': False, 'width': 40, 'xorout': 1099511627775}, + 'crc_4_interlaken': {'check': 11, + 'init': 15, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.4', + 'name': 'crc_4_interlaken', + 'poly': 3, + 'refin': False, + 'refout': False, + 'width': 4, + 'xorout': 15}, 'crc_4_itu': {'check': 7, 'init': 0, - 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.4', + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-4-itu', 'name': 'crc_4_itu', 'poly': 3, 'refin': True, @@ -463,6 +625,15 @@ def fixup(s): 'refout': False, 'width': 64, 'xorout': 0}, + 'crc_64_go_iso': {'check': 13333283586479230977L, + 'init': 18446744073709551615L, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-64-go-iso', + 'name': 'crc_64_go_iso', + 'poly': 27, + 'refin': True, + 'refout': True, + 'width': 64, + 'xorout': 18446744073709551615L}, 'crc_64_we': {'check': 7128171145767219210, 'init': 18446744073709551615L, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-64-we', @@ -508,6 +679,15 @@ def fixup(s): 'refout': True, 'width': 6, 'xorout': 0}, + 'crc_6_gsm': {'check': 19, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-6-gsm', + 'name': 'crc_6_gsm', + 'poly': 47, + 'refin': False, + 'refout': False, + 'width': 6, + 'xorout': 63}, 'crc_6_itu': {'check': 6, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-6-itu', @@ -535,6 +715,15 @@ def fixup(s): 'refout': True, 'width': 7, 'xorout': 0}, + 'crc_7_umts': {'check': 97, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-7-umts', + 'name': 'crc_7_umts', + 'poly': 69, + 'refin': False, + 'refout': False, + 'width': 7, + 'xorout': 0}, 'crc_8': {'check': 244, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat-bits.8', @@ -553,6 +742,15 @@ def fixup(s): 'refout': True, 'width': 82, 'xorout': 0}, + 'crc_8_autosar': {'check': 223, + 'init': 255, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-autosar', + 'name': 'crc_8_autosar', + 'poly': 47, + 'refin': False, + 'refout': False, + 'width': 8, + 'xorout': 255}, 'crc_8_cdma2000': {'check': 218, 'init': 255, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-cdma2000', @@ -589,6 +787,24 @@ def fixup(s): 'refout': True, 'width': 8, 'xorout': 0}, + 'crc_8_gsm_a': {'check': 55, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-gsm-a', + 'name': 'crc_8_gsm_a', + 'poly': 29, + 'refin': False, + 'refout': False, + 'width': 8, + 'xorout': 0}, + 'crc_8_gsm_b': {'check': 148, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-gsm-b', + 'name': 'crc_8_gsm_b', + 'poly': 73, + 'refin': False, + 'refout': False, + 'width': 8, + 'xorout': 255}, 'crc_8_i_code': {'check': 126, 'init': 253, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-i-code', @@ -607,6 +823,15 @@ def fixup(s): 'refout': False, 'width': 8, 'xorout': 85}, + 'crc_8_lte': {'check': 234, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-lte', + 'name': 'crc_8_lte', + 'poly': 155, + 'refin': False, + 'refout': False, + 'width': 8, + 'xorout': 0}, 'crc_8_maxim': {'check': 161, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-maxim', @@ -616,6 +841,15 @@ def fixup(s): 'refout': True, 'width': 8, 'xorout': 0}, + 'crc_8_opensafety': {'check': 62, + 'init': 0, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-opensafety', + 'name': 'crc_8_opensafety', + 'poly': 47, + 'refin': False, + 'refout': False, + 'width': 8, + 'xorout': 0}, 'crc_8_rohc': {'check': 208, 'init': 255, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-rohc', @@ -625,6 +859,15 @@ def fixup(s): 'refout': True, 'width': 8, 'xorout': 0}, + 'crc_8_sae_j1850': {'check': 75, + 'init': 255, + 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-sae-j1850', + 'name': 'crc_8_sae_j1850', + 'poly': 29, + 'refin': False, + 'refout': False, + 'width': 8, + 'xorout': 255}, 'crc_8_wcdma': {'check': 37, 'init': 0, 'link': 'http://reveng.sourceforge.net/crc-catalogue/all.htm#crc.cat.crc-8-wdcma',