Support Forums

Full Version: How to add EOF support to your crypter!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Have you got a crypter, and want to add EOF?

Well, I'm gonna tell you how.

Add this code to your BUILDER:

Code:
Public Function ReadEOFData(ByRef FilePath As String) As String
        On Error GoTo Err_Renamed
        Dim sEOFBuf, sFileBuf, sChar As String
        Dim lPos2, lFF, lPos, lCount As Integer
        If Dir(FilePath) = "" Then GoTo Err_Renamed
        lFF = FreeFile()
        FileOpen(lFF, FilePath, OpenMode.Binary)
        sFileBuf = Space(LOF(lFF))
        FileGet(lFF, sFileBuf)
        FileClose(lFF)
        lPos = InStr(1, StrReverse(sFileBuf), GetNullBytes(30))
        sEOFBuf = (Mid(StrReverse(sFileBuf), 1, lPos - 1))
        ReadEOFData = StrReverse(sEOFBuf)
        If ReadEOFData = "" Then
        End If
        Exit Function
Err_Renamed:
        ReadEOFData = vbNullString
    End Function

    Sub WriteEOFData(ByRef FilePath As String, ByRef EOFData As String)
        Dim sFileBuf As String
        Dim lFF As Integer
        On Error Resume Next
        If Dir(FilePath) = "" Then Exit Sub
        lFF = FreeFile()
        FileOpen(lFF, FilePath, OpenMode.Binary)
        sFileBuf = Space(LOF(lFF))
        FileGet(lFF, sFileBuf)
        FileClose(lFF)
        Kill(FilePath)
        lFF = FreeFile()
        FileOpen(lFF, FilePath, OpenMode.Binary)
        FilePut(lFF, sFileBuf & EOFData)
        FileClose(lFF)
    End Sub

    Public Function GetNullBytes(ByRef lNum As Object) As String
        Dim sBuf As String
        Dim i As Short
        For i = 1 To lNum
            sBuf = sBuf & Chr(0)
        Next
        GetNullBytes = sBuf
    End Function

Add a new Textbox, and make it so it's not visible.
Add a Checkbox.

Now, add this after the FileClose(1).

You should change the TextBox4.Text to the TextBox ID you just added.
You should change the CheckBox1 to the CheckBox ID you just added.

NOTE: This code MUST go after the FileClose(1)

Code:
TextBox4.Text = ReadEOFData(TextFile.Text)

        If CheckBox1.Checked = True Then
            ReadEOFData(TextFile.Text)
            WriteEOFData(output, TextBox4.Text)
        End If

Credits: xKillerxPanther (For the EOF code)
I haven't tried it, but I trust you're TUT works. Great job man!
Very nice tut will come in handy for newbies who wanna make a cypter, thanks !! Big Grin
(04-05-2010, 06:50 PM)S1cKL3R Wrote: [ -> ]I haven't tried it, but I trust you're TUT works. Great job man!
Yes, it works.

I use it on my crypter. Smile

Thanks.
Hmm, thanks. I needed this for the crypter I plan on making, as I know some things don't crypt without EOF.

Thanks. Rep+'ed.
(04-05-2010, 06:51 PM)«Ðartz™» Wrote: [ -> ]Hmm, thanks. I needed this for the crypter I plan on making, as I know some things don't crypt without EOF.

Thanks. Rep+'ed.
You're welcome, and thanks. Smile
Thank you, will most likely use.
This belongs on HF.