Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace srec2bin dependency with srec_cat #765

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions dependencies/src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ make install
cd /tmp
rm -rf /tmp/dmg2img

# Install srec2bin
mkdir /tmp/srec
cd /tmp/srec
wget https://www.goffart.co.uk/s-record/download/srec_151_src.zip
unzip srec_151_src.zip
make
cp srec2bin /usr/local/bin/
cd /tmp
rm -rf /tmp/srec

# Install latest version of 7z (static) for APFS support
mkdir /tmp/7z
cd /tmp/7z
Expand Down
1 change: 1 addition & 0 deletions dependencies/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SCRIPT_DIRECTORY=$(dirname -- "$( readlink -f -- "$0"; )")
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install \
7zip \
zstd \
srecord \
tar \
unzip \
sleuthkit \
Expand Down
8 changes: 5 additions & 3 deletions src/extractors/srec.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::extractors;

/// Describes how to run the srec2bin utility to convert Motorola S-records to binary
/// Describes how to run the srec_cat utility to convert Motorola S-records to binary
///
/// ```
/// use std::io::ErrorKind;
Expand All @@ -24,11 +24,13 @@ use crate::extractors;
/// ```
pub fn srec_extractor() -> extractors::common::Extractor {
extractors::common::Extractor {
utility: extractors::common::ExtractorType::External("srec2bin".to_string()),
utility: extractors::common::ExtractorType::External("srec_cat".to_string()),
extension: "hex".to_string(),
arguments: vec![
extractors::common::SOURCE_FILE_PLACEHOLDER.to_string(),
"-output".to_string(),
"s-record.bin".to_string(),
"-binary".to_string(),
extractors::common::SOURCE_FILE_PLACEHOLDER.to_string(),
],
exit_codes: vec![0],
..Default::default()
Expand Down