Foros del Web » Programación para mayores de 30 ;) » Programación General »

"1" Una PequeÑa Ayuda Por Favor

Estas en el tema de "1" Una PequeÑa Ayuda Por Favor en el foro de Programación General en Foros del Web. HOLA GENTE: LES PIDO UNA AYUDA A LA GENTE QUE SABE PROGRAMACION, NECESITO UN PROGRAMA CON EL SIGUIENTE CODIGO FUENTE: ClaveCodificada = "Acá va la ...
  #1 (permalink)  
Antiguo 25/03/2004, 18:31
 
Fecha de Ingreso: marzo-2004
Mensajes: 23
Antigüedad: 20 años, 1 mes
Puntos: 0
"1" Una PequeÑa Ayuda Por Favor

HOLA GENTE: LES PIDO UNA AYUDA A LA GENTE QUE SABE PROGRAMACION, NECESITO UN PROGRAMA CON EL SIGUIENTE CODIGO FUENTE:

ClaveCodificada = "Acá va la clave que queremos decodificar"
FOR x = 1 TO LEN(ClaveCodificada)
ClaveDecodificada = ClaveDecodificada + CHR$((ASC(MID$(ClaveCodificada, x, 1)) + 2) MOD 256)
NEXT
PRINT ClaveDecodificada

EL PROGRAMA SIRVE PARA DECODIFICAR LA CONTRASEÑA DE UN MODEM CISCO, QUE SI NO DE OTRA FORMA DEBERIA HACERLO MANUALMENTE, PERO PERDERIA MUCHO TIEMPO, ASI QUE ESPERO QUE ALGUIEN ME AYUDE, SI NO ES MUY GRANDE EL PROGRAMITA, ME GUSTARIA QUE SI PUDIERA ENVIARMELO AL MAIL: [email protected]
O POR LO MENOS DECIRME DONDE LO PUEDO ENCONTRAR, DESDE YA MUCHAS GRACIAS A TODOS. SALU2.
  #2 (permalink)  
Antiguo 26/03/2004, 11:15
 
Fecha de Ingreso: septiembre-2003
Ubicación: Tiuana BC. mex.
Mensajes: 14
Antigüedad: 20 años, 7 meses
Puntos: 0
Encrypter

Ya en otra ocasion y a otro usuario de este foro le mande un enciptador y por ende un decriptador espero te sirva
y lo pongo aqui para quien lo necesite


Public Function Decrypt(Expression As String, Key As String)
'Decrypts the specified string using the given numerical decryption key
On Error GoTo ErrHandler

'Declare variables
Dim i As Long
Dim sChar As String
Dim lChrCrypt As Long
Dim sFront As String
Dim sBack As String

Expression = Trim(Expression)

'Decrypt the string
lChrCrypt = 0
For i = 1 To Len(Expression)
lChrCrypt = lChrCrypt + 1
If lChrCrypt > Len(Key) Then lChrCrypt = 1

'Pull the string apart and decrypt one character at a time by moving it down the ASCII chart
sChar = Mid(Expression, i, 1)

'Change to prevent geting Ascii Code < 1
'Thanks to Patrick Di Martino [[email protected]] for this fix!
If Asc(sChar) - Asc(Mid(Key, lChrCrypt, 1)) < 1 Then
sChar = Chr(Asc(sChar) - Asc(Mid(Key, lChrCrypt, 1)) + 255)
Else
sChar = Chr(Asc(sChar) - Asc(Mid(Key, lChrCrypt, 1)))
End If

sFront = Left(Expression, i - 1)
sBack = Right(Expression, Len(Expression) - i)

'Put the string back together and move on to the next character
Expression = sFront & sChar & sBack
DoEvents
Next

'Return the encrypted string
Decrypt = Expression
'Debug.Print Expression
Exit Function

ErrHandler:
MsgBox Err.Description
Decrypt = 0
Exit Function
End Function

Public Function Encrypt(Expression As String, Key As String)
'Encrypts the specified string using the given numerical encryption key
On Error GoTo ErrHandler

'Declare variables
Dim i As Long
Dim sChar As String
Dim lChrCrypt As Long
Dim sFront As String
Dim sBack As String

Expression = Trim(Expression)

'Encrypt the string
lChrCrypt = 0
For i = 1 To Len(Expression)
lChrCrypt = lChrCrypt + 1
If lChrCrypt > Len(Key) Then lChrCrypt = 1

'Pull the string apart and encrypt one character at a time by moving it up the ASCII chart
sChar = Mid(Expression, i, 1)

'Change to prevent Ascii values > 255
'Thanks to Patrick Di Martino [[email protected]] for this fix!
If Asc(sChar) + Asc(Mid(Key, lChrCrypt, 1)) > 255 Then
sChar = Chr(Asc(sChar) + Asc(Mid(Key, lChrCrypt, 1)) - 255)
Else
sChar = Chr(Asc(sChar) + Asc(Mid(Key, lChrCrypt, 1)))
End If

sFront = Left(Expression, i - 1)
sBack = Right(Expression, Len(Expression) - i)

'Put the string back together and move on to the next character
Expression = sFront & sChar & sBack
DoEvents
Next

'Return the encrypted string
Encrypt = Expression
Exit Function

ErrHandler:
Encrypt = 0
Exit Function
End Function
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:16.