flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 30 Nov 2017, 23:28
I assume this is for Linux?
Maybe you could extend it to a byte sequence locator. |
|||
![]() |
|
greco558 30 Nov 2017, 23:57
Yes it is for Linux.
Good idea about sequence locater. I will have to get to work on it. Thanks John |
|||
![]() |
|
greco558 04 Dec 2017, 20:34
Cleaned up old version noticed some of the comments in source code were from bytect program.
Added the ability to search for BYTE, WORD or DWORD in file. Still need to add more error checking. using command line option switchs: -b for byte search -w fro word search -d for double word search. ./bytelc -f filename -b e8 ./bytelc -f filename -w e8ff ./bytelc -f filename -d e8ff3479 Best Regards John
|
|||||||||||
![]() |
|
revolution 04 Dec 2017, 23:40
Good.
Can it search for arbitrary length strings? |
|||
![]() |
|
greco558 04 Dec 2017, 23:57
Hi Revolution,
I am working on that and will post update. I figured I would post the version that can search for up to a double Word length. It will take me a few days to implement arbitrary lengths. I don't get to program in assembly often and working on this will help me to stay involved in Assembly language. Best Regards John |
|||
![]() |
|
greco558 05 Dec 2017, 19:22
Ok here it is the revised version to replace bytelc.
I eliminated the -b byte, -w word, and -d dword options and replaced with 1 switch option for byte sequence search -s. This program bytesq will take arbitrary length hex bytes entered on command line. You can have your byte sequence on command line first as in the 2nd example shown below it does not matter. Example: ./btyesq -f filename -s e83d789723eff856636d646c696e ./bytesq -s 45ffef586c -f filename ./bytesq -f filename -s e8 you can enter 1 hex byte or 15 hex bytes or more on command line after -s switch. you are limited to 128 hex byte sequence but that is pretty long sequence of bytes to search for. Best Regards John
|
|||||||||||
![]() |
|
donn 05 Dec 2017, 22:37
Cool, one use may be to compute the size of a sequence of instructions. I can't calculate them in my head yet. This might be possible by defining a searchable string before the instructions and a separate one after, then subtracting..? I've been subtracting them with labels then writing to a file, which requires some overhead.
I'm not using Linux at the moment, but found out that the new Win 10 update supports Linux installs such as Ubuntu and OpenSUSE. I tried running the executable but got Code: donn@PC:/mnt/c/Users/donn/Downloads/bytesq> ./bytesq -bash: ./bytesq: cannot execute binary file: Exec format error The Win 10 Linux doesn't include the Linux kernel I think, so this might not be possible. May just be a matter of porting or re-assembling, can take another look later. |
|||
![]() |
|
greco558 06 Dec 2017, 12:01
Thanks donn,
I don't do a lot of programming in windows anymore, for a while if i wrote something in Linux i would write the same program for Windows have not done that for a while now. If I find some time maybe I will try to re-write this for Windows, its not a very big program to have to translate to Windows platform. Best Regards John |
|||
![]() |
|
greco558 25 Jul 2018, 18:04
Updated bytesq program and added option -t to search for text in binary file.
Linux command line options: -t <text to look for> -x <hex byte sequence to look for> examples: ./bytesq -f filename -t version ./bytesq -f filename -x 04FFAD864C with -t option if you are searching for a string of text, place string in quotation marks exp. -t "i am looking for this" you can enter "./bytesq -h" to get help about command line options Best Regards John
|
|||||||||||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.