Giter Club home page Giter Club logo

delsum's People

Contributors

8051enthusiast avatar dtolnay avatar ffy00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

delsum's Issues

Crashing on `delsum reverse`

$ RUST_BACKTRACE=full delsum reverse -m 'crc width=32 poly=0x4c11db7 init=0xffffffff xorout=0xffffffff' -c 5D58A73F,C4B48B8E,F4EFC517,AEFADCE9 *.bin
stack backtrace:
   0:     0x55663918a410 - std::backtrace_rs::backtrace::libunwind::trace::h3244117ea50123fe
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
   1:     0x55663918a410 - std::backtrace_rs::backtrace::trace_unsynchronized::h68c610493487144f
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66
   2:     0x55663918a410 - std::sys_common::backtrace::_print_fmt::h98a015f47bac7d62
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/sys_common/backtrace.rs:79
   3:     0x55663918a410 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc852ad3e88e43049
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/sys_common/backtrace.rs:58
   4:     0x5566391a5edc - core::fmt::write::h5437b03347b2ec7a
                               at /build/rust/src/rustc-1.48.0-src/library/core/src/fmt/mod.rs:1080
   5:     0x556639187145 - std::io::Write::write_fmt::h1c132b3b8a60ce2f
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/io/mod.rs:1516
   6:     0x55663918c7fd - std::sys_common::backtrace::_print::hdfae0c73b5d1550a
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/sys_common/backtrace.rs:61
   7:     0x55663918c7fd - std::sys_common::backtrace::print::h846d8b35d353226f
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/sys_common/backtrace.rs:48
   8:     0x55663918c7fd - std::panicking::default_hook::{{closure}}::h611a677a9567debb
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:208
   9:     0x55663918c4a8 - std::panicking::default_hook::hfc5e7967f3ac8efb
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:227
  10:     0x55663918cee1 - std::panicking::rust_panic_with_hook::h86da1db1d0779194
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:577
  11:     0x5566390c70fc - std::panicking::begin_panic::{{closure}}::h9f714e109b8ee093
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:506
  12:     0x5566390c62c9 - std::sys_common::backtrace::__rust_end_short_backtrace::h9d872424d8ca7f6a
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/sys_common/backtrace.rs:153
  13:     0x5566390c7027 - std::panicking::begin_panic::ha839368c295f54c4
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:505
  14:     0x556638fa3a0a - delsum_lib::find_algorithm::h10900193752313ea
                               at /home/anubis/git/delsum/delsum-lib/src/lib.rs:267
  15:     0x556638be77c7 - delsum::reverse::{{closure}}::h63c2e7b2193d5332
                               at /home/anubis/git/delsum/src/bin.rs:25
  16:     0x556638be7e53 - delsum::reverse::{{closure}}::h43a7680c177ca232
                               at /home/anubis/git/delsum/src/bin.rs:47
  17:     0x556638bb0157 - <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::for_each::h5387447c4f01e632
                               at /build/rust/src/rustc-1.48.0-src/library/core/src/slice/iter/macros.rs:203
  18:     0x556638b91b26 - delsum::reverse::h6c213b38fb9cf4db
                               at /home/anubis/git/delsum/src/bin.rs:46
  19:     0x556638b91883 - delsum::main::hb3e02f305410719c
                               at /home/anubis/git/delsum/src/bin.rs:15
  20:     0x556638bfa5bb - core::ops::function::FnOnce::call_once::h6f5d4ec0750029df
                               at /build/rust/src/rustc-1.48.0-src/library/core/src/ops/function.rs:227
  21:     0x556638b9b1ee - std::sys_common::backtrace::__rust_begin_short_backtrace::h13fb86221e94b6af
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/sys_common/backtrace.rs:137
  22:     0x556638b9a601 - std::rt::lang_start::{{closure}}::hd6aa401195fe1aa2
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/rt.rs:66
  23:     0x55663918d3f7 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hba2eeded6e43561f
                               at /build/rust/src/rustc-1.48.0-src/library/core/src/ops/function.rs:259
  24:     0x55663918d3f7 - std::panicking::try::do_call::h2d2f9a7ece5d85e2
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:381
  25:     0x55663918d3f7 - std::panicking::try::he67fa7d0004e7010
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panicking.rs:345
  26:     0x55663918d3f7 - std::panic::catch_unwind::h61fcdf94f063131b
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/panic.rs:382
  27:     0x55663918d3f7 - std::rt::lang_start_internal::h0c3b9dc1678c8c77
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/rt.rs:51
  28:     0x556638b9a5d7 - std::rt::lang_start::h5bbfd59f1a9e08a2
                               at /build/rust/src/rustc-1.48.0-src/library/std/src/rt.rs:65
  29:     0x556638b953da - main
  30:     0x7fd73085d152 - __libc_start_main
  31:     0x556638b8c2ee - _start
  32:                0x0 - <unknown>

firmware-steelseries-rival-310.zip

Is this tool still compatible?

I noticed it's been a few years since the last release. Not sure if I'm doing something wrong in the installation. Using Cargo I get an error with funty

failed to select a version for the requirement "funty" = 1.2

unclear how to make use of this

In your article about IT8586E reversing, the checksum calculation procedure is unclear.

You say poly is 0x8005. I downloaded two EC dumps for the 15IKB device, one is actual dump, other is extracted from BIOS update file.

The delsum tool seems to work fine as i get same results with it as with windows HxD editor.
However, inputting 0x8005 and all other parameters as you suggest i end up with checksum that does not exist anywhere in EC dump.
Can you explain this part better? Is the checksum location in dump known and does it need to be cleared to FF before calculating checksum?

Support changing the handled data size

I am working with a CRC algorithm found in STM32.

Python algorithm:

words = struct.unpack('I'*data_len, data)  # unpack into 4 byte words

crc = 0xFFFFFFFF

for word in words:
    crc ^= word
    for _ in range(32):  # 0 .. 31
        if crc & 0x80000000:  # 32th bit is set
            crc = (crc << 1) ^ 0x04C11DB7
        else:
            crc = (crc << 1)
    crc &= 0xFFFFFFFF

# crc should hold the final value now

This is the algorithm implemented by the CRC peripheral. The description should be on page 6 of AN4187.

It looks to me like it is a derivation of the standard CRC algorithm but with a different size for the handled data. 32 bits instead of 8, correct?

If so, would it be possible to support this option?

Problem with reversing checksum algorithm of protocol messages

Hi, I have several ICMP messages and want to reverse the checksum algorithm of these messages using delsum. Here are some messages, shown in hex

08004ab69c480007648b1224000eaf3908090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
080038fa9c480008648b1225000ec0f308090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
080027409c480009648b1226000ed2ab08090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637

Since the checksum file of ICMP is 2-3 bytes (starting from 0).
First, I tried to convert each hex stream to a file, e.g., echo "08004ab69c480007648b1224000eaf3908090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637" | xxd -r -p > file1.

Then, I tried delsum by command

delsum reverse -m 'crc width=16 init=0' -c b64a,fa38,4027 file1 file2 file3

But there is no output. I'm not sure if I'm using delsum correctly. Could you please help me? Thanks so much.

4Bit checksum possible?

It is more a question than an issue, but I haven't found that information. Interpretation of that output

./delsum reverse -m 'crc width=4' -c E,D,8 file_a file_b file_c

Could not read checksums: Odd number of digits

makes me believe that it isn't at the moment.

Second in README.md it is given this example of part:

$ delsum check -m 'modsum width=16 module=ffff' -c 1234,5678,abcd file_a file_b file_c
modsum width=16 module=ffff:
    0x8:-0x3

I think the code should be:
$ delsum **part** -m 'modsum width=16 module=ffff' -c 1234,5678,abcd file_a file_b file_c

The same is for reverse where it is written:

$ delsum check -m 'crc width=32' -c 700b14f5,e1207917,79741cb2 file_a file_b file_c

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.