Showing posts with label Screenshots. Show all posts
Showing posts with label Screenshots. Show all posts

Saturday, March 5, 2022

grIP v1.1

grIP version 1.1 adds the ability to send and receive data from any ports that are found open. It also fixes a small bug.

The latest version can be downloaded from here, and the signature from here.

Wednesday, January 19, 2022

grIP v1.0

For my port and IP scanning needs I often used Angry IP Scanner. I've been using it in Windows XP since the early 00's and it's still good, even after its more recent Java rewrite.

While using it a few days ago it, some features of it and the lack of some others, gave me a nudge to write my own scanner. Go seemed like a good language for it, given it's amazing multithreading abilities and its easy to use standard library.




I called it grIP and it has a few somewhat unique, I think, features.
  • Shuffled, not random, scanning. I wanted it to shuffle the whole list of IP-port combinations and scan them in parallel. Angry IP Scanner has random scanning (but not shuffled) which in theory is not good for scanning humongous IP ranges (being a GUI app) and it will also repeat some IPs. So, for example, scanning 254 random IPs on the 192.168.0.0/24 range will not scan all of the IPs because some will be chosen more than once. The main problem with making a shuffled scan is that when scanning ranges like the whole IPv4-port range, which is 281470681743360 ports, shuffling it properly is impossible. Even having to keep a single bit for every of these ports to remember whether it's been scanned or not would occupy 32GiB of RAM. So I chose to do a half-assed shuffle: I chose a random starting point on that range, I chose a somewhat random step size which is co-prime with the size of the range, and then step through the range using that step size until I reach again my starting point. With the two numbers being co-primes this method is guaranteed to visit every port exactly once before looping back to the starting point. On top of it every 1 million ports generated with this method are also buffered and truly shuffled to further improve the shuffle. So, not a perfectly shuffled scan, but it's shuffled and it uses very little RAM.
  • One thread per port, not one thread per IP. Angry IP Scan uses one thread per IP, so if you are trying to scan 65354 ports in a 254 IP LAN, it will at best run 256 threads, and it's still quite slow. GrIP can use 3900 threads, at least on a Linux box. The 1 thread per IP that seems to be used by Angry IP Scanner doesn't seem to be an arbitrary limitation though, and it may even have it's uses. If you scan a single IP with many threads, it may fail to respond to some of your port checks and you may see less open ports than it really has. So keep that in mind when scanning with grIP.
  • IPv6 support. Limited to single IPs but it's there. I tried to add support for IPv6 ranges, but it needs some datatypes to be reworked so I may do that in a future version if I need it or if someone requests it.
  • Scan partitioning, for cooperative scans. You can split the ports to be scanned and do only part of the scan while other computers or other people do the other parts.
It's a console app that runs on Windows, Linux, Mac and the Raspberry Pi (well, any ARM Linux really). Similarly to Aperito, it uses a non standard style of command line arguments where the order matters and "-h" style arguments don't exist. 

Some example commands:
  • grip 192.168.0.1-192.168.0.254
    Scans all ports in your LAN (if that's your range).
  • grip 80,20-25 192.168.0.1-192.168.0.254
    Same range but only port 80 and ports 20 to 25.
  • grip 80,20-25 192.168.0.1/24
    Same but CIDR notation.
  • grip 22,80 192.168.0.15 2a00:1450:4014:80e::200e
    Port 22 and 80 on one IPv4 and one IPv6.
  • grip host=www.example.com
    All ports on www.example.com.
  • grip 80-85 192.168.0.17 90-95 192.168.0.21-192.168.0.31
    Ports 80 to 85 on one IP and ports 90 to 95 on a range of IPs.
  • grip sockets=2 192.168.0.1/24 timeout=100
    All ports in your LAN but using only 2 instead of the default 100 sockets in parallel and with a 100ms timeout instead of the default 2000ms. The sockets and timeout parameters can go anywhere in the arguments.
  • grip 0.0.0.0/0 1/3 sockets=3900
    grip 0.0.0.0/0 2/3 sockets=3900
    grip 0.0.0.0/0 3/3 sockets=3900
    Three commands, to be run on three separate computers, that cooperatively scan the whole IPv4 internet for any open ports using 3900 sockets each in parallel. It will still never finish but it's 3 times faster than doing it alone. :-)
  • grip 150.150.100.0/24 rdns
    Scans a range and also shows the reverse DNS of any finds. Again, the "rdns" can go anywhere in the arguments.
  • grip 192.168.0./24 file=mylan.txt
    Scans your LAN and appends the open ports found to mylan.txt.
There are also a couple of verbosity related commands and you can find more info by simply running the program in a console so that it prints a help page.

  The latest version can be downloaded from here, and the signature from here.

Update: v1.0.1 Fixes a bug in Windows and some tiny details in the help page.

Wednesday, April 27, 2011

BTConvert v7

BTConvert, my currency converter that includes BTC in the available currencies, has reached version 7. This version was made with the help of Andrzej. It now supports many more currencies as you can see:


Specifically it supports:
  • Bitcoin
  • US dollar
  • Euro
  • Pound sterling
  • Australian dollar
  • Linden dollar (that's Second Life's currency)
  • Pecunix
  • Russian ruble
  • Canadian dollar
  • Polish złoty
A detailed changelog can be found inside the source code which is included in the zipfile.

Download BTConvert v7 from here.

Remember there is a forum thread about BTConvert here.

How to create portable applications (also introducing PAL)

It seems that the most popular article on this blog is "How to make portable applications" written back in 2007. Reading it again, I believe it is somewhat outdated and it covers mostly how to reduce the size of an app and not how to make it actually portable (meaning leaving no traces and carrying the registry settings along to other computers).
In this article I will include some more methods to make portable apps and I will also introduce PAL, the Portable Application Launcher: a small program I made to wrap applications and turn them into portable ones. Obviously everything here is for Windows users. Also do not forget that it's almost impossible to make an app portable if it uses its own drivers.

Legal stuff
Do not forget that it might be against the license terms of a program to fiddle with its installation. And keep in mind that redistributing some apps in portable form could be infringing copyrights and thus illegal. Blah blah blah you know this stuff... In order to be safe you either have to respect the law, or to make sure they won't get you...
Method 1: Plain old UPXing and manual file removal
This is the method I described in the older article. It will work with some programs, specifically those that don't use the registry to store settings or any directories like %appdata%. If you want to try this method, then the first thing you should do is install the program you want to make portable using the authors instructions and run/exit it at least once. Don't forget that if you install the 64bit version of an application, it will only work on 64bit Windows.
Now we should see whether your app stores anything in %appdata% (%appdata% is a directory in your hard drive where applications store files like save-games or settings files). My %appdata% is at C:\Users\Tritonio\AppData\Roaming. To see where is yours, press Win+R (Win is the Windows key on your keyboard) to bring up the Run dialog. Then type %appdata% and press enter. A folder should pop up. There you can find subfolders made by different programs that you have installed or ran in the past on your computer. If the program you are trying to make portable has a subfolder here, then you should probably skip this method. Don't forget that the program doesn't necessarily use its name for the subfolder, it could be its company's name for example, so look thoroughly!
After you've made sure that there is no subfolder there you should also take a look in the %localappdata% and %userprofile% folders, just like you did for %appdata%. Fewer applications store data there usually, but you shouldn't risk it, so please check those places thoroughly. Again, if you find a subfolder there, then this method is not for you.
Now you have to make sure that the app doesn't store anything in the registry. Again bring up the Run dialog by pressing Win+R and then type regedit and press enter to open the registry editor. There, navigate to HKEY_CURRENT_USER\Software and then to HKEY_LOCAL_MACHINE\SOFTWARE and look for any subfolder that could belong to the program. If you find one, then your program stores settings in the registry and this method won't work.
Now that you've made sure there are no stray settings you can start packing your application. Go to program files (I guess that's where you installed it) and find the folder that contains it. If you are on a 64bit OS, then you should probably look at c:\Program Files (x86). After you find that directory, copy it somewhere (like a flash drive) and take that copy to a different computer (it could be a virtual machine) with the same OS as you computer.
On the second computer run the main executable. It could complain about dll's missing. If that's the case, then search for them in your first computer (Where could help) and copy them right next to the main executable of the program. You might need to do this many times (bringing the flash drive back and forth) so using Dropbox to sync those files easily would be a good idea.
After the program stop complaining about missing files you are pretty much finished. Now you will just have to compress every executable in it. I suggest you use ArcThemAll for that. Install it, run it, go to settings, UPX tab, select LZMA and click OK. Then drag and drop the whole copied folder on ArcThemAll main window. After it adds all files in the list, select UPX from the bottom left drop-down list, click Extract and then START. This will decompress all executables in case they were already compressed so when it finishes, click Compress and then START again to recompress everything using LZMA (which usually compresses better).
That's it. Your copy should contain a portable version of the app you wanted. If you fell lucky and want to further reduce the size of it, you can start erasing files from the copy. For example many apps keep different language files while you only need one. Still feeling lucky? Why don't you try removing unecessary resources form the executable files using Resource Hacker? You can even replace image resources with lower resolution ones to save a few more KB.  Just remember that Resource Hacker will not work on compressed executables so use ArcThemAll to extract everything first.

Method 2: Portable Application Launcher
If you are reading my blog you might have noticed some portable versions of some apps that I have made. I am using a "homemade" wrapper for them called PAL. I originally made it to pack Angry IP Scanner for personal usage (I haven't published it anywhere, yet) but it should work for many apps that use the registry to store settings or in some folder like %appdata%.
PAL uses an INI file, which you will have to manually edit. A typical file will look like this:
[PALOptions]
Executable="App\ares.exe"
RegistryPath="HKCU\Software\Ares"
FilesPath="%localappdata%\Ares"
The first line is always the same.
The second line is the main executable of your portable app. This is what PAL will execute. In this case it is called ares.exe and should be in a folder named App next to PAL's executable.
The third line is the registry path where the portable application is storing it's settings. When you exit the portable application, PAL will copy the settings in that registry path to a file called PortableRegistry.dat (placed right next to PAL's executable). When you start the portable app again (by launching PAL of course as it will act as a wrapper for it), PAL will copy the settings in PortableRegistry.dat back to the registry, so that the program won't know that they were even missing.
The fourth line is a path in the filesystem where the portable app stores any kind of files (for example savegames). Just like before PAL will move these files into a folder named \PortableData when you exit the portable app and back to the filesystem when you rerun it.

So just like in the first method, install the program you want to make portable. Then download PAL from here, unzip it somewhere and copy the program's directory from the place it was installed right next to PAL.exe. You may rename that directory to App if you want (just like in the sample INI file above).
Then run and exit it once and start searching as described in the first method for places in the registry or in the filesystem where the installed program might be storing settings. Currently PAL can only handle one registry path and one filesystem path. This is adequate for most apps I've seen. If you app uses, for example, two folders in the filesystem to store settings, PAL will not be able to completely handle that app, meaning it will leave traces or not even work.
After finding where this app stores its settings, open and edit PAL.ini. Edit the Executable= line so that it points to the main executable of your application. The RegistryPath= line should point to the registry path where you application stores its settings. If your app doesn't use the registry just delete this line completelly. The FilesPath= should point to the place in the filesystem where your app stores files or settings. As you can see in the sample INI above, you may use enviroment variables like %appdata% etc. If your app doesn't use a directory in the filesystem to store data, then just delete this line completelly. When you are done editing it, save PAL.ini. You may also rename PAL.exe to whatever you want but do not rename PAL.ini.
Now take that portable version to another computer (again, it can be just a virtual machine) to test it by running PAL.exe.
In case you wondered what happens if you try to run the portable version of an app on a computer that already has that app installed, PAL can handle that just fine. It will first backup the local version settings to appropriate files, copy the portable settings to the registry and/or the filesystem (replacing the local settings), run the program and when the program exits it will save the settings back to the portable files and then bring back the old local settings that it has backed up.
The only thing that PAL might not be able to handle is a shutdown before closing the portable app. In cases like these it might not have time to cleanup the portable settings or bring back the local settings (if any) from the backup. If this happens to you just rerun PAL on the same computer and it will probably fix everything.
Keep in mind that PAL is still in beta so there might be bugs. So if you find any, leave a comment! Oh and since many people asked, you can change PAL's icon either by recompiling it with a different icon (AutoIt3 source code is included in the zipfile) or you could use ResHacker to change the icon.

Method 3: Using ThinApp
First of all ThinApp is proprietary software and is really, I mean REAAAAAAAALY, expensive. Like $5000-expensive... It wasn't made just for making portable apps but I bet more than 80% of the people that use it, have torrented a cracked version and are using it to make portable apps. There is a trial version too which you can get from their site. The general procedure is this:
  1. Get ThinApp. Get VirtualBox.
  2. Install VirtualBox.
  3. Create a new virtual machine and install a copy of Windows on it. Prefer the same version as the one you are running. For more detailed instruction look here.
  4. Install the Guest Additions.
  5. Transfer ThinApp's setup files in the virtual machine. You can use the Shared Folders functionality to tranfer files into the VM and back.
  6. Install ThinApp.
  7. Take a snapshot of the virtual machine.
  8. Transfer the installer of the app you want to make portable to the virtual machine.
  9. Start ThinApp Setup Capture inside the virtual machine (it's somewhere in the start menu).
  10. Following the instructions there, ThinApp will create a snapshot of your OS inside the VM.
  11. When the snapshot is ready, ThinApp will tell you to install the application. Don't worry if the installation requires restarts.
  12. Complete the installation of the app
  13. At this point you may also customize the app if you want. Just run it and change any settings you want.
  14. When the installation is finished open ThinApp's window and click next until you get to screen where it tells you to select the main data container. You should select the main executable of the application. For example if you were making VLC portable you will have to select vlc.exe. All captured data will be packed inside that executable. If you have checked any other applications in the list they will merelly be shortcuts to the main data container. For the inventory name use something containing the name and version of the app.
  15. When you are asked for a Sandbox Location select USB Flash.
  16. When you are asked for compression choose Fast Compression.
  17. Leave other options to their defaults.
  18. Finally build the project by clicking Build Now.
  19. Click Browser Project and navigate to the bin folder where you will find the portable executable(s). Transfer them back to your computer and run them there to test them.
  20. Shutdown the virtual machine.
  21. To make another application portable restore the saved snapshot of the virtual machine (which contained a clean state where only ThinApp was installed on the VM) and continue from step 8.
ThinApp creates very compact portable apps that will leave no traces in the registry or the filesystem. But it will have problems creating portable apps that will work on different versions of Windows. If you only need to run your portable apps in Windows 7, then that's what you should install inside the virtual machine. If you want them to run on XP and 7, then your best bet is to install windows XP inside the virtual machine but it's possible that your application will only run on XP.
Oh and one more thing: Do not compress executables with UPX before packing them with ThinApp, that will break some apps (like 7zip).

Method 4: Using Mojopack
I recently found out Mojopac. It's an app that will allow you to carry around a virtual machine in your flash drive. You can install any application on your flash drive and it will run portably without affecting the host operating system. The major drawback is that it requires XP and doesn't yet support Vista or 7 so I won't write more about it because I currently use Windows 7. In addition to that, Mojopack doesn't actually create portable applications that can be distributed to other users, it just allows you to carry applications in a virtual container, essentially sandboxing them from the host OS.

Method 5: Using Cameyo
I also recently discovered Cameyo. It's a program that works like ThinApp. You'll have to install it on a virtual machine and then it will capture the installation of a program and turn it into a portable executable. It differs from Thinapp in some ways though.
First of all its free of charge!
Secondly you don't necessarily need to setup a virtual machine as they provide an online service (called Cameyo Cloud Packager) where you upload an installer and it automatically creates a virtual image for it. That online service has some limitations though. The installer of the program should be silent or at least have a command line option to make the installation silent. For many installers that option is -silent. Another limitation is that it will only allow you to use the online service for 6 portable apps every month.
Finally Cameyo first creates the portable executable and then you can customize its options while Thinapp required you to decide for all options before building the project to create the portable executables.
When you use the Cameyo Cloud Packager I suggest that you select a 32bit baseline environment and don't use the default which is a 64bit OS.
I tried the online with the setup of Image Analyzer and it recognized that the installer wasn't silent so it prompted me for command line options that would make it silent. I tried -silent and it worked. After some minutes an email arrived at my inbox with a link for the online image. For some reason the image was named image without having any extension at all. I renamed it to image.virtual.exe and ran it. It worked just fine. Then I edited with Cameyo and at the first tab of the package editor I selected Under the executable's directory in the Data storage setting so that the application actually stores the settings next to it. So if can't or don't want to use the online service then you'll have to use a virtual machine just like with Thinapp.
  1. Get Cameyo. Get VirtualBox.
  2. Install VirtualBox.
  3. Create a new virtual machine and install a copy of Windows on it. Prefer the same version as the one you are running. For more detailed instruction look here.
  4. Install the Guest Additions.
  5. Transfer Cameyo in the virtual machine. You can use the Shared Folders functionality to tranfer files into the VM and back.
  6. Take a snapshot of the virtual machine.
  7. Transfer the installer of the application you want to make portable in the virtual machine.
  8. Follow the steps shown in this video:
  9. To make another application portable restore the save snapshot of the virtual machine (which contained a clean state where only Thinapp was installed on the VM) and continue from step 7.
Conclusion
Method 1, the one I had already described in the past, will only work for a few programs. In fact I just rewrote about it because I didn't want this article to include anything less than the older one. Method 2 is something new and I've used it for quite a few apps. For example BOINC Portable and Bitcoin Portable (defunct) both use modified versions of PAL. Method 3, using ThinApp, is the most expensive and I really don't see how someone could follow it without downloading a cracked ThinApp version. Method 4, using Mojopac, will not work on Windows 7 and looks more like a portable virtual machine rather than a way to make portable applications. Method 5, using Cameyo is a probably a very good bet for most applications and their online service will free you from the burden of setting up and running a virtual machine.

Still not satisfied? Take a look at this list in wikipedia.

Got questions? Just leave a comment.

Tuesday, October 26, 2010

Timmy!

In Diablo2, to transfer items from one player to another you can either have a friend hold them for you or try dropping them on the ground, leave, and rejoin the server with the other player. But in order for the game room to stay open (and therefore the items to stay on the ground) you have to keep the game room open for about 10 minutes. I needed a simple program to count that 10 minutes so I made Timmy! (I like Southpark).

Timmy! is a simple (and portable) countdown timer. You define the timeout and it sits in your tray until the expiration, when it pops up a message box. I won't write anything more since the program is fairly simple.

Download Timmy! from here. (AutoIt3 sources included)

Take a look at the screenshots:



Thursday, October 1, 2009

SFTM v2.0

Super Fuck This Mind (my Mastermind solver) has been upgraded! Parts of it have been rewritten and it includes 5 new features:

1. You can tell it to ignore combinations that contain a color more than once.
2. Color names can be easily customized.
3. You can now play your own moves instead of the suggestion that will always be given. That way you can continue old games by playing the old moves again.
4. The above settings can either be typed into SFTM whenever you run it or read from textfiles.
5. If it detects a mistake it will ask for the correct combination and spot the mistake you did.

I also included a benchmarking version too which will tell you how many moves are needed on average for different settings.

Here is a screenshot:


Don't forget to read the included README! It explains most things, I think!

You can download SFTM from here. Have fun cheating!

Friday, September 4, 2009

FrontPAQ

You know how much I love 7zip because of it's great compression ratios... What would you say for some even lower compression ratios? What about a way to estimate the Shannon entropy of your data?? Why not give PAQ8PX a try then??? Yeah of course I am exaggerating a bit but the PAQ8 compressor series will definitely give you the best lossless compression ratios you can currently get on Earth. Actually PAQ8PH series have won the Hutter prize twice! PAQ8PH contain dictionaries in them and aim at compressing text. For "everyday" usage the PAQ8PX is likely the best you can find out there. The only tiny winy drawback is that it is awfully slow: just a bit faster than a PSTN line on my CPU. In any case, be it practical or not, you should give PAQ8PX a try and I just made your life a bit easier by making a simple frontend called FrontPAQ that simplifies the compression level selection and also calculates the ETA, the compression speed and some more things. FrontPAQ includes the latest version of PAQ8PX I could find (I found it in this post), is written in AutoIt \m/ so it is a standalone executable and is realeased under the GNU GPL v3. Here are some screenshots showing the whole process you have to follow in order to compress a directory:
(Don't worry, normally you will get more than 3.8KB/s)
So, go on and download FrontPAQ from here.

Saturday, February 14, 2009

7-Zip vs WINRAR

WINRAR (current version: 3.80) was, and still is, popular. You can tell that by the number of people seeding the torrent of it's cracked version on The Pirate Bay (currently 2308 seeding versus 16 leeching). And people have got a reason to buy (or crack) such a program:
  • Very beautiful interface that can be themed.
  • High compression ratios.
  • Quite fast.
  • Supports multithreaded compression.
  • Supports archives with recovery records.
  • Portable version available.
  • Linux command line version available.
  • Available in 47 languages.
  • Supports creation of SFX RAR and ZIP archives
  • Full support for RAR and ZIP.
  • Extraction only support for the following 12 formats: CAB, ARJ, LZH, TAR, GZ, BZ2, ACE, UUE, JAR, ISO, 7Z, Z.
  • AES-128 encryption for RAR files.
  • Is programmed by a Russian, etc.
But WINRAR first of all is not free, neither in price nor free the way FSF means. It costs currently around $30.

On the other hand we have 7-Zip (current version: 4.65)
  • 7-Zip offers even better compression ratios.
  • 7-Zip is slower than WINRAR for some compression ratios but faster for others. (that's something I did not expect, keep on reading)
  • It is smaller in size.
  • Supports multithreaded compression.
  • There is also a portable version.
  • There is also Linux command line version.
  • It is available in 74 laguages. (Nice symmetry with WINRAR's 47 languages)
  • Supports creation of SFX archives in 7z format.
  • Offers full support of the following 5 formats: 7z, ZIP, GZIP, BZIP2 and TAR. The ZIP support offers higher compression ratios than that of WINRAR but no SFX support.
  • Offers extraction only support for the following 18 formats: ARJ, CAB, CHM, CPIO, DEB, DMG, HFS, ISO, LZH, LZMA, MSI, NSIS, RAR, RPM, UDF, WIM, XAR and Z.
  • AES-256 encryption both for 7z and ZIP files.
  • It is also programmed by a Russian ;-)
  • But, most importantly, 7-Zip is completely free and open source!
So what's the catch?

7-Zip used to be buggy and that's perhaps the reason why some people are afraid to use it. The latest versions are really stable. I haven't encountered any strange errors and I use 7-Zip a lot.

7-Zip lacks some features like the recovery records. But do people need them nowadays?
The recovery records are used to recover data from damaged RAR archives. You definitely need those if you store backups on unreliable media. But from my experience most people backup on externals HD drives which if they fail, they fail completely. The recovery records are only useful when bad sectors emerge under the RAR file. They are also completely useless when you transfer RAR files over a P2P network such as Bittorrent since most (if not all) such networks have error correction algorithms in their clients, or will simply redownload bad pieces. In any case you could use PHPar2 to create recovery records for any file, including 7-Zip archives.

7-Zip's interface is simpler than that of WINRAR as you can see:

WINRAR
7-Zip

7-Zip Archive Creation
This is the window you will see every time you add files to an archive. It contains every option you will ever need to use. In addition to these, 7-Zip supports lots of advanced options which you will probably never use but if you ever want to, then read the command line parameters from the help file and add them to the Parameters text field on the above window.

The most important thing in a compression program is the ratios it achieves and it's speed. I tested both programs, using their native format, on 4 different datasets using each of the 7 supported compression levels with solid archives on. Here are the results:

  1. Dataset 1: INSHAME folder. This is the directory where I keep the source code of my programs, the zipfiles that I distribute, some BMPs, and some other zipfiles. I usually backup this so I thought it would be nice for comparing the programs. I can't provide this dataset since it contains personal files.
    You can see the results by clicking here or take a look at this graph directly:

    As you can see WINRAR has the fastest compression while 7-Zip has the highest. WINRAR's Fastest and Fast compression beat 7-Zip's. But after Normal compression 7-Zip beats WINRAR's compression ratios for the same compression time.

  2. Dataset 2: Globulation 2 folder. Globulation 2 is an open source RTS game. This dataset is almost identical to the game folder after installing the game which available at their site but it is also available on demand (email me).
    You can see the results by clicking here or take a look at this graph directly:

    Although WINRAR has the fastest compression again, 7-Zip's Fastest and 7-Zip's Fast are better than what WINRAR would have accomplished in the same compression time (supposing that the time/size relation is linear.) Strangely, WINRAR's Good is faster than WINRAR's Normal and faster than what 7-Zip would have accomplished in the same compression time.

  3. Dataset 3: pup_save-Tritonio.2fs. I have installed Puppy Linux on my flash drive. This is the persistent storage file. I usually backup this in case it gets corrupted. This Dataset is available on demand (unless I have stored any passwords in there, in that case I will erase them before sending the file).
    You can see the results by clicking here or take a look at this graph directly:

    As always WINRAR offers the fastest possible compression. This time 7-Zip's Fastest offers better compression than what WINRAR would have accomplished in the same compression time. WINRAR's Fast, Normal and Good are better than what 7-Zip would have accomplished in the same compression time. WINRAR's Best is not as good as what 7-Zip would have offered in the same compression time. 7-Zip also offers the highest possible compression.

  4. Dataset 4: QEMU folder. This folders contains QEMU and QEMU Manager as it is available from their site. Since the dataset may contain some of my user settings, it is available on demand.
    You can see the results by clicking here or take a look at this graph directly:

    This time WINRAR is faster than what 7-Zip would have been in the same compression time. Still though 7-Zip offers the highest compression ratio if you are willing to spend some extra time.
I have heard that WINRAR is much faster than 7-Zip. But from what I saw that's not always the case. WINRAR's Fastest is always faster than 7-Zip's Fastest but has a much lower compression ratio. There are cases, though, where 7-Zip offers better ratios than what WINRAR would offer in the same time. Also in every case 7-Zip's Ultra offers the best compression ratio.

So if you don't actually care about the fancy interface and prefer an easier and simpler one and if you don't need the recovery records, why spend $30 on WINRAR when there is an open source alternative offering equally good compression rates and compression times and supports even more compression formats? Why not spend them on The Orange Box instead? :-)

Tuesday, November 25, 2008

AskWise v1.0.0



I finally finished rewriting AskWise and it think it's time to take it out of beta. It is a menu driver console application that using databases with sets of known numerical data, predicts missing values in other sets of numerical data. For example, one of the included databases has some sets of height, weight, age and sex (male=0 female=10). Given this database, AskWise can predict someones sex given his height, weight and age. In fact you can give it whatever values (of these four) you know for a person and it will try to predict the rest of them. This database is not useful but you can create your own databases and use them with AskWise.

That's the fourth time I program AskWise's algorithm. The first one was during my final year in school when me and a friend of mine were challenging each other to find functions with specific strange graphs. I though I should try to make a function that can easily be adapted to connect any number of points, so I made one. Later I realized that I could use this function as a quick and dirty way to predict missing values in a set so I wrote a program in PLua that used it for this purpose. I later rewrote it in Visual Basic improving the algorithm a little. Then I rewrote it in Lua, further improving the algorithm and now I wrote it again in Lua, using almost the same algorithm but with a better, menu driven UI.



The new version is released under the terms of the GNU/GPLv3, works on both Windows and Linux and can be found here.

I also wrote some documentation for it, where I try to explain both how to use AskWise and how it makes it's predictions. It was quite hard to do this in English and I believe that my syntax might be quite complex in some parts. If you believe that something is lacking clarity (I'm sure there are such parts) then, please, point it out to me.

PS: This is out of beta but there might still be bugs. If you find one, AskWise will create a small bug report on it's directory, I would be glad if you send it back to me. :-)

Saturday, July 5, 2008

Windows XP and Vista running on Ubuntu

Here is a new video that I uploaded to YouTube. It's my system running Windows XP and Vista at the same time, virtualized with VirtualBox on Ubuntu. The theme I am using is Ubuntu Satanic Edition (with a different background). You can also see the Desktop Cube that Compiz offers. :-)



Still not switched to Linux? ;-) You won't miss Windows this way...

PS: The FPS aren't that slow as they seem to be on the Video. Also, some horizontal red stripes that appear while rotating the cube are a glich in the capture and don't really exist.

Monday, June 23, 2008

Windows 2.03 on a Virtual Machine

Virtual Machines can be proven very useful tools. I have been using QEmu for some time now but I recently switched to VirtualBox (commercial, but free of charge, edition) because I desperately needed the USB support. Here is a screenshot showing my four desktops while in one of them is a virtual machine running XP in fullscreen mode:


Apart from running a "useful" OS on the virtual machine (it's useful because I needed to use a 3G GPRS USB modem which doesn't work on Linux) you can also run old or rare OSes. I tried Warp but I couldn't install it just like Windows 1.0. So I tried Windows 2.03 which did install and run properly. I also made a video with a quite lengthy tour showing most of their programs. (it's five minutes long!)

Here it is:

Saturday, June 14, 2008

Hanoi Towers Solver

I just made a small program that solves, step by step, the Hanoi Towers puzzle for any number of disks. I though it's worth uploading it, so here it is. As always, it's a console application with nice (for my taste) ASCII graphics. It runs on both Linux and Windows as it is written in Lua. I included two Lua interpreters (for both OSes). To run it just drag and drop the .lua file on the interpreter. (after unzipping everything, of course). Here is screenshot: (When giving the number of disks remember that the total moves for the solution are 2^(number of disks)-1. And you will have to press as many Enters as the moves.)

Thursday, June 5, 2008

Ubuntu Hardy Heron on a Sony Vaio VGN-FZ31E

This article probably also applies to: VGN-FZ38M


Yeap I bought it. I though that since it had an NVidia card and it was Centrino based etc it wouldn't have any incompatibilities with Linux. (aaaargh if I only knew...) Anyway.

The laptop came with Vista. I was going to keep them for a week or so just to make sure I don't miss any of the Sony specific programs that was preinstalled. Well I couldn't bare them for more than 24 hours. I made some factory restore CDs and repartitioned the whole drive which now only has Ubuntu installed in it.

What worked out of the box:

The SD/MS reader (104c:803b). It works out of the box with SD cards but the MS PRO slot doesn't work for me and I have found no way to make it work.

Graphics Card (10de:0426): The NVidia GeForce 8400 GT worked perfectly with the closed source drivers that Ubuntu installed. The temperature sensor works OK too.
Nevertheless I recreated the xorg.conf (for no specific reason). Here is the new one.

DVD-Drive (PIONEER DVD-RW DVRKD08): It works OK. I recorded a data DVD with Brasero (for some reason it couldn't verify the burned disk afterwards but it worked perfectly). I also installed Diablo 2 through Wine. The CD protection of Diablo 2 works OK and recognizes the original CD.

CPU (Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz): Both cores are recognized and the temperature sensors work OK. The same goes for frequency scaling.

Wireless and LAN (8086:4229 and 11ab:4351): They both work perfectly right out of the box.

What didn't work out of the box but works with some tricks. Before trying the tricks enable the extra repositories (universe, multiverse etc) from System->Administration->Software sources).

Camera (05ca:183b): HAL loads a wrong module for the camera that in addition to not working, makes the laptop crash when you try to suspend it. So you must remove the misbehaving module from the kernel and prohibit reloading it.

  1. Type the following in a console (you can find the console in Applications->Accessories->Terminal):

    sudo gedit /etc/pm/config.d/unload_modules

    Give your password and then copy and paste the following line at the end of the file:

    SUSPEND_MODULES=uvcvideo


    Save the file and close the text editor.

  2. To download the r5u870 drive you will need svn, so in a console type:

    sudo apt-get install subversion

    (answer yes to any questions you may encounter)

  3. To download the source of the driver, type in the console:

    svn co http://svn.mediati.org/svn/r5u870/trunk r5u870

  4. Now that all files are downloaded go into their directory by typing:

    cd r5u870

  5. Install the build-essential package before trying to compile the drivers by typing:

    sudo apt-get install build-essential

  6. Compile the driver by typing:

    make

  7. and then install the driver by typing:

    sudo make install

  8. Now instead of restarting you may just load the module into the kernel by typing:

    sudo modprobe r5u870

    When you reach this point the camera will only work with some applications like Skype.


    If you open Cheese (a very nice application for capturing video and still pictures from your camera, install it by typing sudo apt-get install cheese) you will notice that it doesn't recognize your camera. That's because the system doesn't recognize it as a Video4Linux camera.

  9. To fix this you will have to download this file and copy it to /usr/share/hal/fdi/information/20thirdparty . If you don't know how to do this just type the following two lines in the console:

    cd /usr/share/hal/fdi/information/20thirdparty
    sudo wget https://bittit.info/publicDro/10-r5u870-webcam.fdi

  10. Now either restart you computer or execute this in the console:
    sudo /etc/init.d/hal restart

    Now you should have a perfectly working camera! Oh, you may now delete the sources by typing:

    sudo rm -r ~/r5u870


Sleep and Hibernate
: They don't work initially. The computers go to sleep but when awaken it stays in a black screen. Fixing the camera will fix this problem too. :-)

Sound Card (8086:284b)
: Well, playback worked out of the box but when opening the sound options there were no recording controls and the sound was coming out only through the builtin speakers, plugging in headphones changed nothing. To fix all these problems follow these simple steps:

  1. Optional step. I suggest that you don't use Pulseaudio because I found it a bit buggy. To switch back to ALSA go to System->Preferences->Sound and change everything to ALSA.

  2. Type the following in a console:

    echo "options snd-hda-intel model=vaio" sudo tee -a /etc/modprobe.d/snd-hda-intel

  3. Restart you computer.

  4. Open the sound controls by clicking the sound icon next to the clock.

  5. Select File->Change Device->HDA Intel (Alsa mixer)

  6. Then goto Edit->Preferences and select everything.


  7. Play around with the controls. Don't forget to look at all three tabs (in the third tab you will find the record selection switches: Internal Mic, PCM, Mic Jack)

Bluetooth (044e:3010): It is properly recognized by the system but it will not work. Here is a way to fix it:

  1. In a console type:

    sudo gedit /etc/rc.local

  2. Now append the following line before the exit command (if there is one) near the end of the file:

    hciconfig hci0 reset

  3. Now save the file and close gedit.

This way the bluetooth will work correctly but if you switch it off and again on (using the hardware switch in the front side of the laptop) it will stop working so you also have to do the following:


  1. Right click on an empty space on your panel and select "Add to panel..."

  2. Then create a new custom launcher and in the command textfield copy and paste this:

    gksudo hciconfig hci0 reset
This way when your bluetooth stops working, just click on the new launcher that you made and it will ask for your password and then reset the bluetooth device so that it will start working again


VGA-out:

Open a console and type:

cp /etc/X11/xorg.conf ~/xorg.conf.back

This will back up your xorg.conf file just in case you mess it up.
Now you will have to install the NVIDIA settings manager. To do this just type:

sudo apt-get install nvidia-settings

And then run it by typing:

sudo nvidia-settings

The NVIDIA settings manager will open. (you might need to resize this window because for some strange reason it initializes too small)


Now select X Server Display Configuration and then click on Detect Displays to detect the connected display. Now you will be able to configure the two screens using the options in the Display and the X Screen tabs.

From ere you may also set the resolution to for your laptop's monitor to the correct one (1280x800). If you select a resolution from the Resolution drop-down-list (it's visible in the above picture) the drop-down-list on its right will be enabled and you can then select the desired refresh rate.

Afterwords don't forget to click on Save to X Configuration File.

If you mess up then type this in a console to restore your backup:

sudo cp ~/xorg.conf.back /etc/X11/xorg.conf

To delete your backup type:

rm ~/xorg.conf.back

Tip: To get rid of the annoying NVIDIA splash screen type this a a terminal:

sudo gedit /etc/X11/xorg.conf

Then find all the Device sections and add this line inside them:

Option "NoLogo" "True"


Then save and exit.


What doesn't work and still I have found no solution:

The Fn buttons don't work. In fact the sound controls work, the next track, previous track, play, stop buttons work too. The S1 (customizable button), the AV MODE and the brightness control buttons doesn't work. I am still looking for a solution. The MS PRO slot doesn't work and I still haven't found any solution.

What I haven't fully tried yet:

S-Video out, HDMI output. I'll try them some time... (Shawe in the comments says that HDMI works OK but without any sound.)


References:
http://ubuntuforums.org/showthread.php?t=706530
https://bugs.launchpad.net/ubuntu/+bug/147757
http://wiki.mediati.org/Installation
https://launchpad.net/ubuntu/+source/alsa-driver/+bug/33719

PS: If I fix more problems I will update this post so you might want to check back later. If you find any problems or omissions please leave a comment.

PS2: It seems like someone did a partial translation of this article into Catalan. Here is a link to it. :-)

PS3: Thank you for your comments and the info you provided!

Linux On Laptops

Monday, June 2, 2008

ZVista

There are a few programs that manage to make me angry every time I use them. But nothing compares to Windows Vista. It must be by far the worst OS I have ever used. I mean, Microsoft must have really tried to create such a mess, it can't suck by accident.



It's sooooo sloooooooowwwww..... I have friends with Vista on their laptops, some of them just use them for office and internet, not a single game or other application. Well it takes around 10 minutes to do a restart! Before some days I was waiting 7 minutes for the shutdown before forcing a power off myself! (no it wasn't even installing updates)



Apart from the speed issues there are million other problems. It's amazing how they managed to mess up every single aspect of the OS. Even the console (the command prompt) doesn't support drag and drop!!! WHY??? Are they crazy? I mean, did they actually pay someone to do this??? In addition to this the changed the layout of the start menu to a more flat one. They also made changes to Windows Explorer. I was looking into a folder containing C source files with the details view mode, well, Vista insisted to show me artist name, album, etc for every source file! For some unknown reason it though this was a music folder! (Perhaps it wouldn't do so if there was a Visual C++ project file in the directory >:-P ) All of the above make Vista the worst OS for a programmer or even someone that wants to do more than surfing and writing in Microsoft Office!



Another really stupid aspect is that dialog that pops up every time you try to alter system files. I really like the extra security that it offers but a virus managed to infect a system without even triggering this dialog! (I accidentally run the virus on a friend's computer) So no extra security actually, just extra confirmations to get on your nerves.



Vista is really a stupid OS for stupid (trendy) people that want to see glossy windows, but even their 3D effects are inferior to what Compiz offers to Linux users (and of course Aero needs even better hardware).



The funny thing is that I am planning to buy a new laptop but they all ship with Vista preinstalled! Of course the first thing to do will be to get rid of them but I don't even like the idea that I will actually pay for this crap!





The dialog reads:

33 days and 0 hours remaining

Copying 1.506 items (6.03GB)

from Local Disk (C:) (C:\) to FREECOM HDD (G:) (G:\)

About 33 days and 0 hours remaining



Well, this was not Vista's fault (drive G: was problematic) but it describes, a bit dramatically, what you will go through if you use this NOS (Non Operating System)



Want some more?

Get a life...



PS: ZVista is pronounced like the word "delete them" or "clear them" in Greek.

Thursday, May 1, 2008

Ubuntu Hardy Heron 8.04

The new version of Ubuntu has been released! I installed it one day after it got released. Like Gutsy Gibbon, Hardy Heron is really nice and has lots of new features and additions.

Story 1:

Installation:
I made a fresh install on my Acer Aspire 9420. Not a single problem! All of the devices were installed automatically and worked almost perfectly!


Customization:
The first thing I was going to do with Hardy was to install the programs that I used with Gutsy. I was really pleased to see some of them (Emesene, Qlandkarte*, Infon) included in the new repositories, as this meant more time to explore the new release. So I went on and added extra repositories: Ubuntu Satanic Edition (wonderful theme!), Medibuntu, Wine.

Satanic Edition Theme:


After that I started installing Add-Ons for Firefox. Hardy comes with Firefox 3 beta 5 installed. Although it feels much better than version 2, many of my favourite Add-Ons are not compatible with the new beta (yet...).

Firefox 3 beta 5:


I also found a very nice bittorrent client called Deluge. Well, in fact I already knew about Deluge but it's the first time that I actually use it. ;-)

Deluge:


I was amused by how easily accessible are encryption and digital signing capabilities in Hardy. Well in fact you have to run seahorse to create your public-private keypair but after that you can simply use the right-click context menu and the Clipboard encryption panel add on.

How to add the Clipboard Encryption panel add on:


Seahorse is in the background, a digital signature in the foreground:


Finally I had to setup all the Compiz plugins once again because for some reason the backup of my old settings didn't seem to work with Hardy... :-( But the result is nevertheless rewarding. :-)

The four desktops as seen with the Expo plugin:

Story 2:

Installation:
I also decided to install Hardy on my father's PC. I had a serious problem that didn't allow me to run the live CD. After reading about it I managed to solve it by adding the all_generic_ide boot option. It seems that there a major bug in the Live CD but luckily it doesn't affect all PCs. After installing Ubuntu everything worked just fine.


Anyway. Well done to everybody that worked on Hardy! :-)

*(I am not sure if Qlandkarte wasn't available on Gutsy's repos)

Monday, April 7, 2008

Emesene

I never liked Pidgin (former Gaim). I was always an aMSN fan. Although aMSN doesn't blend with Ubuntu nicely (probably because it's written in Tcl/Tk) compared to Pidgin, it has more features related to the MSN network. aMSN supports offline messages, camera sessions... almost everything that the official client does! (except shared folders I think)

Still there was some things in aMSN that kept annoying me.
  1. Offline messaging was too slow. After pressing enter I had to confirm that I want to send an offline message and then the whole program stopped responding for one-two seconds.
  2. The program sometimes crushed after long runtime periods. I have found in many occasions, after returning home, white aMSN windows which do not respond.
  3. The program feels a bit heavy. Well, maybe... But some things take too long and the program stops responding (login etc).
  4. There are many other minor bugs like false "file send failed" messages etc.
  5. Connection problems. Some times (quite often) I had to close and reopen a chat window in order to be able to send again a message to a contact. Else I would get "could not deliver message" errors (or something like this).


Now I am using Emesene (wikipedia). I found out about it from a guy in my University's forums. It misses some features compared to aMSN like camera and voice support) but I really don't care. After all I use Skype for these. On the other hand it's much lighter (written in Python), it responds really fast, no crazy crashes, and lots of neat plugins!

Initially all plugins are disabled. You have to enable them through Options->Plugins. Some notable plugins are:
  • Youtube which shows thumbnails next to youtube links that your contacts send to you.
  • Tinyurl integration.
  • CurrentSong which changes you personal message to show the currently playing song and even supports Listen! (my favourite music player for Ubuntu)
Emesene doesn't need any installation. Just download the source code, unzip it in your home directory and run a file called emesene inside its directory. You can also drag it to your panels to create a convenient launcher!

Try it! It's by far the best MSN client I have tried!

PS: There is a Windows version too but I haven't tried it. A friend told me that it doesn't work for him.

Sunday, February 10, 2008

Strange Xmoto physics

I was waching a replay in xmoto in slow motion... These are three frames:

It's funny that the bike doesn't break with falls like this one while it breaks if you touch something solid with your head... :-)

Wednesday, February 6, 2008

How to configure Compiz in Gutsy

Compiz is composite window manager for Linux. It's a program that manages the placement and drawing of windows on your screen. At the same time it uses hardware accelerated 3D graphics to draw effects for certain events (minimization, maximization, closing, changing desktop etc). Last March, Compiz and Beryl (a fork of Compiz featuring more 3D effects) were merged again and now there are two software packages available: Compiz-core and Compiz Fusion.

The good thing is that Ubuntu Gutsy Gibbon comes with Compiz pre-installed. The bad thing is that they did not include the settings manager, leaving you with only three preset configurations (found in System->Preferences->Appearance->Visual Effects).

If you want more control over compiz (compiz is capable for much more things than those found in the "Extra" preset) will have to install compizconfig-settings-manager. To do this, use a console (Applications->Accessories->Terminal) to execute this command:
sudo apt-get install compizconfig-settings-manager

(or use System->Administration->Synaptic Package Manager to find and install the package)

Now go to System->Preferences->Appearance. It should contain one more option named "Custom":

Select it and then click preferences and start configuring the plugins you need.

If you have no idea how to configure them you can download my settings by clicking here. I use mostly the fire effect (because it matches with Ubuntu SE). If you move the pointer to the upper left corner of the screen you will get thumbnails of all open windows in all desktops. There are 4 desktops which form a cube that you are inside it. By touching the left or the right screen edge you can move to the next or previous desktop. Moving the pointer to the upper right corner will show you the four desktops. Take a look at this post as it contains two videos demonstrating the above.

To import my settings follow these steps:
  1. System->Preferences->Appearance
  2. Click the Preferences button on the Visual Effects tab.
  3. In CompizConfig Settings Manager click on Preferences.
  4. Create a new profile by clicking on the + symbol.
  5. Click Import and select the downloaded file.

Sunday, January 27, 2008

Ubuntu Satanic Edition and Compiz

I just installed Ubuntu Satanic Edition. It contains themes, wallpapers, a screensaver, splash screens etc... Satanic Edition was made (if I remember correctly, because Wikipedia removed its article) as a reaction to Ubuntu Christian edition. I am not a satanist or something like that. I just LOVED the theme... I also fine tuned Compiz so that it used mostly the fire effect. These these also matches with my blog... :-)

Take a look!


Popular Posts