1.0.7 • Published 1 year ago

tp-dev-sec-back v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

INSTALLATION

npm i -g tp-dev-sec-back

add ssh key on the server for scp

#generate key
ssh-keygen -t rsa
#copy key to the remote server
ssh-copy-id USER@SERVER

USAGE

# get description of arguments
tpdsb --help

# generate data
tpdsb -s generate -t temp
tpdsb -s generate -t hydro
tpdsb -s generate -t wind
#generate csv from all data in tmp sqlite database
tpdsb -s csv
#zip csv files and encrypt the zip
tpdsb -s zip -k '<my-super-encryption-key>'
#transfert zip over scp
tpdsb -s scp -i ~/.ssh/id_rsa_android -H 192.168.1.61 -p 8022 -u u0_a1033 -d /data/data/com.termux/files/home -f '<file-to-transfert>'
#generate encrypted zip and scp over ssh
tpdsb -s zip -k '<my-super-encryption-key>'
#clean the database, csv/ and zip/ folders
tpdsb -s clean
#decrypt zip
tpdsb -s decrypt -f zip/</file_to_decrypt>.enc -k <my-super-encryption-key>

DEVELOPPERS

npm run build:watch

COMMANDS

using npm(only for development)

npm run cmd:gen:temp
npm run cmd:gen:hydro
npm run cmd:gen:wind
#generate csv from all data in tmp sqlite database
npm run cmd:csv
#zip csv files and encrypt the zip
npm run cmd:zip -k '<my-super-encryption-key>'
#transfert zip over scp
npm run cmd:scp
#truncate db and remove csv, and zip folders
npm run cmd:clean
#decrypt zip
node ./dist/build/index.js -s decrypt -f zip/<zip-name>.zip.enc -k <my-super-encryption-key>