Penulis Topik: Mau Nanya lagi nih!! tolong masuk!!  (Dibaca 1367 kali)

Offline SenSen

  • Pro10
  • ***
  • Tulisan: 18
  • Reputation: 61
    • Lihat Profil
Mau Nanya lagi nih!! tolong masuk!!
« pada: Juni 13, 2012, 07:39:57 PM »
Soba Smadaver,
saya mau nanya,
RTP kan pake database yang ada di project,
trus sc nge aktifin nya gimana?
kyk gini ya?  :(

[spoiler=ModDatabase]
Public Function Scan_Folder(SingPath As String)
Dim FileNow As String
Dim FSO As Object
Dim sFile As Object
Set FSO = Nothing
On Error Resume Next

LoadVirusDatabase ' inisialisasi DB
'If isDir(SingPath) = False Then Exit Function
    Set FSO = CreateObject("Scripting.FileSystemObject")
    For Each sFile In FSO.GetFolder(SingPath).Files
        DoEvents
        FileNow = sFile
        If isFileX(FileNow) = True Then
        ' even2 ketika mendapatkan file pada sebuah folder yang di chek
            Cek_Virus (FileNow)
        End If

    Next
End Function
'===============================
Public Sub LoadVirusDatabase()
On Error Resume Next

Dim dbFile As String
Dim sData As String
Dim VirStr(1 To 2) As String
Dim strArray(920) As String
Dim i As Long

strArray(1) = "WORM.BADASS;1085DD16"
strArray(2) = "WORM.LOVGATE.W;10C08823"
strArray(3) = "WORM.ADRENALINE;11278EE4"
strArray(4) = "WORM.RODAL.A;118701D3"
strArray(5) = "BDS.1060.AL;1187C59B"
strArray(6) = "TH.ANNOYER;1237C3C1"

   For i = 1 To UBound(strArray)
        VirStr(1) = Split(strArray(i), ";")(0)
        VirStr(2) = Split(strArray(i), ";")(1)
        VirusName.Add VirStr(1)
      VirusSign.Add VirStr(2)
      Next i

 End Sub
'===================
Private Function Cek_Virus(filenya As String)
If VirStr(1) = ceksum(filenya) Then 'ceksum itu buat nyamain crc32 database sama crc32 dile
    PesanAlert.Show
    PesanAlert.Text1.Text = Nama_Virus(0)
    PesanAlert.Text2.Text = filenya
    PesanAlert.Text3.Text = "Medium"
    PesanAlert.Image2.Visible = True
End If
[/spoiler]

bisa tolong di perbaiki gk?  :D
gw pake rtp_mode.ctl  :D

Offline MAbdanMulia

  • Pro100
  • ****
  • Tulisan: 104
  • Reputation: 505
  • Jenis kelamin: Pria
    • Lihat Profil
Re: Mau Nanya lagi nih!! tolong masuk!!
« Jawab #1 pada: Juli 04, 2012, 03:03:40 PM »
Soba Smadaver,
saya mau nanya,
RTP kan pake database yang ada di project,
trus sc nge aktifin nya gimana?
kyk gini ya?  :(

[spoiler=ModDatabase]
Public Function Scan_Folder(SingPath As String)
Dim FileNow As String
Dim FSO As Object
Dim sFile As Object
Set FSO = Nothing
On Error Resume Next

LoadVirusDatabase ' inisialisasi DB
'If isDir(SingPath) = False Then Exit Function
    Set FSO = CreateObject("Scripting.FileSystemObject")
    For Each sFile In FSO.GetFolder(SingPath).Files
        DoEvents
        FileNow = sFile
        If isFileX(FileNow) = True Then
        ' even2 ketika mendapatkan file pada sebuah folder yang di chek
            Cek_Virus (FileNow)
        End If

    Next
End Function
'===============================
Public Sub LoadVirusDatabase()
On Error Resume Next

Dim dbFile As String
Dim sData As String
Dim VirStr(1 To 2) As String
Dim strArray(920) As String
Dim i As Long

strArray(1) = "WORM.BADASS;1085DD16"
strArray(2) = "WORM.LOVGATE.W;10C08823"
strArray(3) = "WORM.ADRENALINE;11278EE4"
strArray(4) = "WORM.RODAL.A;118701D3"
strArray(5) = "BDS.1060.AL;1187C59B"
strArray(6) = "TH.ANNOYER;1237C3C1"

   For i = 1 To UBound(strArray)
        VirStr(1) = Split(strArray(i), ";")(0)
        VirStr(2) = Split(strArray(i), ";")(1)
        VirusName.Add VirStr(1)
      VirusSign.Add VirStr(2)
      Next i

 End Sub
'===================
Private Function Cek_Virus(filenya As String)
If VirStr(1) = ceksum(filenya) Then 'ceksum itu buat nyamain crc32 database sama crc32 dile
    PesanAlert.Show
    PesanAlert.Text1.Text = Nama_Virus(0)
    PesanAlert.Text2.Text = filenya
    PesanAlert.Text3.Text = "Medium"
    PesanAlert.Image2.Visible = True
End If
[/spoiler]

bisa tolong di perbaiki gk?  :D
gw pake rtp_mode.ctl  :D

Itu fungsi pencocokkan / engine scan RTP aja  :-\
mampir sini untuk mendapatkan path file yg dibuka explorer : http://smadaver.com/programming/(ask)-bagaimana-cara-membuat-rtp-di-antivirus-sendiri-(vb6)/

btw, kalau nulis post yang jelas gan [mencerminkan isi postingan] :D
Cmiiw
 
« Edit Terakhir: Juli 04, 2012, 03:07:47 PM oleh abdanmulia »

Offline Pieter Poker

  • Pro10
  • ***
  • Tulisan: 42
  • Reputation: 80
    • Lihat Profil
Re: Mau Nanya lagi nih!! tolong masuk!!
« Jawab #2 pada: Agustus 21, 2012, 05:12:51 PM »
kalau gak bisa.jgn sok .otak-atik dehhhh