Need someone to decrypt an encoded text


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Need someone to decrypt an encoded text
# 8  
Old 08-25-2014
openssl is a little picky about line length. All lines but the last have to be exactly 64 characters long. The base64 utility is more tolerant. Read more here
# 9  
Old 08-25-2014
Marco,

I'm running out at the moment so can't troubleshoot this for you but a great place to look would be to google "bash loops" (at least for me the first hit has your answer).

Best of luck I know you'll get it!
# 10  
Old 08-25-2014
ok thanks you, i will search and if i don't found nothing you will come to help me ok? thanks you very much Smilie bye
# 11  
Old 08-25-2014
Quote:
Originally Posted by supermarco2020
for me isn't very fun, but... i have tried to do this little script:

i=0 while (( i++ < 50 )); base64 -d /Users/Supermarco/Desktop/a.txt > /Users/Supermarco/Desktop/b.txt but it tells me that: -bash: syntax error near unexpected token `('

and without the (()) it decrypt it for me one time only, what i have to put on?
The correct syntax for a while loop would be:
Code:
i=0
while (( i++ < 50 ))
do
    # commands go here
done

# 12  
Old 08-25-2014
thanks you very much, and where i put AfB21= ?

Code:
echo AfB21= >> /Users/Supermarco/Desktop/2.txt; done

a script like this:

Code:
i=0
while (( i++ < 50 ))
do
   base64 -d /Users/Supermarco/Desktop/1.txt > /Users/Supermarco/Desktop/2.txt; 
   echo AfB21= >> /Users/Supermarco/Desktop/1.txt; 
done

but it doesn't decrypt it but only write 50 times AfB21= , how i can decode them and after it writes AfB21= ?

Last edited by vbe; 08-25-2014 at 11:08 AM..
# 13  
Old 08-25-2014
I can't see what you are trying to accomplish with this. In a base64 encoded file, characters always show up in groups of four. After decoding they yield three characters of cleartext. Everything else does not work.

The equal sign is also a filler, only allowed at the end of the encoded text, to make sure, the encoded text is a multiple of 4 characters.

Also, overwriting the output file 50 times does not make much sense. If the appending of AfB21= would make sense, you better append it 50 times and then decode once.
# 14  
Old 08-25-2014
Code:
i=0
while (( i++ < 50 ))
do
   base64 -d /Users/Supermarco/Desktop/1.txt > /Users/Supermarco/Desktop/2.txt && echo AfB21= >> /Users/Supermarco/Desktop/1.txt
done

But really not sure what you want...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ldapsearch returning base64 encoded results

So my ldapsearch works great, except for some results I found today. My search is: /usr/lib64/mozldap/ldapsearch -T -h 10.1.1.1 -p 3891 -D "uid=datapower,ou=People,dc=blah,dc=com" -w xxxxxx -b "ou=Certs,dc=blah,dc=com"... (0 Replies)
Discussion started by: primerib
0 Replies

2. Shell Programming and Scripting

Upper to lower case in encoded file

Hi All, I want to change the out put of a decode file from lower to upper. i used tr command but facing issue. set -vx id=$(id) dt=$(date) store=$1 if ]; then cd $APPL_TOP/local/bin cp .sqlpass.Z $$.temp.Z uncompress $$.temp.Z sed -e s/sqlpass/$$.sqlpass/ $$.temp >... (5 Replies)
Discussion started by: nag_sathi
5 Replies

3. Shell Programming and Scripting

Base 64 encoded string

Could anyone of you please give me some idea to decode base 64 encoded value in ksh? (4 Replies)
Discussion started by: nram_krishna@ya
4 Replies

4. Solaris

Very slow decrypt

Hi Folks, Currently restoring some data that has been encrypted using the naitive Solaris encrypt/decrypt commands. Taking ages, anyone used these before and are they usually really slow? Thanks Rgrds Martin (3 Replies)
Discussion started by: callmebob
3 Replies

5. Shell Programming and Scripting

HTML Encoded characters -- Perl

Hello all I have a string like " Have Fun for the rest of the day !. I will meet you tomorrow!" ! is the HTML Equivalent of ! symbol. From the above string, i would like to remove only the HTML encoded special characters. Output should be like " Have Fun for the rest of the day... (4 Replies)
Discussion started by: vasuarjula
4 Replies

6. Shell Programming and Scripting

decoding URL encoded strings

Hi, I have a couple pages of URL encoded strings that I need to unencode (they were originally in Arabic). So the first step is to unencode the strings and then to translate them to English. They are actually lists of words so the translation from Arabic to English shouldn't be too complicated.... (1 Reply)
Discussion started by: ed111
1 Replies

7. UNIX for Advanced & Expert Users

Convert UTF-8 encoded hex value to a character

Hi, I have a non-ascii character (Ŵ), which can be represented in UTF-8 encoding as equivalent hex value (\xC5B4). Is there a function in unix to convert this hex value back to display the charcter ? (10 Replies)
Discussion started by: sumirmehta
10 Replies

8. Shell Programming and Scripting

Parse XML file encoded in ISO-8859-1

Dear Friends, I have an XML file that's encoded in ISO-8859-1. I have some European characters coming in from 2 fields (Name, Comments) in the XML file. Can anyone suggest if there are any functions in Unix to read those characters? Using shell programming, can I parse this xml file? Please... (0 Replies)
Discussion started by: madhavim
0 Replies

9. UNIX for Dummies Questions & Answers

sed replace encoded string

I'm trying to replace the string %2d from a text file using sed, and I can't seem to find the right key combination. I've tried: sed 's/%2d/-/' foo The above doesn't work, presumably because of the %. :mad: Interestingly, I don't get any kind of error message at all. It appears to... (5 Replies)
Discussion started by: mg1
5 Replies

10. Shell Programming and Scripting

AWK script: decrypt text uses frequency analysis

Ez all! I have a question how to decrypt text uses letter frequency analysis. I have code which count the letters, but what i need to do after that. Can anybody help me to write a code. VERY NEEDED! My code now: #!/usr/bin/awk -f BEGIN { FS="" } { for (i=1; i <= NF; i++) { if ($i... (4 Replies)
Discussion started by: SerJel
4 Replies
Login or Register to Ask a Question