



                        -+-| DisidentS Hack Journal #3 |-+-






  ___________________________________________________________________________
 |                                                                           |
 | -- Titulo_____: Funciones en Visual Basic                                 |
 | -- Autor______: RandomLoG                                                 |
 | -- E-Mail_____: alternateos@disidents.hacker.net.ar                       |                                   |
 | -- Team_______: Disidents Argentina  -   http://www.disidents.int-ltd.com |
 | -- KB_________: 12.3                                                      |
 | -- Tema_______: Artesania visual basic                                    |
 |___________________________________________________________________________|



.=============================================================================.
|==========~ Como encriptar archivos , variables o cualquier cosa ~============
|==============================================================================

  Estas cansado de hacer programas y que con un simple editor hexagecimal 
  cambien el nombre tuyo por el de ellos o algo parecido?
  Aqui esta la solucion ! Encriptar y desencriptar al instante mientras se abre
  un form (simple no?)

  Bueno les paso un ejemplo el cual es para Visual Basic!

  A este archivo lo vamos a llamar modulo1.bas o module1.bas . lo que hace este 
  archivo es agregar 3 funciones nuevas ,encriptar ,desencriptar y pausa.
  
  aki les va !!

|==============================================================================

  Option Explicit
  Dim a, c, d, e, f, g
  Dim b As String
  Dim DesTino
  Public Sub DeSenCriPtA(DesCript As Variant, DesTino As Variant) 
  DesTino = ""
  a = Mid(DesCript, 3, Len(DesCript))
  DesCript = a
  For c = 1 To Len(DesCript)
  d = Left(DesCript, c)
  b = Right(d, 1)
  Rem Si en variable b no hay nada , deja el espacio al momento de encriptar !!!
  If b = "]" Then
  DesTino = DesTino & " "
  End If
  If b = "?" Then
  DesTino = DesTino & "-"
  End If
  If b = "i" Then
  DesTino = DesTino & "."
  End If
  Rem aqui termina de chequear si en b hay o no lugar !!!
  If b = "" Then
  DesTino = DesTino & "a"
  End If
  If b = "" Then
  DesTino = DesTino & "b"
  End If
  If b = "#" Then
  DesTino = DesTino & "c"
  End If
  If b = "" Then
  DesTino = DesTino & "d"
  End If
  If b = "&" Then
  DesTino = DesTino & "e"
  End If
  If b = "" Then
  DesTino = DesTino & "f"
  End If
  If b = "" Then
  DesTino = DesTino & "g"
  End If
  If b = "" Then
  DesTino = DesTino & "h"
  End If
  If b = "x" Then
  DesTino = DesTino & "i"
  End If
  If b = "" Then
  DesTino = DesTino & "j"
  End If
  If b = "" Then
  DesTino = DesTino & "k"
  End If
  If b = "n" Then
  DesTino = DesTino & "l"
  End If
  If b = "Y" Then
  DesTino = DesTino & "m"
  End If
  If b = "" Then
  DesTino = DesTino & "n"
  End If
  If b = "_" Then
  DesTino = DesTino & ""
  End If
  If b = "" Then
  DesTino = DesTino & "o"
  End If
  If b = "" Then
  DesTino = DesTino & "p"
  End If
  If b = "" Then
  DesTino = DesTino & "q"
  End If
  If b = "" Then
  DesTino = DesTino & "r"
  End If
  If b = "-" Then
  DesTino = DesTino & "s"
  End If
  If b = "" Then
  DesTino = DesTino & "t"
  End If
  If b = "" Then
  DesTino = DesTino & "u"
  End If
  If b = "" Then
  DesTino = DesTino & "v"
  End If
  If b = "" Then
  DesTino = DesTino & "w"
  End If
  If b = "" Then
  DesTino = DesTino & "x"
  End If
  If b = "" Then
  DesTino = DesTino & "y"
  End If
  If b = "+" Then
  DesTino = DesTino & "z"
  End If
  If b = " " Then
  DesTino = DesTino & b
  End If
  Rem aqui empezamos a comparar numeros
  If b = "<" Then
  DesTino = DesTino & "0"
  End If
  7 If b = "@" Then
  DesTino = DesTino & "1"
  End If
  If b = "D" Then
  DesTino = DesTino & "2"
  End If
  If b = "C" Then
  DesTino = DesTino & "3"
  End If
  If b = "g" Then
  DesTino = DesTino & "4"
  End If
  If b = "o" Then
  DesTino = DesTino & "5"
  End If
  If b = "" Then
  DesTino = DesTino & "6"
  End If
  If b = "" Then
  DesTino = DesTino & "7"
  End If
  If b = "!" Then
  DesTino = DesTino & "8"
  End If
  If b = "" Then
  DesTino = DesTino & "9"
  End If
  Rem aqui termina la comparacion de los numeros
  Rem Aqui empieza a  encriptar las letras mayusculas
  If b = "" Then
  DesTino = DesTino & "A"
  End If
  If b = "" Then
  DesTino = DesTino & "B"
  End If
  If b = "" Then
  DesTino = DesTino & "C"
  End If
  If b = "" Then
  DesTino = DesTino & "D"
  End If
  If b = "" Then
  DesTino = DesTino & "E"
  End If
  If b = "" Then
  DesTino = DesTino & "F"
  End If
  If b = "" Then
  DesTino = DesTino & "G"
  End If
  If b = "{" Then
  DesTino = DesTino & "H"
  End If
  If b = "\" Then
  DesTino = DesTino & "I"
  End If
  If b = "" Then
  DesTino = DesTino & "J"
  End If
  If b = "" Then
  DesTino = DesTino & "K"
  End If
  If b = "" Then
  DesTino = DesTino & "L"
  End If
  If b = "." Then
  DesTino = DesTino & "M"
  End If
  If b = "/" Then
  DesTino = DesTino & "N"
  End If
  If b = "`" Then
  DesTino = DesTino & ""
  End If
  If b = "" Then
  DesTino = DesTino & "O"
  End If
  If b = "" Then
  DesTino = DesTino & "P"
  End If
  If b = "" Then
  DesTino = DesTino & "Q"
  End If
  If b = ";" Then
  DesTino = DesTino & "R"
  End If
  If b = "%" Then
  DesTino = DesTino & "S"
  End If
  If b = "" Then
  DesTino = DesTino & "T"
  End If
  If b = "" Then
  DesTino = DesTino & "U"
  End If
  If b = "" Then
  DesTino = DesTino & "V"
  End If
  If b = "z" Then
  DesTino = DesTino & "W"
  End If
  If b = "u" Then
  DesTino = DesTino & "X"
  End If
  If b = "q" Then
  DesTino = DesTino & "Y"
  End If
  If b = "w" Then
  DesTino = DesTino & "Z"
  End If
  Next c
  DesCript = ""

  End Sub
  Public Sub EnCriPtA(EnCript, DesTino)
  DesTino = "~~~"
  For c = 1 To Len(EnCript)
  d = Left(EnCript, c)
  b = Right(d, 1)
  Rem Si en variable b no hay nada , deja el espacio al momento de encriptar !!!
  If b = " " Then
  DesTino = DesTino & "]"
  End If
  If b = "-" Then
  DesTino = DesTino & "?"
  End If
  If b = "." Then
  DesTino = DesTino & "i"
  End If
  
  Rem aqui termina de chequear si en b hay o no lugar !!!
  Rem Aqui empieza a  encriptar las letras minusculas
  If b = "a" Then
  DesTino = DesTino & ""
  End If
  If b = "b" Then
  DesTino = DesTino & ""
  End If
  If b = "c" Then
  DesTino = DesTino & "#"
  End If
  If b = "d" Then
  DesTino = DesTino & ""
  End If
  If b = "e" Then
  DesTino = DesTino & "&"
  End If
  If b = "f" Then
  DesTino = DesTino & ""
  End If
  If b = "g" Then
  DesTino = DesTino & ""
  End If
  If b = "h" Then
  DesTino = DesTino & ""
  End If
  If b = "i" Then
  DesTino = DesTino & "x"
  End If
  If b = "j" Then
  DesTino = DesTino & ""
  End If
  If b = "k" Then
  DesTino = DesTino & ""
  End If
  If b = "l" Then
  DesTino = DesTino & "n"
  End If
  If b = "m" Then
  DesTino = DesTino & "Y"
  End If
  If b = "n" Then
  DesTino = DesTino & ""
  End If
  If b = "" Then
  DesTino = DesTino & "_"
  End If
  If b = "o" Then
  DesTino = DesTino & ""
  End If
  If b = "p" Then
  DesTino = DesTino & ""
  End If
  If b = "q" Then
  DesTino = DesTino & ""
  End If
  If b = "r" Then
  DesTino = DesTino & ""
  End If
  If b = "s" Then
  DesTino = DesTino & "-"
  End If
  If b = "t" Then
  DesTino = DesTino & ""
  End If
  If b = "u" Then
  DesTino = DesTino & ""
  End If
  If b = "v" Then
  DesTino = DesTino & ""
  End If
  If b = "w" Then
  DesTino = DesTino & ""
  End If
  If b = "x" Then
  DesTino = DesTino & ""
  End If
  If b = "y" Then
  DesTino = DesTino & ""
  End If
  If b = "z" Then
  DesTino = DesTino & "+"
  End If
  Rem aqui termina con las letras minusculas
  Rem aqui empezamos a comparar numeros
  If b = "0" Then
  DesTino = DesTino & "<"
  End If
  7 If b = "1" Then
  DesTino = DesTino & "@"
  End If
  If b = "2" Then
  DesTino = DesTino & "D"
  End If
  If b = "3" Then
  DesTino = DesTino & "C"
  End If
  If b = "4" Then
  DesTino = DesTino & "g"
  End If
  If b = "5" Then
  DesTino = DesTino & "o"
  End If
  If b = "6" Then
  DesTino = DesTino & ""
  End If
  If b = "7" Then
  DesTino = DesTino & ""
  End If
  If b = "8" Then
  DesTino = DesTino & "!"
  End If
  If b = "9" Then
  DesTino = DesTino & ""
    End If
  Rem aqui termina la comparacion de los numeros !!!
  Rem Aqui empieza a  encriptar las letras mayusculas
  If b = "A" Then
  DesTino = DesTino & ""
  End If
  If b = "B" Then
  DesTino = DesTino & ""
  End If
    If b = "C" Then
  DesTino = DesTino & ""
  End If
  If b = "D" Then
  DesTino = DesTino & ""
  End If
  If b = "E" Then
  DesTino = DesTino & ""
  End If
  If b = "F" Then
  DesTino = DesTino & ""
  End If
  If b = "G" Then
  DesTino = DesTino & ""
  End If
  If b = "H" Then
  DesTino = DesTino & "{"
  End If
  If b = "I" Then
  DesTino = DesTino & "\"
  End If
  If b = "J" Then
  DesTino = DesTino & ""
  End If
  If b = "K" Then
  DesTino = DesTino & ""
  End If
  If b = "L" Then
  DesTino = DesTino & ""
  End If
  If b = "M" Then
  DesTino = DesTino & "."
  End If
  If b = "N" Then
  DesTino = DesTino & "/"
  End If
  If b = "" Then
  DesTino = DesTino & "`"
  End If
  If b = "O" Then
  DesTino = DesTino & ""
  End If
  If b = "P" Then
  DesTino = DesTino & ""
  End If
  If b = "Q" Then
  DesTino = DesTino & ""
  End If
  If b = "R" Then
  DesTino = DesTino & ";"
  End If
  If b = "S" Then
  DesTino = DesTino & "%"
  End If
  If b = "T" Then
  DesTino = DesTino & ""
  End If
  If b = "U" Then
  DesTino = DesTino & ""
  End If
  If b = "V" Then
  DesTino = DesTino & ""
  End If
  If b = "W" Then
  DesTino = DesTino & "z"
  End If
  If b = "X" Then
  DesTino = DesTino & "u"
  End If
  If b = "Y" Then
  DesTino = DesTino & "q"
  End If
  If b = "Z" Then
  DesTino = DesTino & "w"
  End If
  Rem aqui termina de encriptar las mayusculas
  Next c
  End Sub

  Public Sub Pausa(Duracion As Long)
      Dim Current As Long
      Current = Timer
      Do Until Timer - Current >= Duracion
          DoEvents
      Loop
  End Sub

|==============================================================================
    aki termina el codigo !!!!!!
|==============================================================================

  para encriptar una variable solo hay k poner encripta ( variable, variable de
  destino) si te marca error haz lo siguiente , crea una  variable temporal por
  ejemplo a :

  dim a !
  encripta ( text1 ,a )
  text1= a

- que hace eso ?, facil, encripta el contenido de text1 en la variable temporal
  "a" , luego el contenido de A es pasado a text1 !!

  Bueno para encriptar un archivo solo hace falta imaginacion y conocimientos xD

  Recomendacion : cuando crees un proyecto en vb u otro lenguaje, siempre usa
  encriptacion para que no puedan cambiar nada del texto por ejemplo en vb en el
  evento load del formulario poner:

  form1.caption "texto encriptado"
  desencripta  ( form1.caption , a)
  form1.caption = a
  end function

  Eso desencripta la funcion en instantes !!!!!!

|==============================================================================
  Esto es todo por ahora.......
|==============================================================================
Nota de Cod3x:
-------------------------------------------------------------------------------
El codigo presentado por randomlog es un codigo muy sencillo, poco profesional
pero la idea es muy util y esa funcion es muy mejorable. An asi, en disidents
la intencion de aprender y dar a conocer las ideas y lo que se aprende esta por
enzima de todo. Ademas..quizas alguien no entienda el codigo de w3n y este si
quien sabe ;)P

Gracias randomlog, sige practicando, que con practica, lo bonito es ver como lo
que hiciste ayer...es peor que lo que hiciste hoy.

--------------------------------cod3x..the earth is only a function of universe.
--------------------------------------------------------------------------------