Revised Techhiderversion 14.04.
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
26d8fe4451
Commit
087843f963
@ -125,39 +125,55 @@ public class TechHider_15 {
|
|||||||
buffer.writeBytes(data, i, dataArrayLengthLength);
|
buffer.writeBytes(data, i, dataArrayLengthLength);
|
||||||
i += dataArrayLengthLength;
|
i += dataArrayLengthLength;
|
||||||
|
|
||||||
|
ByteBuf chunkData = UnpooledByteBufAllocator.DEFAULT.directBuffer(dataArrayLength * 8);
|
||||||
|
chunkData.writeBytes(data, i, dataArrayLength * 8);
|
||||||
|
|
||||||
int arrayEnd = dataArrayLength * 8 + i;
|
int arrayEnd = dataArrayLength * 8 + i;
|
||||||
System.out.println("i:" + i + " dataArrayLength: " + dataArrayLength + " arrayEnd:" + arrayEnd + " data.length:" + data.length);
|
|
||||||
int bitsOver = 0;
|
int bitsOver = 0; // Anzahl an Bits, die aus dem letzten Durchlauf noch über sind
|
||||||
int lastBits = 0;
|
int lastBits = 0; // Die letzten Bits aus dem vorigen Durchlauf
|
||||||
while(i < arrayEnd){
|
while(chunkData.readableBytes() > 0){
|
||||||
int currentPos = 64 + bitsOver;
|
int currentPos = 70 - bitsOver; // 14 * 5, Die Größe des Bitshifts, der durchgeführt werden muss, um den ersten Block zu lesen
|
||||||
long values = (long)data[i] << 56 | (long)data[i+1] << 48 | (long)data[i+2] << 40 | (long)data[i+3] << 32 | data[i+4] << 24 | data[i+5] << 16 | data[i+6] << 8 | data[i+7];
|
if(currentPos >= 64)
|
||||||
|
currentPos -= 14;
|
||||||
|
|
||||||
|
long values = chunkData.readLong();
|
||||||
long result = 0;
|
long result = 0;
|
||||||
|
|
||||||
do{
|
System.out.println("currentPos: " + currentPos);
|
||||||
currentPos -= 14;
|
int newLastBits = (int)(values >> currentPos);
|
||||||
|
while(currentPos >= 0){
|
||||||
int blockId = (int)(values >> currentPos) & 0x3FFF;
|
int blockId = (int)(values >> currentPos) & 0x3FFF;
|
||||||
if(currentPos > 64-14){
|
|
||||||
blockId <<= bitsOver;
|
if(currentPos > 50){ //64 - 14, Prüfen auf Ende des Longs
|
||||||
blockId |= lastBits;
|
int offset = 14 - (currentPos - 50);
|
||||||
|
if(arrayEnd <= i+15)
|
||||||
|
System.out.println("Array Overflow!!!! i: " + i + " currentPos:" + currentPos + " bitsOver:" + bitsOver + " lastBits:" + lastBits);
|
||||||
|
|
||||||
|
blockId |= (data[i+14] << (offset + 8) | data[i+15] << offset) & 0x3FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Config.HiddenBlocks.contains(blockId))
|
if(Config.HiddenBlocks.contains(blockId))
|
||||||
blockId = Config.ObfuscateWith;
|
blockId = Config.ObfuscateWith;
|
||||||
|
|
||||||
result <<= 14;
|
result <<= 14;
|
||||||
result |= blockId;
|
result |= blockId;
|
||||||
}while(currentPos >= 14);
|
currentPos -= 14;
|
||||||
|
|
||||||
bitsOver = currentPos;
|
|
||||||
lastBits = (int)values;
|
|
||||||
|
|
||||||
if(currentPos > 0){
|
|
||||||
values |= data[i+15] << bitsOver | data[i+14] << (bitsOver + 8);
|
|
||||||
if(Config.HiddenBlocks.contains((int)values & 0x3FFF))
|
|
||||||
values = Config.ObfuscateWith;
|
|
||||||
result <<= currentPos;
|
|
||||||
result |= (values & (65536 >> (16-currentPos)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(currentPos > -14){ //Überprüfen der ersten Bits
|
||||||
|
int blockId = ((int)values << -currentPos | lastBits) & 0x3FFF;
|
||||||
|
if(Config.HiddenBlocks.contains(blockId))
|
||||||
|
blockId = Config.ObfuscateWith;
|
||||||
|
result <<= (14 + currentPos);
|
||||||
|
result |= blockId >> -currentPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastBits = newLastBits;
|
||||||
|
bitsOver += 8;
|
||||||
|
if(bitsOver >= 14)
|
||||||
|
bitsOver -= 14;
|
||||||
|
|
||||||
buffer.writeLong(result);
|
buffer.writeLong(result);
|
||||||
i += 8;
|
i += 8;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren