-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsync_changes.sh
More file actions
executable file
·28 lines (25 loc) · 960 Bytes
/
sync_changes.sh
File metadata and controls
executable file
·28 lines (25 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
if ! ( [ "$1" == "tomsf" ] || [ "$1" == "togit" ] ); then
echo "Usage: $0 [tomsf|togit]"
exit 1
fi
msfbase="/opt/metasploit3/msf3/"
githome="/home/ks/all/git/msf-shell-mixins/"
while read pair; do
first=$(echo $pair | cut -d',' -f1)
second=$(echo $pair | cut -d',' -f2)
if [ "$1" == "togit" ]; then
src="$first"
dest="$second"
else
if [ "$1" == "tomsf" ]; then src="$second" && dest="$first";fi
fi
# echo "Copying $src to $dest"
cp -rv $src $dest
done <<__EOF__
$msfbase/lib/msf/core/post/windows/registry.rb,$githome/lib/msf/core/post/windows/registry.rb
$msfbase/lib/msf/core/post/windows/services.rb,$githome/lib/msf/core/post/windows/services.rb
$msfbase/lib/msf/core/post/windows/cli_parse.rb,$githome/lib/msf/core/post/windows/cli_parse.rb
$msfbase/test/modules/post/test/registry.rb,$githome/test/modules/post/test/registry.rb
$msfbase/test/modules/post/test/services.rb,$githome/test/modules/post/test/services.rb
__EOF__