With this tool you can generate a string composed of unique pattern that you can use to replace the sequence of A's of the desired length.
To calculate the offset of an address, paste the value of the overwritten register (EIP
, RIP
, RAX
…) in the "Register value" field.
This online tool supports 32-bit and 64-bit registers.