Aktív témák

  • Wasmacsó

    csendes tag

    ezt a témát azér hoztam létre, hogy vb-ről is menjen a duma. én is egy vb újonc vagyok, szeretnék tanulni! most TP után VB.net, a vb6.0-val már ismerkedtem, nagyon teccik. Hogy tudnám fejleszteni ezt a titkosító progit, amihez szereztem segítséget is...

    Sub FileEncodeAndDecode(InputFile As String, OutputFile As String, PasswordKey As String)

    Dim temp As Single
    Dim Char As String * 1
    Dim XORMask As Single
    Dim temp1 As Integer

    Open InputFile For Binary As #1
    Open OutputFile For Binary As #2

    For x = 1 To Len(PasswordKey)
    temp = Asc(Mid$(PasswordKey, x, 1))
    For y = 1 To temp
    temp1 = Rnd
    Next y


    Randomize temp1
    Next x


    Counter = 0
    For z = 1 To FileLen(InputFile)


    XORMask = Int(Rnd * 256)

    'Get the char & change it
    Get 1, , Char
    Char = Chr$((Asc(Char) Xor XORMask))
    Put 2, , Char

    Counter = Counter + 1
    If Counter > Len(PasswordKey) Then Counter = 1


    For x = 1 To (Asc(Mid$(PasswordKey, Counter, 1)) * 2 + 15 / 3 - 2 + 5 - 2 + 3 * 2 / 1 * 5 + 12 - 3)
    temp = Rnd
    Next x
    Next z


    Close #1
    Close #2

    End Sub
    Private Sub Command5_Click()
    MsgBox ''Please enter the real EXE(win32) file! And the password!''
    Dim InputFile As String
    Dim OutputFile As String
    Dim PasswordKey As String

    InputFile = InputBox(''Enter a filename to encode'')
    OutputFile = InputBox(''Enter the new filename this will become '')
    PasswordKey = InputBox(''Enter the password (key)'')
    Call FileEncodeAndDecode(InputFile, OutputFile, PasswordKey)

    MsgBox ''File written to '' + OutputFile
    End
    End Sub

    Private Sub Form_Load()
    MsgBox ''Please you're not put space char in Simple text textbox, because the program creates the error messages!''
    End Sub
    Public Function Encrypt(ByVal Plain As String)
    For i = 1 To Len(Plain)
    Letter = Mid(Plain, i, 1)
    Mid(Plain, i, 1) = Chr(Asc(Letter) + 15 - 23 + 12 - 23 - 12 + 26 - 2 - 26 + 16 - 23 + Rnd(2))
    Next
    Encrypt = Plain
    End Function

    Public Function Decrypt(ByVal Encrypted As String)
    For i = 1 To Len(Encrypted)
    Letter = Mid(Encrypted, i, 1)
    Mid(Encrypted, i, 1) = Chr(Asc(Letter) - 15 + 23 - 12 + 23 + 12 - 26 + 2 + 26 - 16 + 23 - Rnd(2))
    Next
    Decrypt = Encrypted
    End Function


    Private Sub Command1_Click()
    Text1 = Encrypt(Text1)
    End Sub

    Private Sub Command2_Click()
    Text1 = Decrypt(Text1)
    End Sub

    Private Sub Command3_Click()
    frmAbout.Show
    End Sub

    Private Sub Command4_Click()
    MsgBox ''Exit?:) What's is that exit?''
    Unload Me
    End Sub

    nem suk matematikai függvényt ismerek vb-ben!
    help pls!

    Wasfitymájú kapanyányimonyók

  • b14

    senior tag

    Ez a tema mar mikor megnyilt is lehalt volt.

    ''...de a konfigjából kiindulva, nem hiszem, hogy 40 éves családos ember lenne...'' -- by Slax

  • lapa

    veterán

    válasz Wasmacsó #1 üzenetére

    olyan verziód nincs, ami vbs-ként is fut? érdekelne, de most nem fogok vs.net-et telepíteni...

    én szkriptelni szoktam, mert egyszerűbb. csináltam jópofa hangerőszabályzó cuccokat meg ilyeneket, amik sokkal kezelhetőbbek, mint exézni...

    gratula b14-nek, a ''lelkes újoncnak''

Aktív témák