Lister: "Search hex string" should inform of incorrect text

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Lister: "Search hex string" should inform of incorrect text

Post by *Slavic »

Search hex string is a good option when we need to find a binary sequence in a file. However, it does not always inform about unsuccessful result. This happens when the text sample, input in the search box, cannot be properly converted to hex values, often by mistake or mistype.

For example, let open for view the file HISTORY.TXT from TC, set the hex string search mode and input the text: 0d0a32
Lister immediately finds the first line starting from symbol "2": 0d0a is CRLF (next line), 32 is hex code of "2".
Modify the search text to odoa32 (replace zero with small letter "o" in 2 places).
Lister informs that text is not found, it looks like correct result, but the sample text is not a hex sequence.
Modify the search to od0a32 (replace only first zero with "o"). Lister finds nothing and shows no error. This is definitely wrong.

Lister should check that search text can be converted to hex characters and inform about error, which will allow a user to easily fix the mistake. In particular, both odoa32 and od0a32 should result in the same error message.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3299
Joined: 2003-05-06, 11:46 UTC

Re: Lister: "Search hex string" should inform of incorrect text

Post by *Sir_SiLvA »

Slavic wrote: 2024-02-06, 17:30 UTC Lister informs that text is not found, it looks like correct result, but the sample text is not a hex sequence.
Sorry thats a "you-problem". You should be able to insert a correct code and not make it TCs job if you are able to do so :!:
Otherwise you want next TC to check if a user enters reg-ex correcty, etc
Slavic wrote: 2024-02-06, 17:30 UTCModify the search to od0a32 (replace only first zero with "o"). Lister finds nothing and shows no error. This is definitely wrong.
This is correct and should be fixed.
I doesnt give an error message but still makes an error PING-sound.
Hoecker sie sind raus!
browny
Senior Member
Senior Member
Posts: 288
Joined: 2007-09-10, 13:19 UTC

Re: Lister: "Search hex string" should inform of incorrect text

Post by *browny »

Sir_SiLvA wrote: 2024-02-06, 18:41 UTC Sorry thats a "you-problem".
Incorrect. Basic input checking is a common and preferable practice.
Sir_SiLvA wrote: 2024-02-06, 18:41 UTC Otherwise you want next TC to check if a user enters reg-ex correcty, etc
This is covered; there would be a messagebox in case of a bad regular expression.
Slavic wrote: 2024-02-06, 17:30 UTC I doesnt give an error message but still makes an error PING-sound.
Sound-only diagnostic is not that great; visual indication is more natural - because it is GUI.
Post Reply