mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-03-30 22:19:17 +02:00
Land #460, Remove useless casts in Java Meterpreter code
This commit is contained in:
commit
5370cba59b
java/meterpreter
meterpreter/src/main/java/com/metasploit/meterpreter
stdapi/src/main/java/com/metasploit/meterpreter/stdapi
@ -296,7 +296,7 @@ public class Meterpreter {
|
|||||||
classLoader = new URLClassLoader(new URL[]{url}, classLoader);
|
classLoader = new URLClassLoader(new URL[]{url}, classLoader);
|
||||||
}
|
}
|
||||||
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(data));
|
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(data));
|
||||||
String loaderName = (String) jis.getManifest().getMainAttributes().getValue("Extension-Loader");
|
String loaderName = jis.getManifest().getMainAttributes().getValue("Extension-Loader");
|
||||||
ExtensionLoader loader = (ExtensionLoader) classLoader.loadClass(loaderName).newInstance();
|
ExtensionLoader loader = (ExtensionLoader) classLoader.loadClass(loaderName).newInstance();
|
||||||
commandManager.resetNewCommands();
|
commandManager.resetNewCommands();
|
||||||
loader.load(commandManager);
|
loader.load(commandManager);
|
||||||
|
@ -60,7 +60,7 @@ public class stdapi_fs_stat implements Command {
|
|||||||
dos.writeInt(le(0)); // rdev
|
dos.writeInt(le(0)); // rdev
|
||||||
dos.writeLong(long_le(0)); // ino
|
dos.writeLong(long_le(0)); // ino
|
||||||
dos.writeLong(long_le(length)); // size
|
dos.writeLong(long_le(length)); // size
|
||||||
long mtime = (long) (lastModified / 1000);
|
long mtime = lastModified / 1000;
|
||||||
dos.writeLong(long_le(mtime)); // atime
|
dos.writeLong(long_le(mtime)); // atime
|
||||||
dos.writeLong(long_le(mtime)); // mtime
|
dos.writeLong(long_le(mtime)); // mtime
|
||||||
dos.writeLong(long_le(mtime)); // ctime
|
dos.writeLong(long_le(mtime)); // ctime
|
||||||
|
@ -30,7 +30,7 @@ public class stdapi_ui_desktop_screenshot_V1_4 extends stdapi_ui_desktop_screens
|
|||||||
for (int i = 0; i < devices.length; i++) {
|
for (int i = 0; i < devices.length; i++) {
|
||||||
screenBounds = screenBounds.union(devices[i].getDefaultConfiguration().getBounds());
|
screenBounds = screenBounds.union(devices[i].getDefaultConfiguration().getBounds());
|
||||||
}
|
}
|
||||||
ImageWriter writer = (ImageWriter) ImageIO.getImageWritersByFormatName("jpeg").next();
|
ImageWriter writer = ImageIO.getImageWritersByFormatName("jpeg").next();
|
||||||
ImageWriteParam iwp = writer.getDefaultWriteParam();
|
ImageWriteParam iwp = writer.getDefaultWriteParam();
|
||||||
if (quality >= 0 && quality <= 100) {
|
if (quality >= 0 && quality <= 100) {
|
||||||
iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user