Sign in to follow this  
Followers 0
gosu

UDF: _StringObfuscate()

3 posts in this topic

#1 ·  Posted (edited)

Did you konw yuor biarn is slitl albe to raed tetxes if the mlddie lrettes are sdeppaw? Yse? But did you aslo konw you can gtarenee scuh ttxes in AtIotu? No? Now you can - unisg tihs llttie UDF!

#Include <String.au3>
Func _StringObfuscate($phrase)
    Dim $words[255][4]
    $newstring = ""
    $special = 0
    
    $string = StringSplit($phrase, " ")
    $words[0][0] = $string[0]
    For $i = 1 to $string[0]
        If StringLen($string[$i]) = 1 Then
            $words[$i][3] = 1
        Else
            $words[$i][3] = 0
        EndIf
        $stringl = StringLeft($string[$i], 1)
        $stringr = StringRight($string[$i], 1)
        If $stringr = "!" OR $stringr = "." OR $stringr = "," OR $stringr = ":" Then
            $special = 1
            $words[$i][1] = StringRight($string[$i], 2)
        Else
            $words[$i][1] = $stringr
        EndIf
        $words[$i][0] = $stringl
        If $special = 0 Then
            $words[$i][2] = StringTrimRight(StringTrimLeft($string[$i],1),1)
        Else
            $words[$i][2] = StringTrimRight(StringTrimLeft($string[$i],1),2)
        EndIf
        $special = 0
    Next
    For $i = 1 to $words[0][0]
        If $words[$i][3] = 0 Then
            $newstring &= " " & $words[$i][0] & _StringReverse($words[$i][2]) & $words[$i][1]
        Else
            $newstring &= " " & $words[$i][0]
        EndIf
    Next
    Return StringTrimLeft($newstring, 1)
EndFunc

; Example:
MsgBox(0, "Weird text", _StringObfuscate("You should be able to read this without a problem!"))

Yeah, it has no real use (maybe to confuse other people), but it's still fun. Enjoy!

Edited by gosu

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Share this post


Link to post
Share on other sites



thats rly nice :whistle:


My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Did you konw yuor biarn is slitl albe to raed tetxes if the mlddie lrettes are sdeppaw? the bold word is wrong, 'd' should be last letter.

Nice UDF, interesting concept.

Edited by RazerM

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0