Dankeschön

Ja ist mir gestern abend auch aufgefallen das ich die Tabelle etwas falsch erzeugt hatte und deswegen alles um +1 verschoben war ^^"
Here i will translate it:
So the first Post was some information and a question, because i had made a little mistake in a Table and was explain it

I got now the solution of the problem, so i will only translate the important thinks (without the question and the mistake ^^ )
Crypt Table
I will first tell you a little bit about the Crypt Table:
There are 256 letters and the size of the Table is 51.200 Bytes, so there are: 200 Keys! (51200/256=200)
BakaBug was explain this and how to get the Table somewhere...
someone Post it also here in this forum:

(i will post my crypt Table in the end of this post)
How does encrypt work?
I want to encrypt some ingame-chat-texts, which i had sniffed.
So my first idea was:
The Ascii Table also have 256 letters so it would be cool if i can lay the ascii Table on the Crypt Key Table.
And it works
What i mean exactly?
If i search for a special letter for example 'A' i go to the Ascii Table look the Position of 'A' and got the Position 65.
Now i go to (any) Key Table to Position 65 and i got now the cryptet letter of 'A'.
So every Key Table have the 'A' in the same position!
But how does i get a letter as a number in the Ascii Table without a Table?
in Delphi you can use this:
Code:
var number:Integer;
begin
number:=ord('A') //number is now 65
end;
or look here in wikipedia ;P
ASCII-Tabelle - Wikipedia
But i wrote my own little Program to show me the Ascii Table: (also Delphi)
Code:
procedure TForm1.Button1Click(Sender: TObject);
var i:Integer;
begin
memo1.Text:='';
for i:=0 to 255 do
begin
memo1.Lines.add(chr(i));
end;
end;
//so the usefull comands in Delphi are:
//chr(65)=='A'
//ord('A')==65
(there was my mistake i had done Ascii Table from 1 to 256 but Ascii Table beginns with 0!!!!)
i saw rEdoX have done a nearly thing to encode thinks.
(i saw his post at:

)
Here is his thing:
Quote:
Originally Posted by rEdoX
[..]
Code:
[..]
s[y] := char(StrToInt(Table[ord(s[y])]));
[..]
[..]
|
hm... ok with this information we are able to write our own Program which can encrypt it ^^
Befor i write a source code here about encrypting, you must know:
The first letter of a String is the length of the whole String as a letter.
(sounds difficulty o.O but it isn't, look here is a Delphi example) :
Code:
lengthOfString:=ord(String[1]);
//String[1] is the first letter of the String
//and with "ord" you make this letter to a number
//this number is the length of the whole string!
Also you must know: The last letter is always cryptet #0 so we can search this last letter in our crypt key table on position 0 and we have the key!
I'm working with the Hex letters of the Crypt Table, because i also sniffing the Client packets as Hex!
So if you entered somethink to this program, be sure that it is a String in Hex ^^
You can use it, if you had sniff some text from ingame and can't read it, this program can read it

This is my full source and programmed in Delphi.
Please be fair and square.
So don't steal it and post it somewhere else, please.
It would be nice if you mention my name if you use some of this source ^^
Now here is the Source have fun while reading it
Code:
procedure TForm1.Button1Click(Sender: TObject);
var cryptTable: TStringlist;
path,s,tmp,text,txt2:String;
lengthOfString,i,i2,l,t,t2,t3,j,key,getPos,keyfound:Integer;
begin
cryptTable := TStringList.Create;
edit2.Text:='';
Memo1.text:='';
path:='C:[bla bla]CryptTableHexList.txt';
//path:=edit3.text;
if not fileexists(path) then
begin
showmessage('Wrong Way to the Hex Crypt Table!!! Check it and correct it!');
exit;
end;
cryptTable.LoadFromFile(path);
tmp:=Edit1.text;
tmp:=stringreplace(tmp, ' ', '', [rfreplaceall,rfignorecase] ); //remove all spaces
l:=length(tmp); //get length of the hex String
l:=l div 2;
text:=Edit1.text;
for i:=1 to l do //convert the hex String to normal String:
begin
s:=Copy(text, 1, 2);
edit2.Text:=edit2.Text+Chr(StrToInt('$' + s)); //convert one hex to string
delete(text,1,3);
end;
//now we have in edit2.text the converted string!
//now the encrypting :)
//get the last hex letter to find the key from crypt table:
t:=length(edit1.text);
tmp:=Copy(edit1.text, t-1, 2);
//search for this letter in the crypt table to find the key!
j:=0;
keyfound:=0;
for i:=0 to 199 do //200 keys
begin
if tmp=cryptTable[j] then
begin
key:=i+1;
keyfound:=keyfound+1;
//encrypting: (i do it this way because there are some crypt keys the same, for example 29) it is in the 1 key Table and in 30
memo1.lines.Add('encryptet with Key: '+inttostr(key));
txt2:='';
text:=Edit1.text;
for i2:=1 to l do // get hex by hex ;D
begin
s:=Copy(text, 1, 2); //the hex key
for t2:=0 to 255 do //search the list for EVERY hex!!! so it could be slow with much text :/
begin
t3:=t2+j;
if s=cryptTable[t3] then
begin
getPos:=t2;
txt2:=txt2+chr(getPos);
end;
end;
delete(text,1,3); //delet this hex and look the next hex
end;
memo1.lines.add(txt2);
j:=j+256;
end
else
begin
j:=j+256;
end;
end;
if keyfound=0 then
begin
Memo1.lines.add('Sorry No Key was Found :/');
Memo1.lines.add('Please check the last Key from your input hex String!');
end;
end;
As attachment is my full Hex Crypt Table.
And my Program to convert cryptet Hex String to normal Text.
(I add it so you don't need delphi to run it).
So that was a BIG post
Greets ^^