flycat

NetCat

Oct 6th, 2011 (edited)
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | None | 0 0
  1. # Вариант №1
  2. # SRC:
  3. pv file|nc DST 666 -q0
  4. # DST:
  5. nc -lp 666 >/dev/sda
  6.  
  7. # Вариант №2
  8. # SRC:
  9. nc -lp 666 -c "pv file"
  10. # DST:
  11. nc SRC 666 >/dev/sda
  12.  
  13. # На включённой системе:
  14. # SRC:
  15. cd / && tar -zcv $(mount |awk '{if($3=="/")next;sub(/^\//,"",$3);printf " --exclude="$3"/*"}') -f - . |netcat dest_ip 666
  16. # DST:
  17. nc -lp666|tar zvx
  18.  
  19. # Несколько прогресс-баров
  20. nc 10.24.24.24 666|pv -cNraw|xz|pv -cNxz > test-flycat3-sda-7GB-ubuntu.xz
  21.  
  22. # Стащить файл с сервера (https://www.computerhope.com/unix/nc.htm)
  23. # On ‘server’ side:
  24. rm -f /tmp/f; mkfifo /tmp/f
  25. cat /tmp/f | cat file | nc -l 666 > /tmp/f
  26. rm -f /tmp/f
  27.  
  28. # On ‘client’ side:
  29. nc host.example.com 666
Add Comment
Please, Sign In to add comment