windows

X11 FrontEnd for the Rio Utility

XRio FrontEnd

X11 FrontEnd for the Rio Utility v1.07 made by guys from the Snowblind Alliance. Surely not the best nor the most beautiful of all GUIs made to manage the famous Rio MP3 Player, but I tried to implement some of the ideas that the "real" managers doesn't implement. List of some "interesting" features:

  • 2 windows side-by-side like in Norton Commander legacy managers
  • treats M3U playlists as directories
  • displays the space remaining on the device as you select files to upload
  • current file & overall progress bars
  • realtime display of the transfer speed
Note that you need Tk8.0 extension for Perl (and the Perl itself) to get this frontend running! The GUI works under ActivePerl Win32 environment out-of-shelf, but I haven't tested if the interaction with the rio.exe is OK. You can download it here and test for yourself! However, I would suggest you to use my Diamond Rio PMP300 FS-plugin for Total Commander.

P.S. - if you get problems downloading files with long names, apply the patch I provided below on the Rio Utility source (not XRio itself!) and recompile it.

stas » January 8, 2007 » 09:37

tiny HTTP proxy


Main screen

This is a tiny and highly experimental HTTP/1.0 proxy software that I have written to debug HTTP protocol & it's clients. It is very small and simple, yet useful to reverse-engineering purposes. It's interface is quite obvious. The Server frame controls the IP, port and connection limit of the proxy server. It also shows how many connections are active at moment. The Data Traffic frame shows in/out packets & bytes. Service frame allows you to stop, start and quit the proxy. These are the very minimalist controls for the very minimalist proxy server.

The interesting stuff begins at the Plugin frame. All the packet passed through this proxy server are forwarded to the selectable plugin module. By default, it is logger.dll. It simply saves every single packet into separate file, which uses the following name scheme: from_IP.from_port-to_IP.to_port.log (for example, 127.0.0.1.4322-127.0.0.1.21.log). The files can be ordered by their modification date in your file explorer, so you can track the entire session:

Packets list

The logger.dll can be set up to include a sequence counter at the beginning of each packet and to output saved packets into some specific directory:

logger.dll setup

Plugin module is also capable of injecting packets. Load the replicator.dll file and check the setup screen:

replicator.dll setup

When you click the Capture button and then make some action in your proxied web client, the replicator plugin will prompt you if it got a corresponding packet. This packet may be resent automatically, at the period specified in the Period box. You can capture & replicate several packets, and manipulate their resend period. A very interesting application of the replicator plugin is to flood web chats and to spin up web counters. Of course, the right way is to use logger.dll and to make a clone that imitates the "real" web client.

The final note: this is, and always will be, an alpha-state code. I do not develop this proxy application anymore. It is useful to me the way it is. But you can grab the source and make a whatever plugin you like, or even rewrite the code entirely. I don't care. Just give me the proper credits!

stas » January 3, 2007 » 21:50

inPEct .EXE binder

inPEct screenshot

inPEct means "infect", applicable to PE ("Portable Executable") format. It is an executable binder, thus, it's able to join two .exe files in one. Now, why should anyone want to do that, is a question apart (screenshot is self-explanatory Smiling
At the time I've wrote inPEct, most executable binders were similar to SFX ("Self-Extract") stubs: they simply extracted their content to somewhere (commonly %TEMP% directory). inPEct is a bit different, as it expands the host executable and encrypts & inserts the hosted executable inside it. When someone executes the bound application, the host executable runs normally, and the hosted executable is extracted and then executed. inPEct also has a feature to execute the hosted executable only once ('smart feature'): if the bound program is executed by user again, hosted file won't be extracted anymore. And inPEct is very fast and small, as  it's written entirely in pure assembler (in fact, inPEct's loader has only 800 bytes!). It's encryption algorithm is very cheap, but still uses a random seed. Thus, I expect that inPEct is more stealthy than similar binders.
Please note that almost every AntiVirus program detects and quarantines inPEct (and files produced by it)! This shows it's popularity in the past, I guess Eye-wink

But today it's useful mostly as a pure assembler programming example... And for AntiVirus research, as this paper actually shows.

stas » January 1, 2007 » 23:00

ACFTools (for X-Plane)


ACFTools screenshot

The Plane-Maker from X-Plane v7.x is fun and easy to use... Although I found it a bit limited to edit my planes' fuselage. 20 cross-sections aren't enough, sometimes. It would be nice to export the fuselage shape into any 3D-editor and fine-tune it there... This is exactly what my ACFTools are supposed to do. Please note that X-Plane v8.x is unsupported, unless you create & edit a v7 model and then import it to Plane-Maker v8. But I believe this isn't a problem: X-Plane v8 is able to use OBJ format files (which can be imported/exported by AC3D and Blender plugins) as parts of an aircraft, thus, extremely weird shapes are perfectly possible without even touching the ACF file.
Now, what exactly ACFTools does? It is able to process the file that stores all the aircraft data (except the textures), in the binary ACF format, and dump all the data in the human-readable TXT format. It is the same format as for Tony Gondola's ACF2Text utility, which inspirited my ACFTools. Then, ACFTools can extract the 3D model of the aircraft from this data, and export it in the AC3D format. After that you can edit the aircraft's shape as you want using AC3D and make the inverse process: from .ac to .txt, and then from .txt to .acf. Here comes the brief set of ACFTools features:
  • Convert from ACF (aircraft) & WPN (weapon) formats to TXT format and vice-versa.
  • Extract AC3D model from TXT file, along with wings and propellers (using the real airfoils!).
  • Import AC3D model into TXT file (fuselage, nacelles, wheel fairings & external fuel tanks only)
3D model extractor is also useful if you want to use X-Plane generated aircrafts somewhere else; as in your own Computer Graphics compositions.
ACFTools was written in Perl, thus it is able to work under Linux, MacOS & Windows. And it is Open-Source & highly modular, so you can modify it as you want, or use my functions for your own needs. When you start ACFTools, this is what you get at your console:
##############################################################################
[ACFTools v0.62a] Set of tools to play with ACF files outside of Plane-Maker
Perl script and modules coded by Stanislaw Pusep
Site of this and another X-Plane projects of mine: http://xplane.sysd.org/

Allows you to:
* export X-Plane (www.x-plane.com) aircraft data files to human-editable
plaintext format and 3D mesh editable in AC3D modeler (www.ac3d.org).
* import plaintext/3D mesh back to ACF file.
##############################################################################

Usage: acftools.exe [parameters]
o Commands:
-extract [DEF] : extract TXT from ACF (opt: using DEF definition)
-generate : generate ACF from TXT
-merge : merge body from AC3D file to TXT
o Parameters:
-acffile FILE : name of ACF file to process
-txtfile FILE : name of TXT file to process
-ac3dfile FILE : name of AC3D file to process
-noorder : DO NOT sort vertices while merging bodies
-noac3d : DO NOT generate AC3D
-(min|max)body N: write all bodies in specified range to AC3D
-force LIST : force extraction of bodies LIST (comma-separated N)
-normalize N : normalize wings to N vert/surface (N>=2 or no wings!)
o Notes:
* You can use abbreviations of commands/parameters (-gen or even -g
instead of -generate).
* The only required parameter for "extract" command is -acffile.
Both -txtfile and -ac3dfile are derivated from it.
* "generate" command and -txtfile has the same relation.
* By default "extract" uses the latest DEF file.
* "generate" doesn't need DEF at all (it is implicit in TXT)
* If file to be created already exists backup is made automatically.
o Examples:
acftools.exe --extract=ACF700 --acffile="F-22 Raptor.acf"
(extract 'F-22 Raptor.txt' from 'F-22 Raptor.acf')

acftools.exe -e -acf "F-22 Raptor.acf"
(same as above)

acftools.exe -me -ac3d ladar.ac -txt "F-22 Raptor.txt"
(merge *single* 3D body from 'ladar.ac' to 'F-22 Raptor.txt')

acftools.exe -g -txt "F-22 Raptor.txt"
(reverse operation; generate 'F-22 Raptor.acf' from 'F-22 Raptor.txt')
The most important thing you should know is that to convert from the binary ACF format to TXT, ACFTools uses one of the files stored in the defs directory. By default, it is a ACF740.def, which works for X-Plane v7.40 and later. You can specify any definition file you want, as shown on the screen above. You can also write your own definition files, if you have the structure specification. Note that to convert TXT back to ACF, no definition is necessary, as the TXT format itself holds all the data necessary to build the binary file. The second thing is to specify the file that ACFTools should convert. The name of the converted file and every of the intermediary files will be generated from this name. When converting from ACF to AC3D formats, TXT file is generated automatically. Please note that when you want to put the edited aircraft part back into the .acf file, you must save this part as a .ac separate file, then merge it into the TXT file, and after that convert it into ACF! Yes, it would be nice to have a GUI to automate the entire process, but I'm too lazy to do that! Anyway, may the source be with you Eye-wink
I strongly recommend you to read the docs\README.txt file contained in the ACFTools package before you start using it!
stas » May 10, 2006 » 01:09

MD5/SHA1 checksum

An enhanced file checksum plugin for the Total Commander (TC for short). It supports both MD5 & SHA1 algorithms, and is able to checksum the entire directory trees. Note that it's MD5 checksum function is much faster than TC's internal one (70% faster on my Athlon XP 1700+ with Seagate IDE 160 GB 7200 rpm HD!). Both MD5 & SHA1 algorithms were ripped from PuTTY by Simon Tatham, who implemented them directly from the specification.
Basically, the file checksum plugin integrates the functionality of GNU utilities md5sum and sha1sum into the Total Commander GUI. This is done through the packer extension API: you simply select files/directories you want to checksum, and "Pack" (Alt+F5) them into a .md5 or .sha "archive". It will be a plain text file which looks like this (just the same format as that of above GNU utilities):
3fb2924c8fb8098dbc8260f69824e9c437d28c68  FC4-i386-disc1.iso
31fdc2d7a1f1709aa02c9ea5854015645bd69504 FC4-i386-disc2.iso
032455cdf457179916be3a739ca16add75b768b7 FC4-i386-disc3.iso
f560f26a32820143e8286afb188f7c36d905a735 FC4-i386-disc4.iso
736e1555e88740d6131c5c84fbe69ed1073ba82d FC4-i386-rescuecd.iso
Note that as TC runs on Windows, checksum plugin will use DOS line endings (CRLF). To "export" the generated checksum list to a UN*X system, you can use my ToFroWin utility, which also integrates itself into TC Smiling
Then, to verify files consistence from TC, select .md5 or .sha file and "Test archive" (Shift+Alt+F9). Files generated by *BSD md5 utility are also supported. You can also browse checksum files as they were directories; this is specially useful to locate and check for consistence a single file from the huge directory tree. To do that, just "View" (F3) a file, and TC Lister will pop you a window with content like this:
D:\_INSTALL_\stentz-binary-i386\FC4-i386-rescuecd.iso

expected: 736e1555e88740d6131c5c84fbe69ed1073ba82d
computed: 736e1555e88740d6131c5c84fbe69ed1073ba82d

SHA1 checksum OK!
Check this screenshot to see the checksum plugin in operation!

Installation:

  1. Unzip the "checksum.wcx" to the Total Commander or Windows Commander plugins directory
  2. In Windows Commander 4.0 (or newer) or Total Commander, choose 'Configuration => Options'
  3. Open the 'Packer' page
  4. Click 'Configure packer extension WCXs'
  5. Type md5 as the extension
  6. Click 'New type', and select the "checksum.wcx" file
  7. Click OK and then 'Configure packer extension WCXs'
  8. Now type sha as the extension
  9. Click 'New type', and select the "checksum.wcx" file again
  10. Click OK

Usage:

(This section uses MD5 checksums as example; for SHA1 the procedure is the
same, just replace every "md5" you see by "sha" Smiling)

  1. Generate MD5 checksum:
    1. Select files you wish to compute checksum.
    2. Then go to "Files => Pack".
    3. Select "md5" as packer.
    4. PLEASE NOTE THAT ARCHIVE PATH WILL BE IGNORED!!! ".md5" 'archive' is ALWAYS generated in current directory (where checked files are), and NOT in the opposite panel! The only exception is creating checksum of the files stored on CD-ROM media as there's no way to create files there.
    5. Press OK and check CURRENT directory for ".md5" list generated.
  2. Verify MD5 checksum:
    1. Certify that ".md5" list is in it's right place (filenames listed in it should be relative to the current directory).
    2. Select it and do "Files => Test Archive(s)".
    3. If any file doesn't matches stored MD5 checksum then "CRC error" message box appears.
    4. If everything is clear Total Commander remains quiet.
  3. Browse MD5 checksum list:
    1. Certify that ".md5" list is in it's right place (filenames listed in it should be relative to the current directory).
    2. Select it and enter it as it were a normal archive.
    3. If any file is present in the ".md5" list but wasn't found in the current directory then "?" is displayed instead of file date/time and size.
    4. PLEASE NOTE THAT FILES CAN NOT BE EXTRACTED TO YOUR DISK! ".md5" isn't an archive, it stores only the hash of the file.
    5. Select file you wish to check and press F3 (call Lister).
    6. Lister will show complete file name, expected checksum and generated checksum. If both checksum matches then the last line is "MD5 checksum OK!".
stas » May 9, 2006 » 12:17

Diamond Rio PMP300 FS-plugin


Diamond Rio PMP300 itself!!!

Diamond Rio PMP300, with only 32 MB of flash memory, was the second portable MP3 player ever released, in 1998. Unfortunately, such a revolutionary piece of hardware is very painful to interface with: as it is connected through parallel port, highest transfer rates achieved were around 80 KB/s. And the software bundled with it was too primitive. To the luck of thousands of (un)happy Rio owners, The Snowblind Alliance released their Open-Source RIO utility, which became a starting point of several alternative Rio manager interfaces. Mine is just one of them Smiling
First of all, there's absolutely no need to write the entire file manager. Total Commander (TC for short) is one of the most feature-rich file managers ever made, and it supports a very extensible plugin API. As a result, one could use TC to manage files directly on the flash memory of his/her Rio! Actually, my plugin supports listing, uploading, downloading & deleting files from Diamond Rio PMP300 internal memory. It also displays the transfer speed and the total/remaining space. Take a look at this screenshot to see it in action. Behind the GUI, my plugin uses the source of the "RIO utility v1.07" by The Snowblind Alliance.

Installation:

Just the same as for many other FS-plugins:
  1. Unzip rio.wfx & rio.cfg files to Total Commander directory
  2. Choose "Configuration => Options => Operation => FS-Plugins"
  3. Choose rio.wfx
  4. Click OK.
  5. You can now access the plugin in the "Network Neighborhood"
  6. Open rio.cfg file and set the correct LPT port address (see below for more details)
Please note that DriverLINX Port I/O Driver by Scientific Software Tools, Inc. is required for plugin to operate. Get it below.

Configuration:

In the majority of cases, the plugin may work fine "out-of-the-box". If it doesn't work at all, probably you'll need to discover and specify your PC's parallel port hardware address. Open your system's "Device Manager" (on Windows XP, open the context menu for "My Computer", click "Properties", go to the "Hardware" tab, and click the "Device Manager"). Go straight to "Ports (COM & LPT)". Now locate the port that your Rio device is attached. On my case, it's LPT1. Double-click "Printer port (LPT1)", and go to the "Resources" tab. You need the first one of  "I/O Range" numbers:

Device Manager => Printer port (LPT1) => Resources

378 is what you need. Note that this number is in a hexadecimal format. Thus, many programs (like my plugin) may accept it as 0x378. Now, open the rio.cfg file. It looks like this, by default:
# Assume that Rio is connected to LPT1
IOPort 0x378

# default
IODelayInit 20000
IODelayTx 100
IODelayRx 2

# "turbo" mode (UNSAFE!!!)
#IODelayInit 5000
#IODelayTx 1
#IODelayRx 1
Now, just update the IOPort parameter to the value you discovered.
Note all that IODelay* parameters. For the safety reasons, the delays are high by default, and, consequently, the file transfer is slow. If you comment out the default values and uncomment the turbo mode ones, you'll get a great increase in performance! But remember to only use it when your Rio battery is 100% charged, and when your Rio is turned on. It may corrupt some bits, through.
stas » May 6, 2006 » 00:26

Micro$oft Messenger Hack


Micro$oft Messenger Hack screenshot

"Micro$oft Messenger Hack" (MSMH for short Smiling is a GUI alternative to the command line "net send", with some nice additional features. Please remember that "Messenger" referred here is a Windows NT/2k/XP system service, that "Transmits net send and Alerter service messages between clients and servers. This service is not related to Windows Messenger.". Messages transferred using this service looks just like this one:

"net send usage" screenshot

MSMH is able to send the same message as above example. It lists machines on the local network, so you won't mistype host names anymore. It can send messages multiple times, also (just imagine yourself flooding "*" Eye-wink. And, using "WinPopup" method, both "From" and "To" fields can be spoofed. By the other side, "net send" method can send messages beyond your LAN, given the IP address of the remote host.
MSMH executable is very small, as I programmed it in assembler language. But beware: Service Packs make the Messenger service disabled by default, and firewalls won't allow remote host to receive your messages. Well, MSMH was much funnier when I wrote it a long time ago Eye-wink
stas » May 5, 2006 » 01:53

ToFroWin CR/LF converter

ToFroWin adds the following context menu into Windows Explorer (accessible with right mouse button click over file name):

ToFroWin context menu

It simply converts between the text line endings of UN*X (CR or "\n") and DOS (CRLF or "\r\n") systems. Actually this is a Win32 GUI port of Tofrodos Ver 1.7 by Christopher Heng. ToFroWin is also able to convert files in batch: just select multiple files and convert them with one click. Beware to not corrupt binary files!

Installation:
ToFroWin is too small and too simple to make a self-installation for it. It can be easily installed "by hand".
Extract archive to any directory ("C:\Program Files\"). Then go to this directory and execute "install.bat". To uninstall execute "uninstall.bat" and then simply delete ToFroWin files.


Starting an internet business can turn to out to be very beneficial. Through a free software one can create the web design of the site. The domain web hosting can be bought for a very cheap rate. It would be advisable to use budget web hosting in the start though.

stas » May 4, 2006 » 13:04

rockin' PC speaker

Well, good old PC speaker is the only default hardware, easily available on almost all PC systems, and virtually unmuteable (actually, one can connect PC speaker output to his/her sound card instead of default buzzer, but this rarely happens Smiling. Thus, it is perfect for communicating critical states. But the default system beep is quite boring, and makes difficult to distinguish different events that are being communicated. So, here's my humble attempt to make a highly portable function that is able to play simple non-polyphonic music on the PC speaker. I used it originally to advise when someone tried to log in to my system through SSH daemon (thus the name "daemoniac" - demoniac Eye-wink. It was tested (and worked fine!) under:
  • DOS (DJGPP, Turbo C)
  • Windows 9x/NT/2K/XP (Borland C, Microsoft Visual C, MinGW)
  • Linux (gcc)
  • FreeBSD (gcc)
By default, demoniac will play Iron Maiden - Fear Of The Dark beginning. You can also compile it to play the simple "A#4 D#5 G5 A#5 G5 A#5" melody. Note that on UN*X systems, demoniac accesses hardware directly, and thus requires to run as root user. It's safe, through: it won't accept any command line arguments and neither process environment variables, so, at least, it can't be exploited with some buffer overflow technique. For detailed instructions about compiling demoniac on different compilers/systems, read the comments at the start of the source. Note that my package provides all the binaries generated on compilers/systems listed above.
stas » April 20, 2006 » 02:06

reg3dit

This one looks like and feels like the popular "Microsoft ® Registry Editor" (A.K.A. regedit.exe Eye-wink), specifically one that comes from Win2k default installation.
It only has one (significative) difference... It will never prompt you with following message box, when started:

"Registry editing has been disabled by your administrator."
"Registry editing has been disabled by your administrator."

This restriction is supposed to save users from themselves. Well, if you've successfully located an override (like mine Smiling), I hope you really know what's you're doing! My regedit clone will ignore administrator's restriction, which consist in the following registry patch:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"DisableRegistryTools"=dword:00000001
Then, you may use reg3dit to make all the changes you need (note that on Windows NT/2k/XP & superiors some keys would still give you "Access denied", as such OSes use per-user security policies). For example, you can unpatch that DisableRegistryTools thing and simply turn back to use default regedit.exe Smiling

P.S. - reg3dit has nothing to do with the leaked Win2k source!!! I've created it by my own.

stas » April 20, 2006 » 01:16
XML feed