cryptii icon indicating copy to clipboard operation
cryptii copied to clipboard

New "insert text/bytes" brick

Open TooMuchBlue opened this issue 7 years ago • 1 comments

I would find it useful to have a step that adds additional text (or bytes) at the beginning or end of the input so far. The use-case I'm trying to solve today is

Text (Base64 encoded string of salt) -> Base64 decode -> (New brick) Insert text at end (the password) -> Hash SHA1 -> Base64 encode -> Text output

If you provide some options, this could also be used to add padding. Options would include

  • "add N times" (the default choice, add the exact text N times, default 1)
  • "add until length is a multiple of N" (If the input string is longer than needed, add only part of the string. If the input string is not long enough, add repeatedly until the length is reached.) and if you really want to be fancy:
  • "add length of input value as" text or byte or word or dword or qword

TooMuchBlue avatar Dec 18 '18 18:12 TooMuchBlue

Thank you for bringing up your use case. I definitely consider introducing a brick for appending content at the beginning or end of the payload. I'll get back to you when I start the implementation of it.

ffraenz avatar Dec 21 '18 16:12 ffraenz