Apenas me ando acomodando al autoit asi que les dejo esta version del Rot13 que ademas de aumentar las 13 posiciones
tambien le hace un reverse
Func Rot13Encript($str);funcion para encriptar rot13
	local $sfinal=""
	for $a=1 to StringLen($str)
		$sfinal=Chr(Asc(StringMid($str,$a,1))+13) & $sfinal
	Next
	Return $sfinal
EndFunc
Func Rot13Decrypt($str);funcion para desencryptar  rot13
	local $sfinal=""
	for $a=1 to StringLen($str)
 		$sfinal=Chr(Asc(StringMid($str,$a,1))-13) & $sfinal
	Next
	Return $sfinal
EndFunc
Skype:crack8111
Nunca he tocado AutoIt pero supongo que así funcionará el RotN:

Código: Seleccionar todo

Func Rot13Encript($str, $n);funcion para encriptar rot13
    local $sfinal=""
    for $a=1 to StringLen($str)
        $sfinal=Chr(Asc(StringMid($str,$a,1))+$n) & $sfinal
    Next
    Return $sfinal
EndFunc

Código: Seleccionar todo

Func Rot13Decrypt($str);funcion para desencryptar  rot13
    local $sfinal=""
    for $a=1 to StringLen($str, $n)
        $sfinal=Chr(Asc(StringMid($str,$a,1))-$n) & $sfinal
    Next
    Return $sfinal
EndFunc
Creo que es más útil el RotN que el Rot13, igualmente, buen código.
si es lo mismo pero me ando adaptando al autoit y tu codigo le falto que automodulara por que si al rotn pasada una cierta cantidad se van a perder datos saludos...
Skype:crack8111
Bueno, esta es mi versión, creo que esta mas Optimizada.
Func RotN($Text, $Long, $Encrypt)
    Local $sResult = ""

	If $Encrypt = True Then
        For $i = 1 To StringLen($Text)
		    $sResult = Chr(Asc(StringMid($Text, $i, 1)) + $Long) & $sResult
		Next
	Else
	    For $i = 1 To StringLen($Text)
		    $sResult = Chr(Asc(StringMid($Text, $i, 1)) - $Long) & $sResult
		Next
	EndIf
    Return $sResult
EndFunc
//Regards.
Ikarus: Backdoor.VBS.SafeLoader
Agnitum: Trojan.VBS.Safebot.A
http://indeseables.github.io/
Buena esa crack81

aqui mi version en haskell

Código: Seleccionar todo

import Data.Char(chr,ord)

rot13 :: String -> String
rot13 xs = [chr((ord x) + 13) | x <- xs]

dRot13 :: String -> String
dRot13 xs = [chr((ord x) - 13) | x <- xs]
Muestra:

Código: Seleccionar todo

"ghci>" :load "rot13.hs"
[1 of 1] Compiling Main             ( rot13.hs, interpreted )
Ok, modules loaded: Main.
"ghci>" rot13 "beli"
"oryv"
"ghci>" dRot13 "oryv"
"beli"
y mi rotN en haskell tambien, este lo hice hace tiempo pero no lo publique asi que tambien lo pongo ya que estoy xD

Código: Seleccionar todo

import Data.Char(chr,ord)
type Descifrado = String
type Cifrado = String
type Texto = String
type Password = Int

rotN :: Texto -> Password -> Cifrado
rotN xs ps = [chr(((ord x)+ps)`mod` 256)| x <- xs]

dRotN :: Cifrado -> Password -> Descifrado
dRotN xs ps = [chr(((ord x)-ps)`mod` 256)| x <- xs]
Muestra:

Código: Seleccionar todo

"ghci>" :load "RotN.hs"
[1 of 1] Compiling Main             ( RotN.hs, interpreted )
Ok, modules loaded: Main.
"ghci>" putStrLn $ rotN "beli" 69
§ª±®
"ghci>" putStrLn $ dRotN "§ª±®" 69
beli
"ghci>" 
sigue asi Crack81
saludos
Abolición para el torneo del toro de la vega. Death to the murderers of bulls.
Este es el mio

Código: Seleccionar todo

MsgBox(0,"",ROT13("HOLA PINK"))


Func ROT13($sString)
;ASM Source code http://www.manhunter.ru/assembler/430_algoritm_shifrovaniya_rot13_na_assemblere.html
Local Const $Opcode="0x5589E58B4D0C09C974248B750889F7AC4788C480E42024DF3C4172103C5A770C2C0D3C417302041A08E04FAAE2E15DC3"

Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($Opcode) & "]")
    DllStructSetData($CodeBuffer, 1, $Opcode)



$tString=DllStructCreate("char[" & StringLen($sString) & "]")
DllStructSetData($tString,1,$sString)

    Local $iRet = DllCall("user32.dll", "int", "CallWindowProc", _
            "ptr", DllStructGetPtr($CodeBuffer), _
            "ptr", DllStructGetPtr($tString,1), _
            "int", StringLen($sString), _
            "int", 0, _
            "int", 0)


	Return DllStructGetData($tString,1)

EndFunc

Saludos
Imagen
Responder

Volver a “Fuentes”