Skip to main content

atmos_efil 0.1.0 copy "atmos_efil: ^0.1.0" to clipboard
atmos_efil: ^0.1.0 copied to clipboard

Pure-Dart editor for executable images (ELF and PE/COFF, with Mach-O identification) by Atom735.

atmos_efil #

Русский: README_RU.md.

Pure-Dart editor for executable images. elif is file backwards: load an ELF or PE file, change the entry point, replace a section with bytes of the same length, and write the image back.

Mach-O is recognized and not edited in this version.

Install #

dependencies:
  atmos_efil: ^0.1.0

Quick start #

import 'dart:typed_data';

import 'package:atmos_efil/atmos_efil.dart';

void edit(Uint8List bytes) {
  final image = openExecutable(bytes);
  print(identifyExecutable(bytes)); // ExecutableFormat.elf or .pe
  print(image.entryPoint);

  image.entryPoint += 1;
  final text = image.sectionByName('.text');
  if (text != null) {
    final patched = text.bytes;
    patched[0] = 0x90;
    text.writeBytes(patched);
  }

  final edited = image.toBytes();
}

writeBytes refuses a list whose length differs from the section. Resizing a section would move every later file offset, and this version does not do that rewrite.

Values above 2^53 lose low bits on the web. The VM keeps the full integer.

Reads and writes go through atmos_binary_buffer.

License #

BSD 3-Clause — see LICENSE.

0
likes
150
points
649
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Pure-Dart editor for executable images (ELF and PE/COFF, with Mach-O identification) by Atom735.

Repository (GitHub)
View/report issues

Topics

#elf #pe #executable #binary

License

BSD-3-Clause (license)

Dependencies

atmos_binary_buffer

More

Packages that depend on atmos_efil