Edit: god im an idiot please close thread
K-relay wasn't working for me so I wrote my own proxy, however when I try to edit packets if the new packets are a different length than the old ones I get FAILURE bad message received on the next packet I send. I have 4 keystates, and the "bad" packet I send is decrypted correctly but I guess my encoding cipher is wrong. Is there something I'm missing? for example if I use the below code and type /lmao it will send test12 in chat but then immediately disconnect with bad message.
Also I know my code looks horrible I'll fix it later gg
Code:
x=c.recv(100024)
temp = x
cur=b""
while len(temp) >=5:
msg=cipher.crypt(temp[5:trans(temp[:4])])
if id2packet(int(temp[4]))=='INVSWAP':
print("client: ",trans(temp[:4]),id2packet(int(temp[4])),msg)
if temp[4]==10 and b'/lmao' in msg:
sh.send(b'\x00\x00\x00\x0d\x0a'+cipherP.crypt(b'\x00\x06test12'))
else:
cipherP.crypt(temp[5:trans(temp[:4])])
cur+=temp[:trans(temp[:4])]
temp=temp[trans(temp[:4]):]
x=cur
sh.send(x)