System & Nethood


Mobile29 Sep 2008 06:28 pm

This is for the Lazy guys only!

pppd stable 2.4.4 is already two years old. Don’t expect your pre-compiled pppd can be patched easily. I have to set up a virtual box for compilation for my own EEEpc’s sake.

For the 3G network bogus WINS / DNS issue, in case you are using EEEpc with ubuntu like me, you can try my compiled pppd.

After downloading, do this:

chmod 755 pppd

It is up to you to check against virus and malware.

sudo mv /usr/sbin/pppd pppd.backup
sudo mv pppd /usr/sbin/pppd

If it does not run ( wvdial something ) , just replace it with the backup.

I will test more (with different Netbooks, hopefully) and make some trim down ( possible from 600k -> 300k ) before further announcement.

Mobile29 Sep 2008 11:01 am

Get bogus DNS when connecting ?

Last year I sent a fix for pppd to a router vendor. It seems the discussion had gone open a lot.
That’s good, I don’t need to care about NDA any more.

Please refer to this thread.

Notice that Pete’s latest suggestion is to accept 3 MS-WINS. The patch posted accepts 2 only.

In HK, I do find some cell pumping 3 MS-WINS. So, it would be better modify it before compile. Another approach I have tried is to cache DNS address of the specific profile ( carrier + APN ) to be used. That was my solution dated in Oct 2007. But it seems the DNS problem can be solved by future pppd/distro package update.

System & Nethood03 Sep 2008 04:16 pm

Praise !

Using GownFull in is really fast.

GownFull in Chrome


Hope to see ECMA Script 4 support soon

System & Nethood03 Sep 2008 11:46 am

Since google chrome says “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13″ in HTTP_USER_AGENT

edit your bbclone/lib/browser.php
add this before the entry of Safari

"chrome" => array(
"icon" => "chrome",
"title" => "Chrome",
"rule" => array(
"Chrome/([0-9.]{1,10})" => "\\1"
)
),

create your own icon and place it in bbclone/images/browser_chrome.png
( for me, cp browser_safari.png browser_chrome.png is FAIR enough… )

Done. or wait for official update from bbclone

Tell you, I am more interested in their bug list then the heap.
ref :
Gslin :It reports memory usage of OTHER browsers too
Ericsk: Chrome Process=1 main + n tabs + m extensions, Acid3 : 77 /100
more - follow my google reader shared (on my frienfeed )

I love it ! Click your dear “Reader” in secured Gmail, chrome bangs !
chrome justics

System & Nethood03 Sep 2008 02:22 am

Kudos to odvarko, the firecookie datetime format localization issue I’ve mentioned earlier just got addressed.

Check out the edge version, or you will have to wait for update release later!

System & Nethood26 Aug 2008 07:51 pm

I said google apps will doom google mail. Yes it does.

Google spamming is that easy :

Delivered-To: Me ( someone@gmail.com )
Received: by 10.110.50.14 with SMTP id x14cs53250tix;
Tue, 26 Aug 2008 04:19:18 -0700 (PDT)
Received: by 10.210.16.10 with SMTP id 10mr8236507ebp.150.1219749556827;
Tue, 26 Aug 2008 04:19:16 -0700 (PDT)
Return-Path: <>
Received: from SERVER.bekg-bp.sulinet.hu (szerver.bekg-bp.sulinet.hu [195.199.204.243])
by mx.google.com with SMTP id 3si6278592eyj.3.2008.08.26.04.19.15;
Tue, 26 Aug 2008 04:19:16 -0700 (PDT)
Received-SPF: pass (google.com: domain of SERVER.bekg-bp.sulinet.hu designates 195.199.204.243 as permitted sender) client-ip=195.199.204.243;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of SERVER.bekg-bp.sulinet.hu designates 195.199.204.243 as permitted sender) smtp.mail=
From: postmaster@bekg-bp.sulinet.hu
To: Me ( someone@gmail.com )
Date: Tue, 26 Aug 2008 13:19:14 +0200
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary=”9B095B5ADSN=_01C9075B5F16C7000000020CSERVER.bekg?bp.s”
X-DSNContext: 335a7efd - 4523 - 00000001 - 80040546
Message-ID: <0KvGKPpGU000000ac@SERVER.bekg-bp.sulinet.hu>
Subject: Delivery Status Notification (Failure)

This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail program.

–9B095B5ADSN=_01C9075B5F16C7000000020CSERVER.bekg?bp.s
Content-Type: text/plain; charset=unicode-1-1-utf-7

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

bencsikk@bekg-bp.sulinet.hu

–9B095B5ADSN=_01C9075B5F16C7000000020CSERVER.bekg?bp.s
Content-Type: message/delivery-status

Reporting-MTA: dns;SERVER.bekg-bp.sulinet.hu
Received-From-MTA: dns;r2.sys.sulinet.hu
Arrival-Date: Tue, 26 Aug 2008 13:19:14 +0200

Final-Recipient: rfc822;bencsikk@bekg-bp.sulinet.hu
Action: failed
Status: 5.1.1

–9B095B5ADSN=_01C9075B5F16C7000000020CSERVER.bekg?bp.s
Content-Type: message/rfc822

Received: from r2.sys.sulinet.hu ([195.199.255.34]) by SERVER.bekg-bp.sulinet.hu with Microsoft SMTPSVC(6.0.3790.3959);
Tue, 26 Aug 2008 13:19:14 +0200
Received: from [90.141.112.74] (HELO 50e550ffd71d443)
by r2.sys.sulinet.hu (CommuniGate Pro SMTP 4.3.7)
with SMTP id 48500866 for bencsikk@bekg-bp.sulinet.hu; Tue, 26 Aug 2008 13:19:14 +0200
Message-ID: <7893620.0223967402375.JavaMail.web@broadcast>
To: bencsikk @bekg-bp.sulinet.hu
Subject: vkrtq Buy one, get 4 FREE
From: “Sarahi Skylar” bencsikk @bekg-bp.sulinet.hu
MIME-Version: 1.0
Content-type: multipart/alternative; boundary=”=bvsdvgbbpt46w0axs02vk9×7j63huk”
Date: Tue, 26 Aug 2008 13:19:14 +0200
Return-Path: Me ( someone@gmail.com )
X-OriginalArrivalTime: 26 Aug 2008 11:19:14.0786 (UTC) FILETIME=[92861420:01C9076D]

–=bvsdvgbbpt46w0axs02vk9×7j63huk
Content-Type: text/plain; charset=”iso-8859-1″
Content-transfer-encoding: 8bit

Blah… [SPAM]

System & Nethood04 Aug 2008 09:33 pm

I hate Microsoft.

I just want to do a VERY SIMPLE udp echo test in a XP without compilers.
Guess what? ttcp.exe is AGAIN NOT FIND.

I don’t have the XP SP2 disc at my hand.

- MSDN doesn’t help
- Google doesn’t help
- PCAUSA dump me a nice 404
- Many of my bookmarked missing file providers VANISHED.

I just want a light weight compiled tool to do some udp echo tests. What the hell is searching for UDP echo server client ?
SOURCE , SOURCE , SOURCE , OUTDATED SOURCE, NON-USABLE EXEC, SERVER BUT NO CLIENT,
LINUX, LINUX, LINUX, PERL SCRIPT, CYGWIN….
DAMN!

There is one mighty echotool.exe wildly available for download.
But if you are the generous author of EchoTool, please let me tell you that your great tool comsumes 100% CPU in listener mode, HOLY!

I don’t know what happened to all those nice and safe Win32 UDP echo test executables ONCE available everywhere. They are missed in first 20 pages / top 200 results from my bunch of searches. HOLY Google, well done.

I’ve managed to ask a friend with SP2 disk to send me ttcp.exe two hours later. What a waste of time.


To show up my anger, allow me to add a link to my visitors’ favorite Vista Telnet post.

System & Nethood30 Jul 2008 06:25 pm

I have set up a honeypot to see how actually this blog is getting spam.
Within 6 hours, some 392 trackbacks have been fall into the pot.
I have listed the unique spammer ips here.

Hmm… 392 x 24/6 x 356 = 558208
It seems 50% of the mentioned spams are from trackback pings.

System & Nethood29 Jul 2008 09:34 pm

Last time I have shown a very simple/stupid user script to auto login hkej.com ( 信報財經新聞網站 )

In fact, what it does is not auto log in, but check if you are checked out and try to log-in once. It does not safe you ( me ) from cookie expires. Although it does re-log and so user can go back and click on the link to escape.

I find no way to manipulate cookie with GreaseMonkey directly. This is not too bad in terms of security. I don’t have to steal cookies. I just want to revive them.

1) The simplist trick is to reload the page:

window.setTimeout(window.location.reload,29min_later);

It works. But what if the user left some valuable words in forms ?
All such data will be vanished.

2) Do some minimal ajax load
I cannot sure why, but it does not work. It seems the ajax load within Greasemonkey is bounded by some shields.

3) Load some data into an iframe, and reload the iframe from time to time.
It works. Rather than expected, I can hide those iframe without anyharm.

So I rewrite the code a little bit. This time, I have also taken reference from a famous user script to handle username and password.

Wondering if I shall submit it to userscripts.org ….
Would do so if anyone interested.


// ==UserScript==
// @name Hacks on HKEJ
// @namespace info.bencrox
// @description Make life easier with hkej.com
// @include http://*.hkej.com/*
// @exclude http://*.hkej.com/*/adv/*
// @exclude http://*.hkej.com/*/login.jsp
// ==/UserScript==
	
// ! Private Credentials, BEWARE !
LOGIN_EMAIL = GM_getValue('ejregem','');
LOGIN_PASS = GM_getValue('ejregpw','');
	
// Note : lots FIXME
// by : lxb [at] hkday [dot] net
// ver : 0.1.013 [ 2008 Jul 25 20:00:04 ]
// ! Change Log !
// 0.1.000 [ 2008 Jul 25 18:01:12 ] : base GM + jQ ref htt://www.joanpiedra.com/jquery/greasemonkey
// 0.1.001 [ 2008 Jul 25 18:13:02 ] : add checkLogin() , use Google hosted jQuery
// 0.1.002 [ 2008 Jul 25 18:13:02 ] : checkLogin() add fail handling
// 0.1.003 [ 2008 Jul 27 19:02:13 ] : add excludes
// 0.1.004 [ 2008 Jul 27 22:04:20] : test window.location.reload  and GM Menu
// 0.1.005 [ 2008 Jul 27 22:07:56] : test with partial ajax reload, failed
// 0.1.006 [ 2008 Jul 27 22:13:28] : test with iframes, worked
// 0.1.007 [ 2008 Jul 28 17:35:44] : reload iframes in hidden div by setTimeout
// 0.1.008 [ 2008 Jul 29 21:50:13] : test with GM_setValue / getValue
// 0.1.009 [ 2008 Jul 30 16:02:32] : fixed GM_setValue by not using jQuery
// 0.1.010 [ 2008 Jul 30 16:04:58] : allow manual reset un/pw , blank pw  , ref : http://userscripts.org/scripts/review/16341
// 0.1.011 [ 2008 Jul 30 16:56:16]: fix re-bake loop by adding excludes and choosing better dummy pages
// 0.1.012 [ 2008 Jul 30 17:15:21]: test with extra styling / manual items
// 0.1.013 [ 2008 Jul 30 20:00:04]: clean up test codes
	
// - Change Log -
	
// Add jQuery
var GM_JQ = document.createElement('script');
GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js';
GM_JQ.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(GM_JQ);
	
// Check if jQuery's loaded
function GM_wait() {
if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); }
else { $ = unsafeWindow.jQuery; letsJQuery(); }
}
GM_wait();
	
//renewCookie by fetch the smallest pieces.
//FIXME: they are not quite small... seems idiot method...
    function renewCookie() {
	$('#webifm').attr('src','http://web.hkej.com/template/registration/jsp/login.jsp');
	$('#wwwifm').attr('src','http://www.hkej.com/template/registration/jsp/login.jsp');
    }
	
//call renew cookies every 25mins
    function cookieTimeout() {
	renewCookie();
	window.setTimeout(cookieTimeout,1500000);
    }
	
//provide some way to reset Creds stored in firefox
//FIXME: tell me if I can encrypt things ... -_-
    function resetCredentials(){
		if ((LOGIN_EMAIL = prompt('Registered Email:')) != null){
			GM_setValue('ejregem',LOGIN_EMAIL);
		} else return;
		if ((LOGIN_PASS = prompt('Password (leave blank to prompt every time):')) != null){
			GM_setValue('ejregpw',LOGIN_PASS);
		}
    }
	
// Provide a button to reset Creds if login failed
    function checkLogOK(){
// FIXME: Yes, this must lead to faults afterwards
	ts = document.getElementsByTagName('b')
      if(ts.len){
// FIXME: Cannot use jQuery (GM_setValue within unsafeWindow ) here,
	resetp = document.createElement('button');
	resetp.innerHTML='Reset';
	resetp.addEventListener('click',resetCredentials,true);
	ts[0].appendChild(resetp);
      }
    }
	
// Extract the Log in Operation for manual use
    function AutoLog() {
	if (LOGIN_EMAIL == '') resetCredentials;
	if (LOGIN_PASS == '') LOGIN_PASS = prompt('Password :');
	
// FIXME : this must fail afterward, yes, yes...
	$('#wrapper table:first td:eq(1)')
	  .load('/template/registration/jsp/_login_prg.jsp #regWrap b',
		{login:LOGIN_EMAIL,password:LOGIN_PASS},checkLogOK);
	
    }
	
// Check login
function checkLogin() {
// FIXME : it may not work if hkej update itself
	var login = $('img#Reg_Log').attr('src').indexOf('logout') + 1;
	if (!login) AutoLog();
	cookieTimeout();
}
	
// Hide the cookie ovens
    function Addiframe(){
	$('<div id= "hid"></div>').appendTo('body');
	$('<iframe name="webifm" id="webifm"></iframe>').appendTo('#hid');
	$('<iframe name="wwwifm" id="wwwifm"></iframe>').appendTo('#hid');
	$('#hid').hide();
    }
	
// All your GM code must be inside this function
function letsJQuery() {
	Addiframe();
	checkLogin();
}
	
GM_registerMenuCommand('Login', AutoLog);
GM_registerMenuCommand('Reset ID',resetCredentials);
	

Have fun!

System & Nethood29 Jul 2008 03:30 pm

The ’session expires’ problem kicks me ass again. Thus I open firebug to check how can I extend life.

Adding Firecookie save my time for this task. Yet, up to version 0.6 firecookie shows expire time in GMT only.
I think not much people lives / syncs with GMT. Adding options for proper localized timezone would be nice.

Thus, I filed an issue for the developer.

For those who don’t want to wait, please locate your own ‘firecookie.js’ and s/toGMTString/toLocateString/g .
I don’t think this is a considerate hack. Bear your own risk if you are as lazy as I am.


Notes:
XPI can be upzipped… Tell you, I have not hack things for a long time. I googled decompile xpi … how stupid am i …

Notes 2:
Is that GreaseMonkey does not touch cookies anymore ?
I find that extracting content with jQuery ajax load into a div does not help, but adding a visible iframe does.

Next Page »


Listed on BlogShares