File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ stream_tarball_over_tcp() {
307307 # Method 2: Try netcat (nc)
308308 if command -v nc > /dev/null 2>&1 ; then
309309 write_log " INFO" " Attempting to use nc (netcat)"
310- if cat " $tarball_path " | nc " $ip " " $port " 2> /dev/null; then
310+ if nc " $ip " " $port " < " $tarball_path " 2> /dev/null; then
311311 write_log " INFO" " Successfully streamed tarball using nc"
312312 return 0
313313 else
@@ -318,7 +318,7 @@ stream_tarball_over_tcp() {
318318 # Method 3: Try ncat (from nmap)
319319 if command -v ncat > /dev/null 2>&1 ; then
320320 write_log " INFO" " Attempting to use ncat"
321- if cat " $tarball_path " | ncat " $ip " " $port " 2> /dev/null; then
321+ if ncat " $ip " " $port " < " $tarball_path " 2> /dev/null; then
322322 write_log " INFO" " Successfully streamed tarball using ncat"
323323 return 0
324324 else
You can’t perform that action at this time.
0 commit comments