|
1 | 1 | #!/bin/bash
|
2 | 2 | #-Metadata----------------------------------------------------#
|
3 |
| -# Filename: mpc.sh (v1.4.1) (Update: 2016-01-11) # |
| 3 | +# Filename: mpc.sh (v1.4.2) (Update: 2016-01-29) # |
4 | 4 | #-Info--------------------------------------------------------#
|
5 | 5 | # Quickly generate Metasploit payloads using msfvenom. #
|
6 | 6 | #-Author(s)---------------------------------------------------#
|
7 | 7 | # g0tmilk ~ https://blog.g0tmi1k.com/ #
|
8 | 8 | #-Operating System--------------------------------------------#
|
9 |
| -# Designed for & tested on: Kali Linux 2 & Metasploit v4.11+ # |
10 |
| -# Reported working: OSX 10.11 + & Kali 1.1 # |
| 9 | +# Designed for & tested on: Kali Rolling & Metasploit v4.11+ # |
| 10 | +# Reported working: OSX 10.11+ & Kali Linux 1.x / 2.x# |
11 | 11 | #-Licence-----------------------------------------------------#
|
12 | 12 | # MIT License ~ http://opensource.org/licenses/MIT #
|
13 | 13 | #-Notes-------------------------------------------------------#
|
@@ -243,7 +243,7 @@ function doHelp {
|
243 | 243 |
|
244 | 244 |
|
245 | 245 | ## Banner
|
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})" |
| 246 | +echo -e " ${BLUE}[*]${RESET} ${BLUE}M${RESET}sfvenom ${BLUE}P${RESET}ayload ${BLUE}C${RESET}reator (${BLUE}MPC${RESET} v${BLUE}1.4.2${RESET})" |
247 | 247 |
|
248 | 248 |
|
249 | 249 | ## Check system
|
@@ -474,11 +474,8 @@ if [[ -n "${TYPE}" && -z "${IP}" ]]; then
|
474 | 474 | echo -e "\n ${YELLOW}[i]${RESET} Use which ${BLUE}interface${RESET} - ${YELLOW}IP address${RESET}?:"
|
475 | 475 | I=0
|
476 | 476 | for iface in "${IFACE[@]}"; do
|
477 |
| - if [[ "$DARWIN" = "true" ]]; then # OSX users |
478 |
| - IPs[${I}]="$(\ifconfig "${iface}" | \grep inet | \grep -E '([[:digit:]]{1,2}.){4}' | \sed -e 's_[:|addr|inet]__g; s_^[ \t]*__' | \awk '{print $1}')" |
479 |
| - else # nix users |
480 |
| - IPs[${I}]="$(\ifconfig "${iface}" | \grep 'inet addr:' | \cut -d':' -f2 | \cut -d' ' -f1)" |
481 |
| - fi |
| 477 | + IPs[${I}]="$(\ifconfig "${iface}" | \grep inet | \grep -E '([[:digit:]]{1,2}.){4}' | \sed -e 's_[:|addr|inet]__g; s_^[ \t]*__' | \awk '{print $1}')" |
| 478 | + [[ -z "${IPs[${I}]}" ]] && IPs[${I}]="$(\ifconfig "${iface}" | \grep 'inet addr:' | \cut -d':' -f2 | \cut -d' ' -f1)" |
482 | 479 | [[ -z "${IPs[${I}]}" ]] && IPs[${I}]="UNKNOWN"
|
483 | 480 | echo -e " ${YELLOW}[i]${RESET} ${GREEN}$[${I}+1]${RESET}.) ${BLUE}${iface}${RESET} - ${YELLOW}${IPs[${I}]}${RESET}"
|
484 | 481 | I=$[${I}+1]
|
|
0 commit comments