Skip to content

Commit 4abeb1b

Browse files
committed
Use 1.4 version of net_config_get_interfaces
Apparently Android API 3 does not know the getMTU() function, which was added in Java 1.6, and in Android API Level 9 (Gingerbread). Therefore, fall back to the 1.4 version that does not need this API.
1 parent 2c73323 commit 4abeb1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

external/source/javapayload/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import com.metasploit.meterpreter.stdapi.stdapi_fs_separator;
2929
import com.metasploit.meterpreter.stdapi.stdapi_fs_sha1;
3030
import com.metasploit.meterpreter.stdapi.stdapi_fs_stat;
31-
import com.metasploit.meterpreter.stdapi.stdapi_net_config_get_interfaces_V1_6;
31+
import com.metasploit.meterpreter.stdapi.stdapi_net_config_get_interfaces_V1_4;
3232
import com.metasploit.meterpreter.stdapi.stdapi_net_config_get_routes_V1_4;
3333
import com.metasploit.meterpreter.stdapi.stdapi_net_socket_tcp_shutdown_V1_3;
3434
import com.metasploit.meterpreter.stdapi.stdapi_sys_config_getuid;
@@ -70,7 +70,7 @@ public String[] loadExtension(byte[] data) throws Exception {
7070
mgr.registerCommand("stdapi_fs_separator", stdapi_fs_separator.class);
7171
mgr.registerCommand("stdapi_fs_stat", stdapi_fs_stat.class);
7272
mgr.registerCommand("stdapi_fs_sha1", stdapi_fs_sha1.class);
73-
mgr.registerCommand("stdapi_net_config_get_interfaces", stdapi_net_config_get_interfaces_V1_6.class);
73+
mgr.registerCommand("stdapi_net_config_get_interfaces", stdapi_net_config_get_interfaces_V1_4.class);
7474
mgr.registerCommand("stdapi_net_config_get_routes", stdapi_net_config_get_routes_V1_4.class);
7575
mgr.registerCommand("stdapi_net_socket_tcp_shutdown", stdapi_net_socket_tcp_shutdown_V1_3.class);
7676
mgr.registerCommand("stdapi_sys_config_getuid", stdapi_sys_config_getuid.class);

0 commit comments

Comments
 (0)