Originally Posted by
dan1
They could but they don't. Here are all calls to anything in java.net package. The way you would get a mac address is with the NetworkInterface class. There aren't any calls to that class. Please explain.
Code:
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at m.z(()J)
Found Method call to java/net/URL.openConnection(()Ljava/net/URLConnection;) at m.z(()J)
Found Method call to java/net/URLConnection.setRequestProperty((Ljava/lang/String;Ljava/lang/String;)V) at m.z(()J)
Found Method call to java/net/URLConnection.setDoInput((Z)V) at m.z(()J)
Found Method call to java/net/URLConnection.setDoOutput((Z)V) at m.z(()J)
Found Method call to java/net/URLConnection.setConnectTimeout((I)V) at m.z(()J)
Found Method call to java/net/URLConnection.getOutputStream(()Ljava/io/OutputStream;) at m.z(()J)
Found Method call to java/net/URLConnection.getInputStream(()Ljava/io/InputStream;) at m.z(()J)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at m.r(()J)
Found Method call to java/net/URL.openConnection(()Ljava/net/URLConnection;) at m.r(()J)
Found Method call to java/net/URLConnection.setRequestProperty((Ljava/lang/String;Ljava/lang/String;)V) at m.r(()J)
Found Method call to java/net/URLConnection.setDoInput((Z)V) at m.r(()J)
Found Method call to java/net/URLConnection.setDoOutput((Z)V) at m.r(()J)
Found Method call to java/net/URLConnection.setConnectTimeout((I)V) at m.r(()J)
Found Method call to java/net/URLConnection.getOutputStream(()Ljava/io/OutputStream;) at m.r(()J)
Found Method call to java/net/URLConnection.getInputStream(()Ljava/io/InputStream;) at m.r(()J)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URL.openConnection(()Ljava/net/URLConnection;) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URLConnection.setDoInput((Z)V) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URLConnection.setDoOutput((Z)V) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URLConnection.setConnectTimeout((I)V) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URLConnection.getOutputStream(()Ljava/io/OutputStream;) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URLConnection.getInputStream(()Ljava/io/InputStream;) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at m.t((JLjava/lang/String;)I)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at m.v(()J)
Found Method call to java/net/URL.openConnection(()Ljava/net/URLConnection;) at m.v(()J)
Found Method call to java/net/URLConnection.setRequestProperty((Ljava/lang/String;Ljava/lang/String;)V) at m.v(()J)
Found Method call to java/net/URLConnection.setDoInput((Z)V) at m.v(()J)
Found Method call to java/net/URLConnection.setDoOutput((Z)V) at m.v(()J)
Found Method call to java/net/URLConnection.setConnectTimeout((I)V) at m.v(()J)
Found Method call to java/net/URLConnection.getOutputStream(()Ljava/io/OutputStream;) at m.v(()J)
Found Method call to java/net/URLConnection.getInputStream(()Ljava/io/InputStream;) at m.v(()J)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at o.a((I)Z)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at client.init(()V)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at client.ed(()V)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at client.eu(()V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at s.z((Ljava/lang/String;ILjava/lang/String;I)Z)
Found Method call to java/net/URL.toString(()Ljava/lang/String;) at s.z((Ljava/lang/String;ILjava/lang/String;I)Z)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at s.z((Ljava/lang/String;ILjava/lang/String;I)Z)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at s.z((Ljava/lang/String;ILjava/lang/String;I)Z)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at as.q(()Z)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at as.w(()Z)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at as.b(()Z)
Found Method call to java/net/URI.<init>((Ljava/lang/String;)V) at as.v((Ljava/lang/String;ZLjava/lang/String;ZI)V)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URL.openConnection(()Ljava/net/URLConnection;) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URLConnection.setDoInput((Z)V) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URLConnection.setDoOutput((Z)V) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URLConnection.setConnectTimeout((I)V) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URLConnection.getOutputStream(()Ljava/io/OutputStream;) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URLConnection.getInputStream(()Ljava/io/InputStream;) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at dv.d((JLjava/lang/String;B)I)
Found Method call to java/net/URL.<init>((Ljava/lang/String;)V) at dr.a((I)J)
Found Method call to java/net/URL.openConnection(()Ljava/net/URLConnection;) at dr.a((I)J)
Found Method call to java/net/URLConnection.setRequestProperty((Ljava/lang/String;Ljava/lang/String;)V) at dr.a((I)J)
Found Method call to java/net/URLConnection.setDoInput((Z)V) at dr.a((I)J)
Found Method call to java/net/URLConnection.setDoOutput((Z)V) at dr.a((I)J)
Found Method call to java/net/URLConnection.setConnectTimeout((I)V) at dr.a((I)J)
Found Method call to java/net/URLConnection.getOutputStream(()Ljava/io/OutputStream;) at dr.a((I)J)
Found Method call to java/net/URLConnection.getInputStream(()Ljava/io/InputStream;) at dr.a((I)J)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at df.a((Ljava/lang/String;Ljava/lang/Throwable;I)V)
Found Method call to java/net/URL.openStream(()Ljava/io/InputStream;) at df.a((Ljava/lang/String;Ljava/lang/Throwable;I)V)
Found Method call to java/net/InetAddress.getByName((Ljava/lang/String;)Ljava/net/InetAddress;) at en.run(()V)
Found Method call to java/net/Socket.<init>((Ljava/net/InetAddress;I)V) at en.run(()V)
Found Method call to java/net/URL.openStream(()Ljava/io/InputStream;) at en.run(()V)
Found Method call to java/net/InetAddress.getByName((Ljava/lang/String;)Ljava/net/InetAddress;) at en.run(()V)
Found Method call to java/net/InetAddress.getHostName(()Ljava/lang/String;) at en.run(()V)
Found Method call to java/net/InetAddress.getByName((Ljava/lang/String;)Ljava/net/InetAddress;) at en.a(()V)
Found Method call to java/net/Socket.<init>((Ljava/net/InetAddress;I)V) at en.a(()V)
Found Method call to java/net/URL.openStream(()Ljava/io/InputStream;) at en.a(()V)
Found Method call to java/net/InetAddress.getByName((Ljava/lang/String;)Ljava/net/InetAddress;) at en.a(()V)
Found Method call to java/net/InetAddress.getHostName(()Ljava/lang/String;) at en.a(()V)
Found Method call to java/net/URI.<init>((Ljava/lang/String;)V) at ea.m((Ljava/lang/String;ZLjava/lang/String;Z)V)
Found Method call to java/net/URI.<init>((Ljava/lang/String;)V) at ea.k((Ljava/lang/String;ZLjava/lang/String;Z)V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ea.j((Ljava/lang/String;ILjava/lang/String;)Z)
Found Method call to java/net/URL.toString(()Ljava/lang/String;) at ea.j((Ljava/lang/String;ILjava/lang/String;)Z)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ea.j((Ljava/lang/String;ILjava/lang/String;)Z)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ea.j((Ljava/lang/String;ILjava/lang/String;)Z)
Found Method call to java/net/Socket.close(()V) at er.run(()V)
Found Method call to java/net/Socket.close(()V) at er.a(()V)
Found Method call to java/net/Socket.getOutputStream(()Ljava/io/OutputStream;) at er.<init>((Ljava/net/Socket;Len;)V)
Found Method call to java/net/Socket.setSoTimeout((I)V) at er.<init>((Ljava/net/Socket;Len;)V)
Found Method call to java/net/Socket.setTcpNoDelay((Z)V) at er.<init>((Ljava/net/Socket;Len;)V)
Found Method call to java/net/Socket.getInputStream(()Ljava/io/InputStream;) at er.<init>((Ljava/net/Socket;Len;)V)
Found Method call to java/net/Socket.setReceiveBufferSize((I)V) at er.<init>((Ljava/net/Socket;Len;)V)
Found Method call to java/net/Socket.setSendBufferSize((I)V) at er.<init>((Ljava/net/Socket;Len;)V)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at ev.qc((B)Z)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at ev.rm(()Z)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ev.qi((Ljava/lang/String;I)V)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at ev.rp(()Z)
Found Method call to java/net/URL.getHost(()Ljava/lang/String;) at ev.ru(()Z)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ev.sw((Ljava/lang/String;)V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ev.sa((Ljava/lang/String;)V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ev.si((Ljava/lang/String;)V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ev.sg((Ljava/lang/String;)V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ei.r((Ljava/lang/String;Ljava/lang/Throwable;)V)
Found Method call to java/net/URL.openStream(()Ljava/io/InputStream;) at ei.r((Ljava/lang/String;Ljava/lang/Throwable;)V)
Found Method call to java/net/URL.<init>((Ljava/net/URL;Ljava/lang/String;)V) at ei.z((Ljava/lang/String;Ljava/lang/Throwable;)V)
Found Method call to java/net/URL.openStream(()Ljava/io/InputStream;) at ei.z((Ljava/lang/String;Ljava/lang/Throwable;)V)
One could always read the system ARP table and parse results... You don't necessarily need NetworkInterface.
E.g. somethng like (with nmap)..
Code:
Process proc = Runtime.getRuntime().exec("nmap -PR -sn 192.168.1.0/24");
...
In windows orherwise,
Code:
Process proc = Runtime.getRuntime().exec("arp -a");