Skip to main content

Questions tagged [base64]

Questions about encoding/decoding file or stdin by using base64

0 votes
2 answers
781 views

How to base64 encode/decode accents characters [closed]

I am trying to base64 encode a string which contains accent characters. echo FILE_DATE.Ç | iconv -t utf-8 | base64 But it is giving error iconv: (stdin):1:10: cannot convert locale outputs: LANG= ...
Umesh Kumar's user avatar
2 votes
2 answers
2k views

I used to not need "-i" when using base64

I am using macOs 13.6.1 (22G313) for a machine. I used to be able to base64 a .p12 file (maybe 1 - 3 years ago) using the following format from the terminal: base64 mastercard-track.p12 > ...
Zack Macomber's user avatar
0 votes
1 answer
1k views

How to make base64 print the encoded output after a newline without newline being encoded?

I like to encode with base64 from stdin by invoking the command pasting the input and pressing Ctrl + D twice in order to avoid a trailing newline if I don't want one to be part of the input. It ...
Kalle Richter's user avatar
1 vote
1 answer
1k views

How to decode base64-encoded inline attachments in email files saved from Thunderbird or Gmail?

Although base64 [--decode] works well when encoding and decoding files locally, I can't decode a base64-encoded inline attachment in an eml file saved from Thunderbird or Gmail. I observed that base64-...
Sadi's user avatar
  • 525
8 votes
1 answer
1k views

Why is 0x00 being deleted when assigning a base64 decoded string to a variable

I'm using a Mac. In Bash, I'm trying to decode a base64 string and then try to print the Hex value. I'm using base64 -d command and then assigning it to a variable. myText='YYN29+...
SilleBille's user avatar
0 votes
0 answers
104 views

Google Cloud does not like my Customer-supplied encryption key (CSEK)

I'm trying to encrypt a VM image with my own provided key. So I go to my Terminal emulator and do: $ openssl enc -aes256 -A -P enter aes-256-cbc encryption password: Verifying - ...
mariano-daniel's user avatar
0 votes
2 answers
553 views

Replace a base64 value from file

I have one file which is gets details from ldapsearch command and create file as below # lschuler, people, pl.s2-eu.XXXXXXXXX.local dn: uid=lschuler,ou=people,dc=pl,dc=s2-eu,dc=XXXXXXXXX,dc=local ...
Samurai's user avatar
  • 95
0 votes
1 answer
2k views

Trying to decode base64 from curl, but I get "base64: invalid input"

Trying to decode base64 from curl, but I get "base64: invalid input". ➜ curl -s 'preprod-payroll.trick.htb/index.php?page=php://filter/convert.base64-encode/resource=home' | grep -A 1 '<...
R4J's user avatar
  • 1
3 votes
1 answer
4k views

How to decode base64 for both Linux and macOS?

On Linux I can do: echo ${ANDROID_KEYSTORE} | base64 -di > android/keystores/staging.keystore But on macOS, the same commands give: base64: option requires an argument -- i Usage: base64 [-hvDd] [...
Dimitri Kopriwa's user avatar
0 votes
1 answer
819 views

How to force base64 encoding for s-nail attachments?

I have a job that picks up CSV files and sends them through an external mail service. Everything seems to be great, with one exception: I found that the windows style CRLF CSV files get mangled by ...
lopass's user avatar
  • 79
0 votes
0 answers
566 views

base64 decode as save as multiple files

I have a file(har file saved from web developer" that contains the base64 encoded value of multiple video*.ts files. I am interested to decode the base64 part and save as multiple ts files if the ...
maneesh murali's user avatar
0 votes
3 answers
339 views

Replace a timestamp Base64 value in a file

I have a problem, I have a file test.txt that has a content like this: dn: serv=CSPS,mscId=167e48dc2b7a42d4acce611c8b477262,ou=multiSCs,dc=three structuralObjectClass: CP1 objectClass: CP1 objectClass:...
Sergio Jimenez's user avatar
-1 votes
1 answer
14k views

base64: invalid input error when trying to decode contents of yaml file

What specific syntax must be changed in the bash below to successfully decode the base64 encoded value which is throwing the error below? THE ERROR: The following 3 simple commands are typed into the ...
CodeMed's user avatar
  • 5,377
3 votes
4 answers
2k views

Replace a base64 value in a file in unix

I have a problem, I have a file test.txt that has a content like this: objectClass: CPM1 objectClass: CPM2 objectClass: CPM3 objectClass: CPM4 objectClass: CPZ objectClass: CP04s objectClass: CP0A ...
Sergio Jimenez's user avatar
3 votes
1 answer
2k views

running base64 encoded bash script gives me error

I have a bash script; the script is to generate a random number and have the user guess it. printf 'Guess the number (1-10) : ' read -r n randint=$(( ( RANDOM % 10 ) + 1 )) if [ $n = $randint ]; then ...
ghost21blade's user avatar

15 30 50 per page