Fixed WhatWeb Error
#1
Error :
Code:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:37:in `require': iconv will be deprecated in the future, use String#encode instead.

[Image: FIXWhatweb3_zps2b44bb00.png]

Oke cara untuk mengatasi ini adalah :

1. Buka output.rb pada whatweb

Code:
root@doel:~# leafpad /usr/share/whatweb/lib/output.rb

Cari kode ini :
Code:
obj=obj.gsub!(/^.*$/,Iconv.iconv("UTF-8",@charset,obj).join)

Kemudian hapus kode tersebut dan ganti dengan kode di bawah ini :
Code:
obj = obj.force_encoding('UTF-8')

Setelah itu cari lagi kode ini :

Code:
obj=obj.gsub!(/^.*$/,Iconv.iconv("UTF-8",@charset,obj).join)

Kemudian hapus kode tersebut dan ganti lagi dengan kode di bawah ini :
Code:
obj = obj.force_encoding('UTF-8')

Save & Exit

2. Buka file charset.rb

Code:
root@doel:~# leafpad /usr/share/whatweb/plugins-disabled/Charset.rb

Cari kode ini :
Code:
d=Iconv.iconv("UTF-8",trythis,body).join

Kemudian hapus kode tersebut dua kali dan ganti dengan kode di bawah ini dua kali :

Code:
d = body.force_encoding('UTF-8')

Untuk lebih jelasnya, perhatikan gambar ini :

Spoiler! :
[Image: FIXWhatweb1_zps04086d8a.png]

Maka hasilnya :

Spoiler! :
[Image: FIXWhatweb2_zps465ba709.png]

3. Edit file whatweb

Code:
root@doel:~# leafpad /usr/bin/whatweb

Cari kode ini :

Code:
require 'iconv'

Kemudian hapus kode tersebut, lalu save & exit

Spoiler! :
[Image: FIXWhatweb14_zpsba245b90.png]

Fixed Smile


#2
barusan saya coba di system operating Kali 1.0.5 i386
errornya sama juga hanya saja line errornya yg berbeda 36 dengan 37.
Spoiler! :

[Image: 1.png]


sudah mengikuti steb by steb yg di berikan, dan kemudian saya membukanya
[sploiler]
[Image: 2.png]
[/spoiler]

aduhh, jadi berantakan.

hanya menambahkan jika ada yg mengalami hal serupa dengan saya.
saya kembaliin lagi semua pengaturan yg saya rubah menjadi semula..
hanya menjalankan perintah berikut
Code:
cat /usr/bin/whatweb | sed -e "s/require\ 'iconv'//g" > /usr/bin/whatweb

save. maka akan berjalan sebagaimana mestinya Smile

thanks for post bro,
+1

#3
(09-08-2013, 06:55 AM)Doel Wrote: Error :

Code:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:37:in `require': iconv will be deprecated in the future, use String#encode instead.

[Image: FIXWhatweb3_zps2b44bb00.png]

Oke cara untuk mengatasi ini adalah :

1. Buka output.rb pada whatweb


Code:
root@doel:~# leafpad /usr/share/whatweb/lib/output.rb

Cari kode ini :

Code:
obj=obj.gsub!(/^.*$/,Iconv.iconv("UTF-8",@charset,obj).join)

Kemudian hapus kode tersebut dan ganti dengan kode di bawah ini :

Code:
obj = obj.force_encoding('UTF-8')

Setelah itu cari lagi kode ini :


Code:
obj=obj.gsub!(/^.*$/,Iconv.iconv("UTF-8",@charset,obj).join)

Kemudian hapus kode tersebut dan ganti lagi dengan kode di bawah ini :

Code:
obj = obj.force_encoding('UTF-8')

Save & Exit

2. Buka file charset.rb


Code:
root@doel:~# leafpad /usr/share/whatweb/plugins-disabled/Charset.rb

Cari kode ini :

Code:
d=Iconv.iconv("UTF-8",trythis,body).join

Kemudian hapus kode tersebut dua kali dan ganti dengan kode di bawah ini dua kali :


Code:
d = body.force_encoding('UTF-8')

Untuk lebih jelasnya, perhatikan gambar ini :

Spoiler! :
[Image: FIXWhatweb1_zps04086d8a.png]

Maka hasilnya :

Spoiler! :
[Image: FIXWhatweb2_zps465ba709.png]

3. Edit file whatweb


Code:
root@doel:~# leafpad /usr/bin/whatweb

Cari kode ini :


Code:
require 'iconv'

Kemudian hapus kode tersebut, lalu save & exit

Spoiler! :
[Image: FIXWhatweb14_zpsba245b90.png]

Fixed Smile


Thanks, bro, Tutorial ini, sampe Ke kali linux terbaru 2015 ini Tetap masih bisa di pakai fix bug what webnya.. Big Grin
<p>=========Cyberly================

Indonesian Backtrack Team Regional Aceh

" Walau diam tetap belajar"

GPComp</p>

#4
(09-08-2013, 06:55 AM)Doel Wrote: Error :

Code:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:37:in `require': iconv will be deprecated in the future, use String#encode instead.

[Image: FIXWhatweb3_zps2b44bb00.png]

Oke cara untuk mengatasi ini adalah :

1. Buka output.rb pada whatweb


Code:
root@doel:~# leafpad /usr/share/whatweb/lib/output.rb

Cari kode ini :

Code:
obj=obj.gsub!(/^.*$/,Iconv.iconv("UTF-8",@charset,obj).join)

Kemudian hapus kode tersebut dan ganti dengan kode di bawah ini :

Code:
obj = obj.force_encoding('UTF-8')

Setelah itu cari lagi kode ini :


Code:
obj=obj.gsub!(/^.*$/,Iconv.iconv("UTF-8",@charset,obj).join)

Kemudian hapus kode tersebut dan ganti lagi dengan kode di bawah ini :

Code:
obj = obj.force_encoding('UTF-8')

Save & Exit

2. Buka file charset.rb


Code:
root@doel:~# leafpad /usr/share/whatweb/plugins-disabled/Charset.rb

Cari kode ini :

Code:
d=Iconv.iconv("UTF-8",trythis,body).join

Kemudian hapus kode tersebut dua kali dan ganti dengan kode di bawah ini dua kali :


Code:
d = body.force_encoding('UTF-8')

Untuk lebih jelasnya, perhatikan gambar ini :

Spoiler! :
[Image: FIXWhatweb1_zps04086d8a.png]

Maka hasilnya :

Spoiler! :
[Image: FIXWhatweb2_zps465ba709.png]

3. Edit file whatweb


Code:
root@doel:~# leafpad /usr/bin/whatweb

Cari kode ini :


Code:
require 'iconv'

Kemudian hapus kode tersebut, lalu save & exit

Spoiler! :
[Image: FIXWhatweb14_zpsba245b90.png]

Fixed Smile


Mantab,om.
Nambah ilmu lagi buat saya. Big Grin












Users browsing this thread: 2 Guest(s)