Login Register




The stories and information posted here are artistic works of fiction and falsehood. Only a fool would take anything posted here as fact.


[HC-Official] Multiencoder (Python) filter_list
Author
Message
RE: [HC-Official] Multiencoder (Python) #51
I rewrote the code completely 'cause of the being shit of the older one.

Code:
class leet: def encode(self,string): alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','|','<','>','\\','/','-','G'] leet = ['4','8','<','>','3','f','9','|-|','1','j','k','|','|\/|','|\|','0','p','q','r','5','7','v','\/','w','x','y','2','o','i','z','e','a','s','G','t','b','g','l','c','d','m','n','-','6'] for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i]) return(string) def decode(self,string): alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','|','<','>','\\','/','-','G'] leet = ['4','8','<','>','3','f','9','|-|','1','j','k','|','|\/|','|\|','0','p','q','r','5','7','v','\/','w','x','y','2','o','i','z','e','a','s','G','t','b','g','l','c','d','m','n','-','6'] for i in range(0,len(alphabet)): string = string.replace(leet[i],alphabet[i]) return(string) def description(self): return ''' The leet encoding algorithm is based upon the 1337 speak well-known in the hackers' underground. Characters are replaced with numbers or groups of different characters resembling them. Example input string: Hello from LEET speak! Encoded string: |-|3||0 fr0|\/| |337 5p34|<! To avoid messing up cases and to allow this algorithm to be used combined with other case-sensitive encodings, only lowercase characters, numbers and the |, <, >, _, -, \, /, G characters are translated (G is the only uppercase character that is translated). The "\" and "/" characters are respectively translated from plain text to leet as "m" and "n". This is just to avoid messups in the translation. '''

changelog:
- switched to alphabets
- added description
- fixed case messing bug
- fixed some bugs on some chars' encodings
- removed a useless piece of code I had found

Now, I tried:

Code:
print leet.encode(leet(),"testme")

But the output was:

Code:
testlmnle

I just can't get what is going wrong right here.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: [HC-Official] Multiencoder (Python) #52
I rewrote the code completely 'cause of the being shit of the older one.

Code:
class leet: def encode(self,string): alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','|','<','>','\\','/','-','G'] leet = ['4','8','<','>','3','f','9','|-|','1','j','k','|','|\/|','|\|','0','p','q','r','5','7','v','\/','w','x','y','2','o','i','z','e','a','s','G','t','b','g','l','c','d','m','n','-','6'] for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i]) return(string) def decode(self,string): alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','|','<','>','\\','/','-','G'] leet = ['4','8','<','>','3','f','9','|-|','1','j','k','|','|\/|','|\|','0','p','q','r','5','7','v','\/','w','x','y','2','o','i','z','e','a','s','G','t','b','g','l','c','d','m','n','-','6'] for i in range(0,len(alphabet)): string = string.replace(leet[i],alphabet[i]) return(string) def description(self): return ''' The leet encoding algorithm is based upon the 1337 speak well-known in the hackers' underground. Characters are replaced with numbers or groups of different characters resembling them. Example input string: Hello from LEET speak! Encoded string: |-|3||0 fr0|\/| |337 5p34|<! To avoid messing up cases and to allow this algorithm to be used combined with other case-sensitive encodings, only lowercase characters, numbers and the |, <, >, _, -, \, /, G characters are translated (G is the only uppercase character that is translated). The "\" and "/" characters are respectively translated from plain text to leet as "m" and "n". This is just to avoid messups in the translation. '''

changelog:
- switched to alphabets
- added description
- fixed case messing bug
- fixed some bugs on some chars' encodings
- removed a useless piece of code I had found

Now, I tried:

Code:
print leet.encode(leet(),"testme")

But the output was:

Code:
testlmnle

I just can't get what is going wrong right here.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: [HC-Official] Multiencoder (Python) #53
I rewrote the code completely 'cause of the being shit of the older one.

Code:
class leet: def encode(self,string): alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','|','<','>','\\','/','-','G'] leet = ['4','8','<','>','3','f','9','|-|','1','j','k','|','|\/|','|\|','0','p','q','r','5','7','v','\/','w','x','y','2','o','i','z','e','a','s','G','t','b','g','l','c','d','m','n','-','6'] for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i]) return(string) def decode(self,string): alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','|','<','>','\\','/','-','G'] leet = ['4','8','<','>','3','f','9','|-|','1','j','k','|','|\/|','|\|','0','p','q','r','5','7','v','\/','w','x','y','2','o','i','z','e','a','s','G','t','b','g','l','c','d','m','n','-','6'] for i in range(0,len(alphabet)): string = string.replace(leet[i],alphabet[i]) return(string) def description(self): return ''' The leet encoding algorithm is based upon the 1337 speak well-known in the hackers' underground. Characters are replaced with numbers or groups of different characters resembling them. Example input string: Hello from LEET speak! Encoded string: |-|3||0 fr0|\/| |337 5p34|<! To avoid messing up cases and to allow this algorithm to be used combined with other case-sensitive encodings, only lowercase characters, numbers and the |, <, >, _, -, \, /, G characters are translated (G is the only uppercase character that is translated). The "\" and "/" characters are respectively translated from plain text to leet as "m" and "n". This is just to avoid messups in the translation. '''

changelog:
- switched to alphabets
- added description
- fixed case messing bug
- fixed some bugs on some chars' encodings
- removed a useless piece of code I had found

Now, I tried:

Code:
print leet.encode(leet(),"testme")

But the output was:

Code:
testlmnle

I just can't get what is going wrong right here.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: [HC-Official] Multiencoder (Python) #54
@noize: The problem is here:

Code:
for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i])

The replace function goes through all characters of the string to replace them - from beginning to the end, no matter if they already where replaced.
So if you try to encode the character "t" (from "testme"), it will find "t" in alphabet and replace it with "7". Some time later it will find "7" in alphabet and replace it with "t". That's why it looks the way it is now.

I suggest that you iterate through all characters of the string and look then for that specific character how to replace it.

In pseudocode:

Code:
for every character c in string: translate c
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [HC-Official] Multiencoder (Python) #55
@noize: The problem is here:

Code:
for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i])

The replace function goes through all characters of the string to replace them - from beginning to the end, no matter if they already where replaced.
So if you try to encode the character "t" (from "testme"), it will find "t" in alphabet and replace it with "7". Some time later it will find "7" in alphabet and replace it with "t". That's why it looks the way it is now.

I suggest that you iterate through all characters of the string and look then for that specific character how to replace it.

In pseudocode:

Code:
for every character c in string: translate c
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [HC-Official] Multiencoder (Python) #56
@noize: The problem is here:

Code:
for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i])

The replace function goes through all characters of the string to replace them - from beginning to the end, no matter if they already where replaced.
So if you try to encode the character "t" (from "testme"), it will find "t" in alphabet and replace it with "7". Some time later it will find "7" in alphabet and replace it with "t". That's why it looks the way it is now.

I suggest that you iterate through all characters of the string and look then for that specific character how to replace it.

In pseudocode:

Code:
for every character c in string: translate c
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [HC-Official] Multiencoder (Python) #57
@noize: The problem is here:

Code:
for i in range(0,len(alphabet)): string = string.replace(alphabet[i],leet[i])

The replace function goes through all characters of the string to replace them - from beginning to the end, no matter if they already where replaced.
So if you try to encode the character "t" (from "testme"), it will find "t" in alphabet and replace it with "7". Some time later it will find "7" in alphabet and replace it with "t". That's why it looks the way it is now.

I suggest that you iterate through all characters of the string and look then for that specific character how to replace it.

In pseudocode:

Code:
for every character c in string: translate c
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply

RE: [HC-Official] Multiencoder (Python) #58
I removed a few characters from the leet alphabet as it was causing translation problems, but especially 'cause it would be painful to handle "characters" like "/\/\" when dealing with a foreach-character loop.

It is now running smoothly for what I see.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: [HC-Official] Multiencoder (Python) #59
I removed a few characters from the leet alphabet as it was causing translation problems, but especially 'cause it would be painful to handle "characters" like "/\/\" when dealing with a foreach-character loop.

It is now running smoothly for what I see.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply

RE: [HC-Official] Multiencoder (Python) #60
I removed a few characters from the leet alphabet as it was causing translation problems, but especially 'cause it would be painful to handle "characters" like "/\/\" when dealing with a foreach-character loop.

It is now running smoothly for what I see.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply