Neuronworks Blog, WebMethods, Oracle, Bea, Java Dev2Dev, Arch2Arch Neuronworks Make IT Easy, Let's Play the Game » ICT

Archive

Archive for the ‘ICT’ Category

Javascript Refresh Page

February 13th, 2009

Sewaktu membutuhkan sebuah fungsi javascript untuk merefresh halaman utama, saya menggunakan kode berikut:

window.location.href = window.location.href;

Dari semua browser yang saya coba (Mozilla Firefox, KDE Konqueror, Google Chrome, Apple Safari, Opera Software Opera, Microsoft Internet Explorer), cuma satu yang ngeyel. Yang mana coba? :)

Solusinya harus dicek terlebih dahulu browser yang digunakan, karena setelah googling IE hanya mau ngerefresh menggunakan:

history.go(0);

Untuk mengetahui browser yang digunakan kita ambil nilai navigator.appName:

var v_browserName=navigator.appName;

Berikut kode lengkapnya:

function refreshPage(){
var v_browserName=navigator.appName;
    if(v_browserName=="Microsoft Internet Explorer"){
        history.go(0);
    }
    else{
        window.location.href = window.location.href;
    }
}

Javascript , , ,

Oracle Password Cracker (Checker)

January 30th, 2009

Definisi : Adalah script yang ditulis dalam PL/SQL digunakan untuk membantu DBA melakukan pengecekan weakness/strength user password.

Keuntungan :

  1. Mudah di jalankan di sqlplus
  2. Tidak menggunakan library
  3. Mudah dipelajari
  4. Dapat melakukan pengecekan terhadap weakness/strength user password yang complex dan panjang sekalipun dengan cepat.
  5. Karena script ini di jalankan di database, DBA dapat melakukan blocking hal yang tidak diinginkan dengan mendesign user prilivileges seminimal mungkin. Contohnya jika menggunakan privileges untuk CREATE SESSION, SELECT ON SYS.USER$ dan EXECUTE ON DBMS_OBFUSCATION_TOOLKIT.

Cara Kerja :

  1. Download cracker-v2.0.sql. Source dapat dicari di http://www.petefinnigan.com.
  2. Letakkan source di $ORACLE_HOME/BIN atau directory mana saja. Pastikan oracle dapat membaca source tersebut.
  3. Buka SQLPLUS di Oracle dan jalankan script seperti contoh di bawah ini :
    SQL> @cracker-v2.0.sql
    cracker: Release 1.0.4.0.0 - Beta on Fri Jan 30 11:40:38 2009
    Copyright (c) 2008 PeteFinnigan.com Limited. All rights reserved.
     
    T Username             Password               CR FL STA
    =======================================================
     
    U "SYS"                [                    ] -- -- OP
    U "SYSTEM"             [                    ] -- -- OP
    U "OUTLN"              [OUTLN               ] DE CR EL
    R "GLOBAL_AQ_USER_ROLE [GL-EX {GLOBAL}      ] GE CR OP
    U "DIP"                [DIP                 ] DE CR EL
    U "DMSYS"              [DMSYS               ] DE CR EL
    U "DBSNMP"             [                    ] -- -- OP
    U "WMSYS"              [WMSYS               ] DE CR EL
    U "EXFSYS"             [EXFSYS              ] DE CR EL
    U "ORDSYS"             [ORDSYS              ] DE CR EL
    U "ORDPLUGINS"         [ORDPLUGINS          ] DE CR EL
    U "SI_INFORMTN_SCHEMA" [SI_INFORMTN_SCHEMA  ] DE CR EL
    U "MDSYS"              [MDSYS               ] DE CR EL
    U "CTXSYS"             [CHANGE_ON_INSTALL   ] DE CR EL
    U "OLAPSYS"            [MANAGER             ] DE CR EL
    U "WK_TEST"            [WK_TEST             ] DE CR EL
    U "XDB"                [CHANGE_ON_INSTALL   ] DE CR EL
    U "ANONYMOUS"          [IMP {anonymous}     ] IM CR EL
    U "SYSMAN"             [                    ] -- -- OP
    U "MDDATA"             [MDDATA              ] DE CR EL
    U "WKSYS"              [CHANGE_ON_INSTALL   ] DE CR EL
    U "WKPROXY"            [CHANGE_ON_INSTALL   ] DE CR EL
    U "MGMT_VIEW"          [                    ] -- -- OP
    U "SCOTT"              [TIGER               ] DE CR EL
    U "LOCALPGI"           [PGI                 ] BF CR OP
    U "NEURONPGI"          [PGI                 ] BF CR OP
    U "PIE"                [PIE                 ] PU CR OP
     
    INFO: Number of crack attempts = [3351766]
    INFO: Elapsed time = [265.12 Seconds]
    INFO: Cracks per second = [12640]
     
    PL/SQL procedure successfully completed.

Keterangan :

  • Kolom T : Mengidentifikasikan ‘U’ser dan ‘R’ole
  • Kolom Username : Mengidentifikasikan Username atau Rolename
  • Kolom Password : Mengidentifikasikan password yang berhasil di crack atau blank/kosong jika tidak berhasil di crack. [IMP {Impossible Value}] digunakan untuk jenis password yang mustahil/impossible. Untuk Instance settingnya [HASH{hash value}], hash digunakan karena password di set default tapi tidak diketahui apa isinya dan tentu saja dapat diubah. Untuk GLOBAL atau EXTERNAL password menggunakan [GL-EX {GLOBAL}].
  • Kolom CR : Mengidentifikasikan metode untuk set password. ‘DE’fault, ‘PU’ artinya password di set oleh username, ‘DI’ctionary artinya password disimpan di dictionary, ‘BF’ artinya password di set dengan paksa, ‘IM’ untuk impossible, ‘GE’ untuk GLOBAL/EXTERNAL, ‘HS’ untuk hash, ‘–’ artinya password tidak berhasil di crack.
  • Kolom STA : Mengidentifikasikan status account. ‘OP’ artinya open, EL artinya Expired/Locked untuk instance.

Dari contoh di atas ada 5 password yang tidak berhasil di crack, sedangkan 82% berhasil di crack dengan mudah. Ini menunjukkan bahwa setting password mempunyai kelemahan.Bayangkan betapa berbahayanya jika ini sampai terjadi di suatu sistem yang sangat besar dan penting…

Oracle

Border-radius: create rounded corners with CSS3!

January 30th, 2009

W3C has offered some new options for borders in CSS3, of which one is border-radius. Both Mozila/Firefox and Safari 3 have implemented this function, which allows you to create round corners on box-items. This is an example:

Mozilla/Firefox and Safari 3 users should see a nicely rounded box, with a nicely rounded border.

The code for this example above is actually quite simple:

<div style=" background-color: #ccc;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #000;
padding: 10px;" >

These different corners can also each be handled on their own, Mozilla has other names for the feature than the spec says it should have though, as it has f.i. -moz-border-radius-topright as opposed to -webkit-border-top-right-radius:

Mozilla/Firefox and Safari 3 users should see a box with a rounded left upper corner.
Mozilla/Firefox and Safari 3 users should see a box with a rounded right upper corner.
Mozilla/Firefox and Safari 3 users should see a box with a rounded left lower corner.
Mozilla/Firefox and Safari 3 users should see a box with a rounded right lower corner.

These are handled by / should be handled by:

  • -moz-border-radius-topleft / -webkit-border-top-left-radius
  • -moz-border-radius-topright / -webkit-border-top-right-radius
  • -moz-border-radius-bottomleft / -webkit-border-bottom-left-radius
  • -moz-border-radius-bottomright / -webkit-border-bottom-right-radius

Sumber : http://www.css3.info

html & css

Redesigning with HTML 5 and WAI-ARIA

January 30th, 2009

For the past few months, I’ve been lucky enough to tour places like Indonesia talking about cutting-edge web development languages like HTML 5 and WAI-ARIA.

My new year resolution was to actually start using them, so made an HTML 5 test page to show that at least some those useful new elements can be used now.

But a test page isn’t real world, so the logical next step was to redesign this site to use the new technologies. While my blog is a set of old-school static documents with none of the “Web 2.0? Ajax sexiness that would best show off these technologies, it has one thing in its favour: it’s five years worth of often-dodgy markup (I was learning!) with 3000 or so comments, some containing unsanitised code. It’s a reasonable road-test for HTML 5, which was specifically designed for backwards compatibility. This is still a test; validation errors are part of that, although if you see any post with broken layout or unreadble content, please let me know. Read more…

html & css

XHTML yang valid di W3C

January 29th, 2009

Berikut ini code xhtml yg valid di w3c :

  • Penulisan tag harus huruf kecil, contoh: <a>,<p>, <br />.
  • Setiap tag <> yang tanpa ada akhiran </> selalu menggunakan “/” pada setiap akhir sebelum “>”.
    Contoh: <input type=”text” id=”" name=”" />, <br />.
  • Untuk file flash tidak lagi menggunakan <embed></embed>, cukup menulikan seperti:
    <object width=“145″ height=“146″ type=“application/x-shockwave-flash” data=“file.swf”>
    <param name=“movie” value=“file.swf” />
    <param name=“quality” value=“high” />
    <param name=“wmode” value=“transparent” />
    </object>
  • Pada awal code html  :
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

    <html xmlns=“http://www.w3.org/1999/xhtml”>
  • Selalu gunakan petik ganda (“”).

Demikian kurang lebih sedikit tentang xhtml, klo ada kurang maafin aja namanya jg masih belajar, he he he.

html & css