Changeset 735
- Timestamp:
- 01/09/07 10:35:51 (1 year ago)
- Files:
-
- trunk/mwfetcher/CHANGELOG (modified) (1 diff)
- trunk/mwfetcher/install (modified) (2 diffs)
- trunk/mwfetcher/src/mwfetcher (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/mwfetcher/CHANGELOG
r712 r735 1 v0.1.1 2 * Added auto detection for file system type, which will override "-t vfat" option. 3 * Improved installation process. 4 1 5 v0.1.0 2 6 * Added aborting mechanism if 'fsck.vfat -y' failed when scans FAT32 file system. trunk/mwfetcher/install
r712 r735 1 1 #!/bin/bash 2 3 install_path=${1:-"/usr/sbin/"} 2 4 3 5 if [ $(whoami) != root ]; then … … 23 25 24 26 if [ ! -e $HOME/.mwfetcher/config ]; then 25 /bin/cp -u./src/config $HOME/.mwfetcher/27 /bin/cp ./src/config $HOME/.mwfetcher/ 26 28 fi 27 /bin/cp ./src/mwfetcher /usr/sbin/ 28 chmod 755 /usr/sbin/mwfetcher 29 30 /bin/cp ./src/mwfetcher "$install_path" 31 chmod 755 "$install_path/mwfetcher" trunk/mwfetcher/src/mwfetcher
r712 r735 6 6 # Copyright (C) 2006 Artemis: Chinese Honeynet Project 7 7 # 8 # Version 0.1. 08 # Version 0.1.1 9 9 # 10 10 # This program is free software; you can redistribute it and/or modify … … 24 24 ############################################################################ 25 25 # 26 # Usage: mwfetcher [-m path] [-l path] [-s path] [-g file] [-f] [-M] [-t vfat]vmxfile submit-dir27 # mwfetcher [-M] [-c config-file] [-t vfat]-b28 # mwfetcher -i [-m path] [-s path] [-g file] [-M] [-t vfat]vmxfile26 # Usage: mwfetcher [-m path] [-l path] [-s path] [-g file] [-f] [-M] vmxfile submit-dir 27 # mwfetcher [-M] [-c config-file] -b 28 # mwfetcher -i [-m path] [-s path] [-g file] [-M] vmxfile 29 29 # mwfetcher -v 30 30 # mwfetcher -h … … 60 60 #Do not modify 61 61 fetch_dir=tools/Samples 62 version="0.1. 0"62 version="0.1.1" 63 63 64 64 # mount_vmdisk … … 88 88 local vmdk_file=`ls -ct "$vmk_dir" | grep -m 1 .vmdk$ | sed '{s/-s00[0-9]//}'` 89 89 90 set_fstype "$vmk_dir/$vmdk_file" 91 90 92 echo "Mount Virtual machine disk: $vmk_dir/$vmdk_file" 91 93 echo "mount point: $mount_dir" … … 115 117 #mount /dev/nb0 "$mount_dir" 2>&1 > /dev/null 116 118 119 #echo "Finished" 120 } 121 122 # set_fstype 123 # Automatically set $fs_type 124 # $1: virtual disk file path 125 126 set_fstype() { 127 local vmdk_file="$1" 128 129 echo "Detect File System Type" 130 131 vmware-loop -P "$home_dir/partition_table" "$vmdk_file" 2>&1 > /dev/null 132 133 fs_info=`tail -n 1 "$home_dir/partition_table"` 134 135 if [ -n "$(echo $fs_info | grep FAT)" ]; then 136 fs_type="vfat" 137 elif [ -n "$(echo $fs_info | grep NTFS)" ]; then 138 fs_type="ntfs" 139 else 140 fs_type="other" 141 fi 142 117 143 #echo "Finished" 118 144 } … … 312 338 313 339 usage() { 314 echo "Usage: $PROGRAM [-m path] [-l path] [-s path] [-g file] [-f] [-M] [-t vfat]vmxfile submit-dir"315 echo " $PROGRAM [-M] [-c config-file] [-t vfat]-b"316 echo " $PROGRAM -i [-m path] [-s path] [-g file] [-M] [-t vfat]vmxfile"340 echo "Usage: $PROGRAM [-m path] [-l path] [-s path] [-g file] [-f] [-M] vmxfile submit-dir" 341 echo " $PROGRAM [-M] [-c config-file] -b" 342 echo " $PROGRAM -i [-m path] [-s path] [-g file] [-M] vmxfile" 317 343 echo " $PROGRAM -v" 318 344 echo " $PROGRAM -h" … … 326 352 echo -e "\t-b Use batch mode run through VM list in <config-file>." 327 353 echo -e "\t-i Generate initial good file list for virtual machine <vmxfile>" 328 echo -e "\t-t Specify the file system type, currently only FAT file system needs to \n\t be specified."329 354 echo -e "\t-v Version." 330 355 echo -e "\t-h Show this message."
