chuso.net

Tag: hack

How I recovered the system after renaming ld.so

Yes, I know, it may be a little stupid renaming ld.so, can we skip this detail?
It's not something I do very often, but that day I felt like I had to innovate or something like that.

But innovation was a disaster, it is not a good idea to rename a library linked using its exact path by all system dynamic executables, just to take into account if you are going to have the same idea.


Fighting Firefox password reminder

The situation is as follows: a website which, after logging in with a username and a password, allows you to register new users and a Mozilla Firefox user with the option to remember passwords enabled.

The case: the user adds a new account or logs in with an account and then edits this account from another account.

The problem: When the user is adding the new account Firefox will fill the fields with the user and password of the current account. When the user is editing an existing account Firefox will fill the fields with the username and password from the account being edited —which is also in the password reminder— if the user is not editing the account with the intent to change its password will not notice that only the first of the two fields "Password" and "Repeat password" is filled, so when the user tries to save it will display "Passwords don't match" error.


Linux kernel module that allows you to set events on pressed keys

As a probe of the use of kprobes for Extension of Operating Systems I have made a Linux module that allows you to execute a command for every pressed key and see its keycode.

It includes some sample scripts that can be used as the command to be executed on every key pressed, these scripts are:

  • keylogger

    Registers every pressed key in a file.

  • printscr

    If framebuffer is enabled it allows doing a console screenshot using print screen key.


Portage sound notifications

The context: you run emerge with --ask parameter and, since it can take some time to calculate dependencies, you do some other thing. After a while, when you've forgotten it, you discover that emerge have ended calculating dependencies time ago and it's waiting for your confirmation when it could be already done. Has this ever happened to you? Me too. This is why I added sound notifications to some Portage events.


Looking for modified files in Gentoo packages

Did you know that teTeX development was abandoned more than two years ago? And it's recommended to migrate to TeX Live. When I was doing so by reading the Gentoo Linux guide I found that it says: if you have modified configuration files under /etc/texmf.... How will I know that? I modified many configuration files and I can't remember which ones I've modified. I thought about using equery to check that, but I only know the command to check all the files in a package, not a single file, so I thought that it would be easier to do my own script than to read the whole equery man page. So here it is, the script that checks if certain files in a package were modified:


RapidShare premium download with Opera

I must blame Fonso again, because he asks me about something like FlashGot but for Opera in Linux, i.e., a way to be able to select a block of RapidShare URLs to download them with a premium account with a download manager. So when I didn't find anything, I started with it.

I finally got a bash script that receives a list of links as parameters and adds them to Aria with a RapidShare premium account. Using aria was not a choice, since it was the only one, apart from wget, that supports RapidShare premium accounts (i.e., HTTP authentication) without problems.


New Google Docs and Opera

Update: This workaround is no longer needed with Opera 9.50 which seems to solve this problem. Check your version and update if needed.

Google has recently developed a new Google Docs version and if you thought they took the chance to improve (at least a little) the compatibility with other browsers, you couldn't be more mistaken. Actually, it went worse with Opera.

If previously it was enough by adding ?browserok=true in order to enter Google Docs with Opera and mask it as Internet Explorer to use Spreadsheets, now it gets constantly reloading with Google Docs and Spreadsheets is only usable with a poor read-only interface (masking Opera as IE throws errors).


Adding links to MLDonkey from Opera

I envied Firefox extension for MLDonkey which allows you to add elinks and torrents to MLDonkey from the browser with a single click, even if MLDonkey is running in other PC. It's a luxury I want to have in Opera, is quite easy.

It should be even easier using -remote openURL() Opera parameter, but I got problems doing it this way (it seems to ignore %U parameter), so I finally did it this way:


Bypass Canalmail

If you usually visit community portals in the PHPNuke style and similar you may find that some webpages say that you need to register with Canalmail to be able to access to any section (for example, download links). Canalmail is a very annoying commercial mass mail service and since one of the webpages I usually visit now uses Canalmail I finally made this script with JavaScript that replaces intermediate Canalmail URLs by the effective URL avoiding registering with Canalmail.


Set Up Balls Number In Neverball

Neverball infinite lifes

If you don't know it you should try it. Neverball is one of the best free games (thanks, Adian), based on Monkey Target minigame from Super Monkey Ball. It's a bit difficult the first time, but then it becomes quite entertaining and very addictive.

In one of those nightly Neverball sessions two days ago, this time with PedrE, we got the idea: Why only three lifes? It's very annoying when you are obstinate to have only three tries and you have to go back to main menu to select again the same level. Why we can't have infinite lifes?. Well, here it is, the patch to be able to set up the number of balls in Neverball. You have to use balls option in ~/.neverball/neverballrc file, with negative values meaning infinite balls.