Skip to content

Commit 3232917

Browse files
committed
fixed IP address parsing
1 parent 57693ad commit 3232917

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • cSploit/src/org/csploit/android/net/metasploit

cSploit/src/org/csploit/android/net/metasploit/Option.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,10 @@ public void setValue(String value) throws NumberFormatException {
105105
break;
106106
case ADDRESS:
107107
try {
108-
InetAddress ia = InetAddress.getByAddress(value.getBytes());
109-
Logger.debug("Validating inetaddress: " + ia.toString());
108+
mValue = InetAddress.getByName(value).getHostAddress();
110109
} catch (UnknownHostException uhe) {
111-
throw new NumberFormatException("invalid IP address");
110+
throw new NumberFormatException("invalid IP address: " + value);
112111
}
113-
mValue = value;
114112
break;
115113
case PORT:
116114
int i = Integer.parseInt(value);

0 commit comments

Comments
 (0)