Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.50 KB | None | 0 0
  1. #set -x;
  2.  
  3. #nc -l -u -p 137 | nc -u 127.0.0.1 1137;
  4.  
  5. redirect()
  6. {
  7.         Proto=$1;
  8.         From=$2;
  9.         To=$3;
  10.  
  11.         if [ "$Proto" == "udp" ]; then
  12.         {
  13.                 ProtoOption=" -u ";
  14.         } fi;
  15.  
  16.         set -x;
  17.         nc.traditional -l $ProtoOption -p $From  -c "nc  $ProtoOption 127.0.0.1 $To" &
  18.         set +x;
  19. }
  20.  
  21.  
  22. killall nc.traditional;
  23.  
  24. redirect tcp 139 1139;
  25. redirect tcp 445 1445;
  26. redirect udp 137 1137;
  27. redirect udp 138 1138;
  28.  
  29. ps -Af | grep nc.traditional;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement