31 October 2014

Javascript, GTK and Windows

GJS (Spidermonkey) and Seed (JSCore) are two Javascript binding for GTK (and other Gnome libraries) via GObject Introspection. The former commonly used by gnome shell, while the latter is a bit dated by now.

There are good demos at https://developer.gnome.org/gnome-devel-demos/stable/js.html.en and https://git.gnome.org/browse/seed-examples/

The build also bundled in PyGObject AIO but certainly shouldn't be there. So I might remove it one day and put it elsewhere.

At the moment only GTK bundled (you could make gui, image viewer etc) though it can use others gnome libraries, but I need to think about the packaging first.


25 October 2014

Attack Surface Analyzer for XP

This utility released by Microsoft long time ago when XP still supported but ironically decidedly for Vista or newer only. I thought it kind of regshot (registry and filesystem snapshot) or similar but turn out a security risks snapshot. I patch it to work with XP (only) because when debug the half native half dotnet apps it actually or at least initially designed for a minimum XP SP2. The patch just change the required NT version from 6 to 5 and it works but hey I'm no security expert kay?

Dedicated to XP diehards:
http://d-h.st/Tk6 (32bit only)

Original source:

06 October 2014

How to enable GCC i686-w64-mingw32 multilib

I always opt i686-w64-mingw32 multilib when building GCC. That mean 32bit by default and 64bit via -m64. in GCC 4.9 (or since GCC 4.8 SEH introduction) this configuration seems to be broken / unsupported. By common sense if x86_64 multilib is supported then the inverse should be possible too.

Here is the patch:

--- D:/Tarball/gcc49s/libgcc/config.host.bak Thu Mar 27 22:40:31 2014
+++ D:/Tarball/gcc49s/libgcc/config.host Sun Sep 28 14:24:20 2014
@@ -646,8 +646,20 @@
  if test x$enable_sjlj_exceptions = xyes; then
-  tmake_eh_file="i386/t-dw2-eh"
-  md_unwind_header=i386/w32-unwind.h
+  case ${host} in
+    i[34567]86-w64-mingw*)
+      if [ "${enable_multilib}" = yes ]; then
+        tmake_eh_file="i386/t-seh-eh"
+      else
+        tmake_eh_file="i386/t-dw2-eh"
+        md_unwind_header=i386/w32-unwind.h
+      fi
+      ;;
+    i[34567]86-pc-mingw*)
+      tmake_eh_file="i386/t-dw2-eh"
+      md_unwind_header=i386/w32-unwind.h
+      ;;
+  esac
  # Shared libgcc DLL install dir depends on cross/native build.
  if test x${build} = x${host} ; then

Might be a bit ugly but still make sense and works! Overall that's just a naming/convention mess. With the patch we should have SJLJ in 32bit and SEH exception in 64bit mode by default (a.k.a no exception handling specified at configure).

20 September 2014

Retro Pacman Game

First post since very a long time hiatus :)

Looking for a real remade for classic pacman but for Windows? there is plenty but I can say funman which is part of funpack.net for windows http://www.classicdosgames.com/game/Funpack.Net_for_Windows.html is the closest one however while it said to be freeware the installer is the original shareware :confused:.

funman with the "entertainment pack" esque

Alternatively, with a quite improved gameplay is njam https://sourceforge.net/projects/njam/files/ which continued as commercial version here http://www.guacosoft.com/njam/About.php. No windows build for the open source version, so I made one. I made a little change of the default setting so it will started in windowed mode (patch included in download)


As a bonus I'd like to share newer win32 version of lbreakout http:/lgames.sourceforge.net/ which solve the mute of winamp (or possibly any other DirectSound playback) when the game started.


njam 1.25
lbreakout2 2.6.3

17 May 2014

Windows XP eXtended Patches

As expected MS are committed to support NT 5.1/5.2 OSes that are not at EOL period such POSReady 2009 (XP based) and most of Server 2003 lines. And our hero at RyanVM/MSFN has convert (ongoing) Post XP EOL updates so it can be installed into normal XP system.

Get it here

See Harkaz's ongoing Unofficial SP4 project here


20 April 2014

PyGI AIO 3.12.x for Win32

With the new GObject-Introspection 1.40, gir generation now works with MinGW-W64 CRT and most docstrings issues seems been squashed too. GTK is not on Windows side though, version 3.12.1 looks buggier where an app (in this case gtk3-demo) will lose toplevel window (the one that is native and directed by OS), wish I have screenshot to show (I will). All 3.10  bugs also persist in 3.12, so despite of lots of new features it's really no good at the moment.

GTK 3.12.1 has lots of fixes in the Win32 theme (FYI, it's controlled by compiled-in css files namely gtk-win32*.css) which I tried to backport to 3.8.9 and 3.10.8 with some success, I also made correction on Windows XP specific part. But realized that perfect "theming emulation" is not possible yet with current css feature and event handling.

Overall there are new lots of libraries joined the AIO packages, with over 100 introspected libraries. The 64 bit port is not convincing... In some of my tests GI fail to resolve to existed exported functions of a dll, possibly getting skipped/mangled in the process. At C level, the libraries/apps behave just as good as 32 bit ones, so the problem is pygobject specific here.

Download for Python 32bit at:

PyGObject homepage:

14 April 2014

Ternyata errornya Indosat kebablasan

Masalah routing "tersesat" Indosat ternyata belum selesai juga (sudah beberapa minggu). Masalah ini membuat pengguna yang hendak browsing jadi seperti diajak main togel. Soalnya rasio tidak tersesatnya 1:10 percobaan. Tapi buat pengguna yang suka download seperti saya ini bukan masalah besar. Lagipula untuk koneksi 128kbps mana bisa buat youtube/fesbuk mau buka buka google+ aja tidak selesai2 doh.

Tapi sebenarnya tinggal pakai Tor saja masalah hampir tuntas. Ya, hampir, karena mbah google agak paranoid sama proxy yang satu ini  (sering di blok) jadi harus pake bing atau lainnya buat pencarian. Dan tidak harus pakai Tor Browser, kamu bisa pakai privoxy sebagai jembatan antara Tor dengan apapun browser pilihanmu (saya masih pakai Opera 12) tinggal arahkan saja proxy addressnya ke localhost:8118 (ini port default-nya)

Kembali ke topik, lalu apanya yang kebablasan? Saya adalah pelanggan Starone unlimited, tepat sebulan lalu saya coba registrasi. Tapi setelah saya kirim INTERNET BLN ke 7825, balasan yang saya dapati adalah "Maaf ada kendala teknis, Silahkan ulangi beberapa saat lagi" lalu saya coba koneksi untuk sekedar cek email ternyata tersambung. Tapi saat saya cek pulsa ternyata belum terpotong biaya bulanan tapi juga tidak terpotong tarif premium  (yang seharusnya terjadi jika tidak berlangganan) justru saya dapat tambahan 23 yups tepat 23. Saya pikir ya sudahlah yang penting bisa ngenet lagi. :-)

Hari ini adalah hari untuk registrasi untuk 1 bulan ke depan, ternyata saya kembali mendapati hal yang sama. :-D

Bentuk kompensasikah? ha ha

O iya mumpung sedang nulis laman lokal, Saya ucapkan selamat untuk Pak Jokowi atas kemenangan PDIP, semoga jadi Presiden RI! JKW4P!

06 February 2014

What a handful Calculator !

I got lot of bitter experience with Windows 8.1 but still quite noob with it. Often I click the wrong shortcut for calculator from the start page where I launch App version instead of desktop version which on the next right list.

Just want to show that Software maker will race to make bloatware that parallel with current hardware level. MS said 8/8.1 has lower RAM requirement than 7 (well for some Windows 7 feature cut off that's already make sense). But probably they're after to compromise something else...

The inherently RAM sucker WindowsApp. After took several seconds to launch an eightened/flattened version of MS Calculator Plus (2005), I decide to look how much RAM it took.

A WindowsApp Calculator took 20MB (more than Virtual Box manager need)
A Vista/7 Calc need 3.5MB
And for the record XP Calc is about 750KB

That's roughly 5x increase for each generation to do the same task: crunching numbers. You could apply this comparison to other WindowsApp too. Also imagine if everything ported to WindowsApp...

Maybe when 32GB RAM  is common for consumer PC the next-gen calc will need 100MB to do "1+1" calculation... complete animated full 3d button with raytraced soft shadow and fully reflective OSD. Wait... at the moment it's backward evolution remember? we're heading to low tech mobile device where you can only view, read, write and play. Wake me up when Ipad can construct the next gen Game.

At the background of the screenshot, you can see the container of an App.. uhh ohh remind me of OSX's App bundle eh? Indeed while you could see numbers.exe there, it won't run by just double click on it (not in desktop mode at least). The container (the main folder) is a hierarchy of executable, settings and resources. This I think is how in the future apps will be standardized for Windows hmm I wonder. I need to have a look more at this stuff considering MS unlikely change their mind to retire desktop app in the future.

Windows 8.1 64bit was run as Guest under VirtualBox 4 under Windows XP 32bit

31 December 2013

A Retrospect for NT 5

This year I've been using Windows 7 for most of the time and only few month ago I decided to back on XP :-) and now it feels like at home again! In those period I found lot of bugs and the quirk of NT 6 so what's the point of getting new OS if you still have bugs to deal? No apparent productivity increase? Yes W7 doing good job at caching (just about everything that matter cached) but it's also a natural step as system with bigger RAM become common nevertheless XP can do some of that too though not as far.

When I go back with XP actually I just upgraded my system, now with 2.9 Ghz CPU and 8GB of RAM, thats right 8GB RAM equipped with 32bit Windows! I took a little experiment with Win 2003 32bit Enterprise (yep this version support BIG RAM), lot of tweaks required to make it behave like XP such as enabling hardware acceleration, sound, etc next I install RRamdisk because some apps refuse to run without pagefile. I allocate 512MB for OB intel GMA and 5GB for rramdisk (4GB pagefile and 1GB for %TEMP%) and it still spare 2.5GB of free RAM. Everything looks great and snappy. With this system I could run 16bit apps directly (OK via ntvdm) or run 64bit apps via VirtualBox. The key is multitasking, if your apps use RAM efficienly and the OS use less memory then you gain productivity! A 32bit apps usually well designed to work with e.g 2GB limit (so unlike 64bit app no need to worry about an app will eat your entire RAM!) though a further tweaks such /3GB ratio or editbin's LAA flagging will provide another scenario.

How about XP64bit? it still basically a dual system so more RAM needed.

I think about next year when XP no longer supported, well first I'm pretty sure the guys at MSFN will make unofficial Rollup Update like they do for Windows 2000. They made it able (to some extent) run some modern apps especially those not relying too much on Win32 API which updated in every major point release and things like .NET/Java. Before April doom come, I will give a test on that Windows 2000 inside Vbox (internet connected) to prove the 0day exploit buzz considering this Windows receive less patches than XP. If it's true then lets try freeze it with EWF/SteadyState, anyway I believe there many people still using it for good reason.

Happy new year XP! you are longest supported PC OS ever!

03 December 2013

Gametop.com Games without Gametop.com Redirection

I like this game library site, there are dozen HQ free racing (my favorite genre) games  for download. As we know the games upon exiting will launch your browser pointing to their site. There seems to be no catch here, no suspicious parameter etc. it's simply "open this url" call, although a googling for privacy concern of these games return a few security paranoid's comments.

Having a look from dependency walker I believe ShellExecute is responsible for the call. I try hex it with another same-length function name of shell32.dll (e.g. CheckEscapes) and yeah that's it.


  1. Download and install free hex editor: WXHexeditor / HexEditor or HxD
    in this case I use HexEditor.
  2. Download the game, in this case Battle Rush.
  3. Browse battle rush executable, open it in HexEditor
  4. battle rush.exe
  5. In HexEditor pres Ctrl-H to bring Find and Replace dialog, find "ShellExecuteA" and for the replacement use "CheckExecutesA" click Replace All. You'll be asked to turn off read only mode, Click ok :
  6. Replace the function
  7. A confirmation of the function being replaced will shown like below. If not, it may be in another name e.g. "ShellExecuteW" -> "CheckEscapesW" just give it a try. You can now save the file. Try run it.
  8. Confirmation