mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
Merge pull request #14425 from Security-Onion-Solutions/jertel/wip
support pcap imports for sensors in distributed grids
This commit is contained in:
@@ -283,7 +283,7 @@ function send_file() {
|
||||
|
||||
log "encrypting..."
|
||||
password=$(lookup_pillar_secret import_pass)
|
||||
response=$(gpg --passphrase "$password" --batch --symmetric --cipher-algo AES256 "$from")
|
||||
response=$(gpg --passphrase "$password" --batch --yes --symmetric --cipher-algo AES256 "$from")
|
||||
log Response:$'\n'"$response"
|
||||
|
||||
fromgpg="$from.gpg"
|
||||
@@ -329,12 +329,11 @@ function import_file() {
|
||||
|
||||
log "decrypting..."
|
||||
password=$(lookup_pillar_secret import_pass)
|
||||
decrypt_cmd="gpg --passphrase $password -o $file.tmp --batch --decrypt $filegpg"
|
||||
decrypt_cmd="gpg --passphrase $password -o $file --batch --yes --decrypt $filegpg"
|
||||
salt "$node" cmd.run "\"$decrypt_cmd\""
|
||||
decrypt_code=$?
|
||||
|
||||
if [[ $decrypt_code -eq 0 ]]; then
|
||||
mv "$file.tmp" "$file"
|
||||
log "importing..."
|
||||
case $importer in
|
||||
pcap)
|
||||
@@ -357,7 +356,7 @@ function import_file() {
|
||||
exit_code=$decrypt_code
|
||||
fi
|
||||
|
||||
rm -f "$file" "$filegpg"
|
||||
salt "$node" cmd.run "rm -f \"$file\" \"$filegpg\""
|
||||
|
||||
log Response:$'\n'"$response"
|
||||
log "Exit Code: $exit_code"
|
||||
|
||||
Reference in New Issue
Block a user