juliobm algunos videos algunas notas algunos scripts aprendiendo

Where do you store your passwords?

Do you trust in cloud services like Dropbox, Onedrive, Google Drive … to store your private data?
No I don’t. I prefer local data. If my data is stolen is only my fault.

Do you need many passwords to manage your workday?
Yes I do.

Do you prefer plain text files over other kind?
Yes I do. They will be read forever? I guess…

Do you want a little security for your data?
Encrypts your data!


So I store all my login-passwords in a plain text file and I do not store it in cloud services, and they are encrypted.

I need to access my data everywhere, and quickly. This is my method.

But I said I need it quickly and everywhere?


Script code to cipher a file (and remove original plain text file):

if openssl aes-256-cbc -e -in DATA -out DATA.aes  
then  
	rm -i DATA  
fi  

Script code to decrypt file:

if openssl aes-256-cbc -d -in DATA.aes -out DATA  
then  
	echo "Success!"  
fi  

Script code to decrypt file, search your required data and remove again de original file:

if openssl aes-256-cbc -d -in DATA.aes -out DATA  
then  
	cp searchIt_conf.sav searchIt_conf.txt  
	python ./searchIt.py "$1"  
	more YOURREQUIREDDATA.TXT  
	rm DATA  
	echo "Deleted!"  
fi  

I use a pyhon sript to search into a file, but you can change “python script” with grep, or awk, or …
so this one is easier:

if openssl aes-256-cbc -d -in DATA.aes -out DATA  
then  
	grep $1 DATA   
	rm DATA  
	echo "Deleted!"  
fi