Skip to content

Commit e8b5ddf

Browse files
committed
v1.4.1: Supports non-root users & non english languages (Thanks @foogle)
1 parent c0b38be commit e8b5ddf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mpc.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#-Metadata----------------------------------------------------#
3-
# Filename: mpc.sh (v1.4) (Update: 2015-12-03) #
3+
# Filename: mpc.sh (v1.4.1) (Update: 2016-01-11) #
44
#-Info--------------------------------------------------------#
55
# Quickly generate Metasploit payloads using msfvenom. #
66
#-Author(s)---------------------------------------------------#
@@ -167,6 +167,7 @@ EOF
167167

168168
echo -e " ${YELLOW}[i]${RESET} MSF handler file: '${FILEHANDLE}'"
169169
echo -e " ${YELLOW}[i]${RESET} Run: msfconsole -q -r '${FILEHANDLE}'"
170+
#echo -e " ${YELLOW}[i]${RESET} MSF command: msfconsole -x \"use exploit/multi/handler; \\\\\n set PAYLOAD ${PAYLOAD}; \\\\\n set ${HOST} ${IP}; \\\\\n set LPORT ${PORT}; \\\\\n set ExitOnSession false; \\\\\n run -j\""
170171
SUCCESS=true
171172
return
172173
}
@@ -242,7 +243,7 @@ function doHelp {
242243

243244

244245
## Banner
245-
echo -e " ${BLUE}[*]${RESET} ${BLUE}M${RESET}sfvenom ${BLUE}P${RESET}ayload ${BLUE}C${RESET}reator (${BLUE}MPC${RESET} v${BLUE}1.4${RESET})"
246+
echo -e " ${BLUE}[*]${RESET} ${BLUE}M${RESET}sfvenom ${BLUE}P${RESET}ayload ${BLUE}C${RESET}reator (${BLUE}MPC${RESET} v${BLUE}1.4.1${RESET})"
246247

247248

248249
## Check system
@@ -288,7 +289,7 @@ if [[ "$DARWIN" = "true" ]]; then # OSX users
288289
IPs=(); for (( i=0; i<${#IFACE[@]}; ++i )); do IPs+=( $(\ifconfig "${IFACE[${i}]}" | \grep inet | \grep -E '([[:digit:]]{1,2}.){4}' | \sed -e 's_[:|addr|inet]__g; s_^[ \t]*__' | \awk '{print $1}') ); done
289290
else # nix users
290291
IFACE=( $(\awk '/:/ {print $1}' /proc/net/dev | \sed 's_:__') )
291-
IPs=(); for (( i=0; i<${#IFACE[@]}; ++i )); do IPs+=( $(\ifconfig "${IFACE[${i}]}" | \grep 'inet addr:' | \cut -d':' -f2 | \cut -d' ' -f1) ); done
292+
IPs=(); for (( i=0; i<${#IFACE[@]}; ++i )); do IPs+=( $(\ip addr list "${IFACE[${i}]}" | \grep 'inet ' | \cut -d' ' -f6 | \cut -d '/' -f1) ); done
292293
fi
293294

294295
## Define TYPEs/FORMATs

0 commit comments

Comments
 (0)