Khamis, 6 Disember 2018

Kenapa kita perlukan outbound port test scanner ?

Assalamualaikum. dah lama tak menulis. kali ni nak cerita pasal outbound port test scanner.

di dalam situasi mana kita perlukan outbound port test scanner ni ? selalunya bila kita berada dalam network yg restricted. menghalang (content filtering) website dan sebagainya.










jadi mengunakan teknik ini, kita akan scan port yg dibenarkan untuk keluar dari network tersebut.

contoh adalah network restricted di ofis saya. didapati hanya port 21,80 dan 443 dibenarkan. rujuk scanner di bawah

scan ke portquiz.net





80 dan 443 melalui proxy dan melalui perlbagai jenis sekatan.

yg menarik adalah port 21. FTP. mari kita lihat sama ada port tersebut diproxy atau tidak.


C:\Users\hairi>telnet routermen.tn.my 21
Connecting To routermen.tn.my...







kita dapati port 21 dibenarkan secara direct.

[root@mail ~]# tcpdump -i bond0 port 21
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bond0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:08:23.231092 IP 203.153.80.58.54997 > routermen.tn.my.ftp: Flags [S], seq 2295775847, win 8192, options [mss 1260,nop,wscale 8,nop,nop,sackOK], length 0

maka kita ubah ssh untuk listen ke port 21 .

edit /etc/ssh/sshd_config

dan bubuh

# possible, but leave them commented.  Uncommented options change a
# default value.

Port 22
Port 21


skang anda dah boleh reverse tunnel ke port 21. hehe













Cisco ASA double Pipe inc search example

cisco asa double pipe  inc 

---- 1st inc DEMO-CUST3
---- 2nd inc xxx.165.13.32

DC1-A1-MASA-01/DEMO# show logging  | inc DEMO-CUST3.*xxx.165.13.32
Jun 15 2017 11:06:41 DC1-A1-MASA-01/DEMO : %ASA-7-106100: access-list DEMO-CUST3 permitted udp DEMO-CUST3/xxx.165.15.132(47347) -> DEMO-OUTSIDE/xxx.165.13.32(123) hit-cnt 1 first hit [0xe09ec6e9, 0x0]
DC1-A1-MASA-01/DEMO#

Rabu, 26 April 2017

website2 sengal yg tehegeh2 nak duit suka block bacaan sekiranya kita ada adblocker


Korang mesti pernah kena kan. korang install ADblocker. mcm ABP . then bila masuk je website. tiba2 ada keluar amaran adblocker kena disable. kalau tak disable xleh baca website.















Berikut adalah caranya.

If you hit an "AdBlock wall" on a site asking to you disable adblock, right click it and hit "Inspect." You can usually hide or delete the "wall" and see the content.

Rabu, 23 November 2016

HTTP GET vs HTTPS GET parameter

Korang mesti biasa guna telnet www.blabla.com 80 untuk test connection kan ?

telnet www.routermenhensem.com 80
GET /index.html HTTP/1.1
Host: www.routermenhensem.com
 
 
 
tapi kalau untuk SSL / HTTPS. caranya berbeza seperti berikut.


openssl s_client -connect www.routermenhensemlagi.com:443
[watch the ssl certificate details scroll by]
GET /index.html HTTP/1.1
Host: www.routermenhensemlagi.com
 
 
 
 
PS: untuk windows. korang kene install OPENSSL client. 

Khamis, 10 November 2016

Cara mudah nak baca log squid proxy.

korang pernah kan view squid access log. pastu tak tau hujung pangkal pasal log tu. sebab waktu dia mcm ni.

^C[root@mail ~]# tail -f /var/log/squid/access.log
1478738828.951    180 192.168.0.6 TCP_MISS/304 345 GET http://w.usabilla.com/7e10fcc350b2.js? - DIRECT/52.62.87.45 -
1478738844.975    887 192.168.0.6 TCP_MISS/200 770 GET http://graph.facebook.com/? - DIRECT/31.13.74.1 application/json
1478739141.465      0 192.168.0.6 TCP_MISS/400 361 GET http://mail.routermen.tn.my:8080/squid-internal-dynamic/netdb - NONE/- -
1478739153.473      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
1478739453.476      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
1478742753.500      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
1478743053.509      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
1478746353.530      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
1478746653.554      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
1478746768.506      0 192.168.0.6 TCP_MISS/400 361 GET http://mail.routermen.tn.my:8080/squid-internal-dynamic/netdb - NONE/- -


mudah je . korang hanya perlu guna command seperti dibawah ni. baru la faham skit timestamp nye.


[root@mail ~]# tail -f /var/log/squid/access.log |  perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'
[Thu Nov 10 08:47:08 2016].951    180 192.168.0.6 TCP_MISS/304 345 GET http://w.usabilla.com/7e10fcc350b2.js? - DIRECT/52.62.87.45 -
[Thu Nov 10 08:47:24 2016].975    887 192.168.0.6 TCP_MISS/200 770 GET http://graph.facebook.com/? - DIRECT/31.13.74.1 application/json
[Thu Nov 10 08:52:21 2016].465      0 192.168.0.6 TCP_MISS/400 361 GET http://mail.routermen.tn.my:8080/squid-internal-dynamic/netdb - NONE/- -
[Thu Nov 10 08:52:33 2016].473      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
[Thu Nov 10 08:57:33 2016].476      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
[Thu Nov 10 09:52:33 2016].500      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
[Thu Nov 10 09:57:33 2016].509      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
[Thu Nov 10 10:52:33 2016].530      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
[Thu Nov 10 10:57:33 2016].554      0 192.168.0.6 TCP_MEM_HIT/200 607 GET http://mail.routermen.tn.my:8080/squid-internal-periodic/store_digest - NONE/- application/cache-digest
[Thu Nov 10 10:59:28 2016].506      0 192.168.0.6 TCP_MISS/400 361 GET http://mail.routermen.tn.my:8080/squid-internal-dynamic/netdb - NONE/- -


korang boleh juga guna command mcm ni



[root@mail ~]# cat /var/log/squid/access.log | perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e' | more
[Sun Nov  6 07:26:49 2016].816   3994 192.168.0.17 TCP_MISS/200 3487 CONNECT secure.informaction.com:443 - DIRECT/69.195.158.195 -
[Sun Nov  6 07:26:50 2016].122    293 192.168.0.17 TCP_MISS/000 0 POST http://ocsp.int-x3.letsencrypt.org/ - DIRECT/ocsp.int-x3.letsencrypt.org -
[Sun Nov  6 07:26:50 2016].198    231 192.168.0.17 TCP_MISS/200 952 POST http://ocsp.digicert.com/ - DIRECT/117.18.237.29 application/ocsp-response
[Sun Nov  6 07:26:50 2016].712    596 192.168.0.17 TCP_MISS/200 8356 GET http://api.mywot.com/0.4/update? - DIRECT/54.186.17.145 application/xml
[Sun Nov  6 07:26:51 2016].162    238 192.168.0.17 TCP_MISS/200 8356 GET http://api.mywot.com/0.4/update? - DIRECT/54.186.17.145 application/xml
[Sun Nov  6 07:26:51 2016].172    422 192.168.0.17 TCP_MISS/200 2268 POST http://ocsp2.globalsign.com/gsdomainvalsha2g2 - DIRECT/104.16.24.216 application/ocsp-respons
e
[Sun Nov  6 07:26:53 2016].420     60 192.168.0.17 TCP_MISS/200 952 POST http://ocsp.digicert.com/ - DIRECT/117.18.237.29 application/ocsp-response
[Sun Nov  6 07:26:57 2016].118    353 192.168.0.17 TCP_MISS/200 910 POST http://clients1.google.com/ocsp - DIRECT/216.58.196.46 application/ocsp-response
[Sun Nov  6 07:26:58 2016].254     62 192.168.0.17 TCP_MISS/200 952 POST http://ocsp.digicert.com/ - DIRECT/117.18.237.29 application/ocsp-response
[Sun Nov  6 07:27:03 2016].072     63 192.168.0.17 TCP_MISS/200 952 POST http://ocsp.digicert.com/ - DIRECT/117.18.237.29 application/ocsp-response
[Sun Nov  6 07:27:03 2016].098  15394 192.168.0.17 TCP_MISS/200 4192 CONNECT secure.mywot.com:443 - DIRECT/52.205.103.6 -
[Sun Nov  6 07:27:06 2016].480    235 192.168.0.17 TCP_MISS/200 1125 GET http://api.mywot.com/0.4/query? - DIRECT/54.186.17.145 application/xml
[Sun Nov  6 07:27:06 2016].676    255 192.168.0.17 TCP_MISS/200 17357 CONNECT s.ytimg.com:443 - DIRECT/216.58.196.46 -

Isnin, 1 Disember 2014

mengawal akses ke host akamai atau dns roundrobin di firewall dengan DNS hijacking.

 memandangkan mengawal akses ke host2 yg mempunyai lebih dari 1 IP. contoh seperti AKAMAI yg ada lebih dari 4000 IP. amatlah sukar. Akamai adalah caching service yg digemari oleh ramai content provider besar2 seperti youtube dan facebook untuk memberikan kelajuan akses pada user serantau. jadi server2 akamai cache ni berada di merata2 tempat . maka sekiranya anda akses ke youtube.com anda akan dilunjurkan ke cache akamai yg berhampiran atau load yg paling optimum. bergantung pada algo DNS system mereka.

namun sekiranya anda adalah seorang security engineer yg ditugaskan untuk mengawal akses ke website2 sebegini. amatlah sukar untuk memblock sesetengah user dan kemudian membenarkan sesetengah user yg lain di firewall. ini kerana IP akamai cache akan berubah2 seperti yg diterangkan di atas.

disinilah kita mengunakan DNS Hijacking untuk memastikan host yg kita mahu hanya akan di resolve kepada 1 IP saja setiap masa.



mula2 add di dalam named.conf

zone "youtube.com" IN {
  type master;
  file "COMMON/db.youtube.com";
};


dan zone files /var/named/COMMON/db.youtube.com pula

$TTL    86400 ; 24 hours could have been written as 24h or 1d
; $TTL used for all RRs without explicit TTL value
$ORIGIN youtube.com.
@  1D  IN  SOA ns1.youtube.com. hostmaster.youtube.com. (
                  200203 ; serial
                  3H ; refresh
                  15 ; retry
                  1w ; expire
                  3h ; minimum
                 )
             IN  NS     ns1.youtube.com. ; in the domain
; server host definitions
ns1          IN  A      127.0.0.1  ;name server definition    
www          IN  A      74.125.135.91  ;web server definition


dah restart named. check log. sama ada ada error atau tidak. pastikan serial numbers tak sama untuk setiap zone files yer.

lepas tu kita test dulu

# dig @127.0.0.1 www.youtube.com  

; <<>> DiG 9.9.4-P1-RedHat-9.9.4-r4 <<>> @127.0.0.1 www.youtube.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- 46803="" br="" id:="" noerror="" opcode:="" query="" status:="">;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.youtube.com.               IN      A

;; ANSWER SECTION:
www.youtube.com.        86400   IN      A       74.125.135.91

;; AUTHORITY SECTION:
youtube.com.            86400   IN      NS      ns1.youtube.com.

;; ADDITIONAL SECTION:
ns1.youtube.com.        86400   IN      A       127.0.0.1

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Dec 01 12:15:04 MYT 2014
;; MSG SIZE  rcvd: 94



lepastu kita kena redirect dns request dari LAN ke named dalam firewall sendiri.

 [ tembokapi root@tembokapi ~]# iptables -L LAN-NET -v
 7367  490K REDIRECT   udp  --  eth1   *       0.0.0.0/0            0.0.0.0/0           udp dpt:53


sekarang anda dapat block atau allow user ke port 443 youtube.com dengan mudah.




namun bagi penguna android. didapati user smartphone mengunakan dns lain untuk mencapai ke youtube apabila mengunakan aplikasi youtube.

so kita tambah lagi dalam zone file kita











cat /etc/named.conf

zone "googlevideo.com" IN {
  type master;
  file "COMMON/db.googlevideo.com";
};





dan zone files /var/named/COMMON/db.googlevideo.com pula



# more  /var/named/COMMON/db.googlevideo.com
$TTL    86400 ; 24 hours could have been written as 24h or 1d
; $TTL used for all RRs without explicit TTL value
$ORIGIN googlevideo.com.
@  1D  IN  SOA ns1.google.com. hostmaster.googlevideo.com. (
                              200203 ; serial
                              3H ; refresh
                              15 ; retry
                              1w ; expire
                              3h ; minimum
                             )
                     IN  NS     ns1.google.com. ; in the domain
; server host definitions
ns1              IN  A      127.0.0.1  ;name server definition    
*                IN  A      74.125.135.91  ;web server definition


kita mengunakan * sebagai wildcard. supaya semua url yg 

Jumaat, 28 November 2014

bila server dah melanyak

baru baru ni kawan aku fedup. server dia asyik melanyak ke internet. sampai google dns pun kene lanyak. dia nak fast workaround sementara dia figureout punca. disebabkan server tu production maka aku teringat iptables burstable. lanyak pakai UDP. mula2 aku try block pakai packet length sebab length dia same je size . tapi tak mau gak. so limit 50 packet sesaat burst 5.

cam ni rules nya

  327  iptables -N udp-flood
  328  iptables -A OUTPUT -p udp -j udp-flood
  329  iptables -A udp-flood -p udp -m limit --limit 50/s -j RETURN
  330  iptables -A udp-flood -j LOG --log-level 4 --log-prefix 'UDP-flood attempt: '
  331  iptables -A udp-flood -j DROP


alhamdulillah. workaround berjaya kekang attack tu ke internet.

[root@esm_database /]# iptables -L udp-flood -vn
Chain udp-flood (1 references)
 pkts bytes target     prot opt in     out     source               destination        
28495   29M RETURN     udp  --  *      *       0.0.0.0/0            0.0.0.0/0           limit: avg 50/sec burst 5
 140M  142G DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0          
[root@esm_database /]#



142GB tak sampai 3 minit. *poning den*

Jumaat, 22 Februari 2013

Cara merawat kepak angel wing

http://zzlittlefarm.blogspot.com/2010_03_01_archive.html

Selasa, 14 Ogos 2012

CCTV Di Putrajaya

Memandangkan routing ke rumah aku melalui putrajaya. maka adanya cctv access dari web ini amat-amatlah dialu-alukan. yelah, kadang2 kat ofis cerah, kat putrajaya hujan ke, mana kita tau kan. best gak dapat gambaran live tentang keadaan cuaca di putrajaya sebelum memulakan gerakan balik ke rumah :) dapat gak lah estimate hujan ke tak rumah aku hehe ..

ni link nya.

http://cctv.ppj.gov.my/ppjcctv/

Best :D

Isnin, 6 Ogos 2012

Jalankan Adroid Apps di PC ?

yup. mungkin ramai yg dah pernah pakai youwave. tapi bagi saya youwave ni agak boring lah. skang mari kita cerita pasal blue stacks.  Kalau nak bandingkan blue stacks dengan youwave, blue stacks lebih menarik dari segi penerimaan applikasi android. keupayaan untuk run application dengan option pilihan fungsi tablet atau smartphone amat menarik. tapi bab stability agak tak stabli tapi standardlah baru beta kan . dengar cite blue stacks ni pun akan berbayar mcm youwave. tapi tak tau lah. alah kalau bayar pub korang crack gak so tak kisah la kan. hehe ..



untuk download boleh pegi ke http://bluestacks.com/

applikasi pertama yg saya run guna bluestacks adalah angry bird space. best gak. huhu

Selasa, 1 Mei 2012

Google Drive Vs Dropbox vs BOX

Korang pernah pakai sync drive ? mmg best ade sync drive. lagi lagi bila korang nyer device lebih dari satu dan lebih dari satu tempat. contoh  terbaik apabila korang nak copy file dari pc rumah ke pc ofis atau ke phone atau tablet etc. by now, korang mesti pernah pakai atau atleast pernah dengar BOX atau dropbox.

apa benda tu ? namanya cloud storage. maksud cloud storage ni, semua file yg anda simpan di dalam cloud storage sebenarnya ada di alam maya. yup. di internet. bezanya apabila cloud storage ditambah dengan drive sync. menyebabkan setiap pc yg connected kepada system cloud storage ini akan dapat file yg anda telah uploadkan ke dalam cloud storage tu.  senang kan ?

BOX paling lama kot. tak sure tapi dulu jadi hangat sekejap lah sebab dia kasi free 50GB untuk android device. tapi untuk sync drive , hanya user yg bayar je kot dapat kemudahan ni ( kalau salah tolong betulkan )

DROPBOX ni best. walaupun free version dapat 2 GB ( bagi aku cukup dah ). tapi kemudahan sync drive dia menyebabkan akses ke cloud storage adalah semudah membuka my document folder anda . fantastik ^__^.  kemudahan lain seperti network sync menyebabkan transfer file antara pc yg berada dalam LAN adalah satu benda yg mudah. saya mmg rekemen DROPBOX ni .

tapi skang ade Google Drive. google drive ni sama macam dropbox.. bezanya ? hehe dia kasi 5GB free. so yer. saya mungkin meminati DROPBOX. tapi mungkin lepas ni saya akan beralih pada google drive plak. hehe ..

sape2 dah cuba ? saya baru hari ni test .

Jumaat, 2 Mac 2012

Missing iertutil.dll ?

dah nak pegi solat jumaat. sempat lagi post satu benda. Missing iertutil.dll . Semalam nak clean up program windows yg tidak dikehendaki. saya remove internet explorer 8. rupanya dia remove sekali iertutil.dll menyebabkan explorer.exe tak boleh jalan ( dan start menu dan icon di desktop semua ghaib).

jangan bimbang. mula2 download iertutil.dll di sini ( kene download pakai pc lain) : http://www.dll-files.com/dllindex/dll-files.shtml?iertutil

unrarkan file tu dan copy masuk thumbdrive.

reboot system anda yg bermasalah tadi. masuk save mode with command prompt .

kemudian masukkan trhumbdrive. anda kena teka thumbdrive letter anda berapa . contoh thumbdrive letter anda adalah E:


dalam command prompt

A:> e:

E:>

E:> copy iertutil.dll c:\Windows\system

reboot system anda.

insyallah system anda selamat. start menu dah kelihatan.

terima kasih. ok jom pi solat jumaat

Jumaat, 3 Februari 2012

Cooler Master GX650


Baru je beli Cooler Master Gx650 untuk rig core 2 duo aku. yg best nyer .. aku beli benda ni dalam kotak tak bukak lagi dengan harga RM 50 . still ada 3 tahun warranty .. hahaha amacam best tak ? mmg best hehe .. pas ni SLI stable balik kot . harap2 lah .

Selasa, 31 Januari 2012

Dell optiplex GX 240

Optiplex Gx240. mini desktop yg menarik dan terlebih maju pada era nya. hehe. aku beli 2ndhand rig ni dekat 5 tahun sudah dengan harga berpatutan . ( Rm 200 jer) . Harini aku reformat rig tu dengan windows XP sp3. slow giler babas. pastu windows dia pun sangkut2. pening pale memikirkan. rupanya Drive dia run under PIO mode. patutlah terhegeh2 jer windows aku. wargh.. sawan.. cek dalam bios . rupanya setup dia dah lari ke default mode ( bios batery dah kiok). disebabkan aku tak beli lagi bios batery, aku tukar PIO mode ke DMA3. kemudian aku reset DMA status dalam windows xp. ( xp sengal skit, kalau dia detect DMA error 6 kali , dia akan stick pada PIO mode selagi kita tak reset).

-----code---
' Visual Basic Script program to reset the DMA status of all ATA drives

' Copyright © 2006 Hans-Georg Michna

' Version 2007-04-04

' Works in Windows XP, probably also in Windows 2000 and NT.
' Does no harm if Windows version is incompatible.

If MsgBox("This program will now reset the DMA status of all ATA drives with Windows drivers." _
& vbNewline & "Windows will redetect the status after the next reboot, therefore this procedure" _
& vbNewline & "should be harmless.", _
vbOkCancel, "Program start message") _
= vbOk Then

RegPath = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}\"
ValueName1Master = "MasterIdDataChecksum"
ValueName1Slave = "SlaveIdDataChecksum"
ValueName2Master = "UserMasterDeviceTimingModeAllowed"
ValueName2Slave = "UserSlaveDeviceTimingModeAllowed"
ValueName3 = "ResetErrorCountersOnSuccess"
MessageText = "The following ATA channels have been reset:"
MessageTextLen0 = Len(MessageText)
ConsecutiveMisses = 0
Set WshShell = WScript.CreateObject("WScript.Shell")

For i = 0 to 999
RegSubPath = Right("000" & i, 4) & "\"

' Master

Err.Clear
On Error Resume Next
WshShell.RegRead RegPath & RegSubPath & ValueName1Master
errMaster = Err.Number
On Error Goto 0
If errMaster = 0 Then
On Error Resume Next
WshShell.RegDelete RegPath & RegSubPath & ValueName1Master
WshShell.RegDelete RegPath & RegSubPath & ValueName2Master
On Error Goto 0
MessageText = MessageText & vbNewLine & "Master"
End If

' Slave

Err.Clear
On Error Resume Next
WshShell.RegRead RegPath & RegSubPath & ValueName1Slave
errSlave = Err.Number
On Error Goto 0
If errSlave = 0 Then
On Error Resume Next
WshShell.RegDelete RegPath & RegSubPath & ValueName1Slave
WshShell.RegDelete RegPath & RegSubPath & ValueName2Slave
On Error Goto 0
If errMaster = 0 Then
MessageText = MessageText & " and "
Else
MessageText = MessageText & vbNewLine
End If
MessageText = MessageText & "Slave"
End If

If errMaster = 0 Or errSlave = 0 Then
On Error Resume Next
WshShell.RegWrite RegPath & RegSubPath & ValueName3, 1, "REG_DWORD"
On Error Goto 0
ChannelName = "unnamed channel " & Left(RegSubPath, 4)
On Error Resume Next
ChannelName = WshShell.RegRead(RegPath & RegSubPath & "DriverDesc")
On Error Goto 0
MessageText = MessageText & " of " & ChannelName & ";"
ConsecutiveMisses = 0
Else
ConsecutiveMisses = ConsecutiveMisses + 1
If ConsecutiveMisses >= 32 Then Exit For ' Don't search unnecessarily long.
End If
Next ' i

If Len(MessageText) <= MessageTextLen0 Then
MessageText = "No resettable ATA channels with Windows drivers found. Nothing changed."
Else
MessageText = MessageText & vbNewline _
& "Please reboot now to reset and redetect the DMA status."
End If

MsgBox MessageText, vbOkOnly, "Program finished normally"

End If ' MsgBox(...) = vbOk

' End of Visual Basic Script program


---code end---

save as resetdma.vbs. kemudian run. Lepas tu aku reboot. windows XP aku kembali ceria dengan kelajuan yg amat memberansangkan. terbaek . sapa kata system lama tak power . hehe

Ahad, 25 Disember 2011

netselect-apt untuk cari repo terpantas

root@ragnarok.cybersyndicate:~# netselect-apt
Running netselect to choose 1 out of 369 addresses.
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
The fastest server seems to be:
http://ftp.hk.debian.org/debian/

Writing sources.list.
Done.
root@ragnarok.cybersyndicate:~#

hehe senang hidup aku. tima kasih debian

Khamis, 13 Oktober 2011

Kedekut nyer TM . ntp server tak share ngan orang lain

root@motorola-bladeA:~# ntpq -p ntp.jaring.my
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp1a.jaring.my .RSTR. 16 u - 64 0 0.000 0.000 4000.00
ntp1b.jaring.my .RSTR. 16 u - 64 0 0.000 0.000 4000.00
*ntp2b.jaring.my 192.228.128.220 2 u 508 512 376 1.568 0.094 0.077
ntp2c.jaring.my .DROP. 16 u 14 256 0 0.000 0.000 4000.00
61.6.32.62 .INIT. 16 u - 1024 0 0.000 0.000 4000.00
vtime1.jaring.m .RSTR. 16 u - 128 0 0.000 0.000 4000.00
vtime2.jaring.m .RSTR. 16 u - 128 0 0.000 0.000 4000.00
vtime3.jaring.m .RSTR. 16 u - 128 0 0.000 0.000 4000.00
LOCAL(0) LOCAL(0) 9 l 14 64 377 0.000 0.000 0.004
root@motorola-bladeA:~# ntpq -p ntp.tm.net.my
ntp.tm.net.my: timed out, nothing received
***Request timed out
root@motorola-bladeA:~#

kedekutnyer TM . lahabao tul.

Khamis, 18 Ogos 2011

The Perfect Pizza Doh

Peter Reinhart's Napoletana Pizza Dough Recipe

Heidi notes: Peter's recipe says the olive (or vegetable oil) is optional. I use it every time - always olive oil, not vegetable oil. I love the moisture and suppleness it adds to the dough, and it makes your hands soft too.

4 1/2 cups (20.25 ounces) unbleached high-gluten, bread, or all-purpose flour, chilled
1 3/4 (.44 ounce) teaspoons salt
1 teaspoon (.11 ounce) instant yeast
1/4 cup (2 ounces) olive oil (optional)
1 3/4 cups (14 ounces) water, ice cold (40°F)
Semolina flour OR cornmeal for dusting

1. Stir together the flour, salt, and instant yeast in a 4-quart bowl (or in the bowl of an electric mixer). With a large metal spoon, stir in the oil and the cold water until the flour is all absorbed (or mix on low speed with the paddle attachment), If you are mixing by hand, repeatedly dip one of your hands or the metal spoon into cold water and use it, much like a dough hook, to work the dough vigorously into a smooth mass while rotating the bowl in a circular motion with the other hand. Reverse the circular motion a few times to develop the gluten further. Do this for 5 to 7 minutes, or until the dough is smooth and the ingredients are evenly distributed. If you are using an electric mixer, switch to the dough hook and mix on medium speed for 5 to 7 minutes, or as long as it takes to create a smooth, sticky dough. The dough should clear the sides of the bowl but stick to the bottom of the bowl. If the dough is too wet and doesn't come off the sides of the bowl, sprinkle in some more flour just until it clears the sides. If it clears the bottom of the bowl, dribble in a tea- spoon or two of cold water. The finished dough will be springy, elastic, and sticky, not just tacky, and register 50 to 55F.

2. Sprinkle flour on the counter and transfer the dough to the counter. Prepare a sheet pan by lining it with baking parchment and misting the parchment with spray oil (or lightly oil the parchment). Using a metal dough scraper, cut the dough into 6 equal pieces (or larger if you are comfortable shaping large pizzas), You can dip the scraper into the water between cuts to keep the dough from sticking to it, Sprinkle flour over the dough. Make sure your hands are dry and then flour them. Lift each piece and gently round it into a ball. If the dough sticks to your hands, dip your hands into the flour again. Transfer the dough balls to the sheet pan, Mist the dough generously with spray oil and slip the pan into a food-grade plastic bag.

3. Put the pan into the refrigerator overnight to rest the dough, or keep for up to 3 days. (Note: If you want to save some of the dough for future baking, you can store the dough balls in a zippered freezer bag. Dip each dough ball into a bowl that has a few tablespoons of oil in it, rolling the dough in the oil, and then put each ball into a separate bag. You can place the bags into the freezer for up to 3 months. Transfer them to the refrigerator the day before you plan to make pizza.)

4. On the day you plan to make the pizza, remove the desired number of dough balls from the refrigerator 2 hours before making the pizza. Before letting the dough rest at room temperature for 2 hours, dust the counter with flour, and then mist the counter with spray oil. Place the dough balls on top of the floured counter and sprinkle them with flour; dust your hands with flour. Gently press the dough into flat disks about 1/2 inch thick and 5 inches in diameter. Sprinkle the dough with flour, mist it again with spray oil, and cover the dough loosely with plastic wrap or a food-grade plastic bag. Now let rest for 2 hours.

5. At least 45 minutes before making the pizza, place a baking stone either on the floor of the oven (for gas ovens), or on a rack in the lower third of the oven. Heat the oven as hot as possible, up to 800F (most home ovens will go only to 500 to 550F, but some will go higher). If you do not have a baking stone, you can use the back of a sheet pan, but do not preheat the pan.

6. Generously dust a peel or the back of a sheet pan with semolina flour or cornmeal. Make the pizzas one at a time. Dip your hands, including the backs of your hands and knuckles, in flour and lift I piece of dough by getting under it with a pastry scraper. Very gently lay the dough across your fists and carefully stretch it by bouncing the dough in a circular motion on your hands, carefully giving it a little stretch with each bounce. If it begins to stick to your hands, lay it down on the floured counter and reflour your hands, then continue shaping it. Once the dough has expanded outward, move to a full toss as shown on page 208. If you have trouble tossing the dough, or if the dough keeps springing back, let it rest for 5 to 20 minutes so the gluten can relax, and try again. You can also resort to using a rolling pin, though this isn't as effective as the toss method.

7. When the dough is stretched out to your satisfaction (about 9 to 12 inches in diameter for a 6-ounce piece of dough), lay it on the peel or pan, making sure there is enough semolina flour or cornmeal to allow it to slide. Lightly top it with sauce and then with your other top- pings, remembering that the best pizzas are topped with a less-is-more philosophy. The American "kitchen sink" approach is counterproductive, as it makes the crust more difficult to bake. A few, usually no more than 3 or 4 toppings, including sauce and cheese is sufficient.

8. Slide the topped pizza onto the stone (or bake directly on the sheet pan) and close the door. Wait 2 minutes, then take a peek. If it needs to be rotated 180 degrees for even baking, do so. The pizza should take about 5 to 8 minutes to bake. If the top gets done before the bottom, you will need to move the stone to a lower self before the next round. if the bottom crisps before the cheese caramelizes, then you will need to raise the stone for subsequent bakes.

9. Remove the pizza from the oven and transfer to a cutting board. Wait 3 to 5 minutes before slicing and serving, to allow the cheese to set slightly.

Makes six 6-ounce pizza crusts.

from The Bread Baker's Apprentice by Peter Reinhart (Ten Speed Press) - reprinted with permission

Algo Hex Iptables. wicked :D

Filtering Gmail/Facebook/Twitter with IPtables

In most cases port base filtering is an all or none approach. For example if you want to block a user from accessing a certain website, blocking that user’s access to port 80/443 outbound will stop them from accessing all websites not just that one. If you would like to get more granular then you would need some sort of web content filtering systems.

Good news is, if you are still using iptables you are now able to filter traffic destined to sites such as Facebook, Twitter, Gmail etc. You can accomplish this by using iptables to block a given hex string that will appear in the initial packet handshake. I first saw this technique being discussed in a full-disclouser posting and I figured it was worth trying out.

The tools of choice here is Ngrep (Network Grep) and IPTables .

Step one: Capture the X.509 certificate

You will be doing this by using ngrep:

[infolookup@Test ~]# ngrep -d eth2 -q -x ‘Twitter’
interface: eth2 (10.100.0.0/255.255.255.128)
match: Twitter

You will then notice the following output in your terminal:

T 199.59.148.11:443 -> 10.100.0.119:38414 [A]

  1. 30 30 31 16 30 14 06 03 55 04 0a 14 0d 54 77 69 001.0…U….Twi
  2. 74 74 65 72 2c 20 49 6e 63 2e 31 1c 30 1a 06 03 tter, Inc.1.0…
  3. 55 04 0b 14 13 54 77 69 74 74 65 72 20 20 4f 70 U….Twitter Op

Step two: Creating your IPtable rule

You will be building your rule based on the hex string obtained above.

Prior to applying the rule I able to run the following command:

[infolookup@Test]$ curl –connect-timeout 60 https://www.twitter.com/


301 Moved Permanently

Moved Permanently


The document has moved here.


IPtable rules to use:
http://pastebin.com/1HQD017A

sudo iptables -I INPUT -m string –algo bm –hex-string ‘|303031163014060355040a140d547769747465722c20496e632e311c301a060355040b141354776974|’ -j DROP

sudo iptables -I INPUT -m string –algo bm –hex-string ‘|303031163014060355040a140d547769747465722c20496e632e311c301a060355040b141354776974|’ -j LOG

The first rule will drop the connection to twitter and the second rule will log the entry. If you take a look at your /var/log/message you will see the following entry over and over:

Apr 7 00:05:11 Test kernel: [870656.036848] IN=eth2 OUT= MAC=00:50:56:b2:53:90:00:23:5e:a4:f2:bf:08:00 SRC=199.59.148.11 DST=10.100.0.119 LEN=1420 TOS=0×00 PREC=0×00 TTL=44 ID=58494 DF PROTO=TCP SPT=443 DPT=49542 WINDOW=23 RES=0×00 ACK URGP=0

Apr 7 00:05:19 Test kernel: [870664.675930] IN=eth2 OUT= MAC=00:50:56:b2:53:90:00:23:5e:a4:f2:bf:08:00 SRC=199.59.148.11 DST=10.100.0.119 LEN=1420 TOS=0×00 PREC=0×00 TTL=44 ID=58496 DF PROTO=TCP SPT=443 DPT=49542 WINDOW=23 RES=0×00 ACK URGP=0

If you try to access www.twitter.com you will get to the site, but when you try login the session will set there and just timeout.

[infolookup@Test]$ curl –connect-timeout 60 https://www.twitter.com/
curl: (35) SSL connect error

Note:

I was unable to use the following IPtable rule on a Ubuntu based system but it worked fine on my Fedora 14 test box. Also another thing to look out for is if you use too short of a hex string will will get an error the one I used was about 85 characters give or take.

Have fun filtering and post your comments about how you are currently using IPtables.

Selasa, 2 Ogos 2011

senangnyer hidup bila ada website cam ni

dulu terkial2 nak write .htacess bila dah dapat CIDR satu2 negara yang aku nak block dari dapat xs website aku ( China dan Russia) hehe. tapi skang dah senang bila ada http://www.countryipblocks.net . tima kasih sape yg buat website ni . anda memang best

Isnin, 30 Mei 2011

SSHFS dalam windows ?

sape yang suka guna sshfs dalam linux mesti teringin nak mount folder linux dari windows kan ? tapi sshfs takde dalam windows ? takpe. dokan dah port.

cara dia . 1st download dan install dokan yer library kat windows anda.

http://dokan-dev.net/wp-content/uploads/DokanInstall_0.6.0.exe

kemudian download dokansshfs. unzip dan click dokanSSHFS

http://dokan-dev.net/wp-content/uploads/dokan-sshfs-0.6.0.zip

masukkan login dan password. port dan pastikan drive letter anda tidak bertindih.

pastu check dekat mycomputer . anda akan dapat satu drive baru. yakni drive linux anda .

hehe. best :D

ps: kalau nak mount lebih dari satu drive. click lagi skali dokansshfs pastu make sure drive letter korang ubah. kang nanti tak leh mount plak