Kamis, Mei 29, 2008

virus KSPOOLD dan Langkah untuk merecovey

Langkah untuk merecover file DBF yang rusak oleh virus KSPOOLD

Kerusakan data yang disebabkan oleh virus KSPOOLD adalah mengganti header dari file yang berextension DBF (Kalau file data dbf yg sudah diganti extensionnya, tidak diserang). Karena header setiap file dbf tidak sama ukurannya, ini tergantung dari jumlah field, maka untuk file yang jumlah fieldnya sedikit, virus bisa menyerang record. Hal ini diperhatikan karena disengaja oleh pembuatnya agar ukuran file tidak berubah. Untuk memperbaiki header file dbf yang rusak bisa dilakukan dengan bantuan utility UltraEdit yang dapat di download versi trial nya di :
http://www.tucows.com/preview/194610


Langkah perbaikan :
1. Buka file dbf yang rusak
2. Buka file yang masih baik dgn struktur yang sama dengan file yang rusak, atau buat file baru yang strukturnya sama dgn file yang rusak


http://www.4freeimagehost.com/resized/661e423da80b.jpg

3. Blok header data yang clean mulai dari batas header dgn record sampai ke awal file, klik
kanan pilih copy



http://www.4freeimagehost.com/resized/356df9b42c02.jpg

4. Blok header data yang rusak mulai dari batas antara header dgn record sampai awal file, klik kanan pilih paste




http://www.4freeimagehost.com/resized/b505b91753db.jpg
5. Simpan data yang rusak dgn cara masuk ke Menu, Pilih File lalu Save. Perbaikan data tahap pertama sudah selesai, hasilnya masih belum bisa dibaca oleh VFP, karena jumlah record yang tercatat pada data yang rusak tidak sama dengan yang di kopikan.
6. Perbaikan selanjutnya saya menggunakan tool yang berfungsi untuk memperbaiki header file dbf yg kerusakannya tidak parah dgn Tabel Repair Utility (Program Terlampir)
7. Klik Pilih File, cari file yang disimpan melalui UltraEdit, ini tampilannya

8. Klik Tombol Ganti Pada baris jumlah Recor
9. Klik Tombol Ganti Pada baris ukuran file
10. Bila File yg Anda Recover mempunyai Field Memo sedangkan file memonya tidak tersedia, ubah Table Flag menjadi Has CDX File, kemudian klik Ganti.
11. Klik Buka File ...untuk membuka file yang sudah di recover, pada bagian bawah terdapat record sampah, buang saja .. !

Data yang rusak sudah bisa diselamatkan.

Semoga dapat membantu.
Salam Fox Mania.

(Kutipan dari PaissiaP al. Ismuddin mailto:ismuddin@yahoo.com)

Kill Virus KSPOOLD

Buat File BAT dengan menggunakan Notepad serta berilah namanya sesuai keinganan anda (mis. kspoold_killer.bat) dan simpan kedalam ext bat.

Copy pastekan command dibawah ini kedalam file tsb. Jangan lupa untuk menyimpannya balik.

echo off
cls
REM — ubah warnacolor a
REM — ubah judultitle KSPOOLD KILLER * by M. Husni Adil
REM — masuk ke
direktori sistem%SYSTEMDRIVE%cd %SYSTEMROOT%\system32
echo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~echo KSPOOLD KILLER * by M. Husni
Adilecho ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~echo After you press any
keys on your keyboard, I doecho - removing related registryecho - stopping
kspoold processecho - deleting kspoold file in the system directoryecho
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~echo.
pause
echo.REM —
hapus registry yang dibuat sebagai service virusreg delete
“HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\kspooldaemon” /freg delete
“HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\kspooldaemon” /freg delete
“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kspooldaemon” /f
REM —
hentikan proses virustaskkill /IM kspoold.exe /F /T
REM — set atribut file
virus menjadi normalattrib -s -h -r kspoold.exe
REM — hapus file virusdel
kspoold.exe
cls
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~echo
KSPOOLD KILLER * by M. Husni Adilecho
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~echo After you press any keys on
your keyboard, I doecho - removing related registryecho - stopping kspoold
processecho - deleting kspoold file in the system directoryecho
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~echo.echo Press any key to
continue . . .echo.
echo Well done - The “kspoold” was completely
removedecho.
pause

Get a Serial

*!*Get a serial#
LPARAMETERS drvPath
IF PCOUNT()=0
drvPath = "C:"
ENDIF
LOCAL FS,F1,cSerial
drvPath = IIF(LEN(drvPath)=1,drvPath+":",drvPath)
fs = CreateObject("Scripting.FileSystemObject")
f1 = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutePathName(drvPath)))
cSerial = f1.SerialNumber
RELEASE fs,f1
RETURN RIGHT(TRANSFORM(cSerial, "@0"), 8)

Rabu, Mei 28, 2008

Select Dengan Limit

TEXT TO sqlcmd PRETEXT 3 NOSHOW
SELECT user_id,pass_id,grup_id,nama_grup,pemakai.tanggal,pemakai.author from pemakai
inner join grup on pemakai.grup_id=grup.kode_grup order by user_id asc limit 10
ENDTEXT

Register Dll

***********************************************************************
* Download from : http://fox-mania.blogspot.com/
***********************************************************************
* Program....: REGISTER.PRG
* Compiler...: Visual FoxPro 07.00.0000.9465
* Purpose....: Wrapper to Select and Register DLL & EXE files
***********************************************************************
LPARAMETERS tlUnRegister, tcFile, tlNoShow
LOCAL llReg, lcTxt, lcFile, lcType, lnResult, lcCmd, lcParams, lcStr, lcMsg
*** Set the action flag based on first param
*** If EMPTY() assume .F., therefore REGISTER
*** IF NOT EMPTY() assume .T. and UN-REGISTER
llReg = IIF( EMPTY( tlUnRegister ), .F., .T. )
*** Set the GetFile Prompt accordingly
lcTxt = IIF( tlUnRegister, "UN-Register", "Register" )
IF VARTYPE( tcFile ) = "C" AND NOT EMPTY( tcFile )
*** We can assume we got a file name
IF FILE( tcFile )
*** And the file exists on the current search path
lcFile = FULLPATH( tcFile )
ELSE
*** We need to get it's full name and location
lcFile = GETFILE( 'DLL;EXE', lcTxt )
ENDIF
ELSE
*** Get the full name and location of the file
lcFile = GETFILE( 'DLL;EXE', lcTxt )
ENDIF
*** Did we end up with a file?
IF EMPTY( lcFile )
MESSAGEBOX( "No file specified to " + lcTxt, 64, "Nothing to do" )
RETURN
ENDIF
*** If we get this far we have a defined action, and a file name to work with
*** Set up the ShellExecute API function to run the process
DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
INTEGER lnHWnd, ;
STRING lcAction, ;
STRING lcTarget, ;
STRING lcExeParams, ;
STRING lcDefDir, ;
INTEGER lnShowWindow
*** Populate the File and Parameter variables depending on the task
lcType = JUSTEXT( lcFile )
IF llReg
*** UNREGISTER
IF lcType = "DLL"
lcCmd = "REGSVR32"
lcParams = " /s /u " + lcFile
ELSE
lcCmd = lcFile
lcParams = " /unregserver"
ENDIF
ELSE
*** REGISTER
IF lcType = "DLL"
lcCmd = "REGSVR32"
lcParams = " /s " + lcFile
ELSE
lcCmd = lcFile
lcParams = " /regserver"
ENDIF
ENDIF
*** Now Call ShellExecute to run the registration
lnResult = ShellExecute( 0, 'open', lcCmd, lcParams, "", 1 )
*** Result >32 = Success, otherwise its an error code (see below for meaning)
IF lnResult <=32 AND NOT tlNoShow
*** Show the error list
TEXT TO lcStr NOSHOW
0 The operating system is out of memory or resources.
1 The function is incorrect.
2 The specified file was not found.
3 The specified path was not found.
5 Access denied
8 Out of memory
11 The .exe file is invalid (non-Win32® .exe or error in .exe image).
26 Sharing violation
27 Association incomplete or invalid
28 DDE request timed out
29 DDE transaction failed
30 Other DDE transactions were being processed
31 No application associated with file name extension or file is not printable
32 DLL Not found
ENDTEXT
lcMsg = UPPER(lcTxt) + " Operation failed with Error: " + TRANSFORM( lnResult ) + CHR(13) + CHR(10)
lcMsg = lcMsg + "Command Line = '" + lcCmd + " " + lcParams + "'" + CHR(13) + CHR(10)
lcMsg = lcMsg + " ----------------------------------------------------"+ CHR(13) + CHR(10)
lcMsg = lcMsg + lcStr
MESSAGEBOX( lcMsg, 16, 'API Call Failed' )
ENDIF
*** Return the result
RETURN lnResult