Software – HM2K http://hm2k.org/ Research and development Sun, 18 Mar 2012 22:59:03 +0000 en-GB hourly 1 https://wordpress.org/?v=5.5.1 181873647 Presenting Coinb.in https://hm2k.org/posts/presenting-coinb-in https://hm2k.org/posts/presenting-coinb-in#respond Wed, 27 Jul 2011 10:22:20 +0000 http://labs.phurix.net/?p=3070 Related posts:
  1. Tracking an IP address In my job I have to manage lots of machines...
  2. longip perl script I wanted to create a script that would convert a...
]]>
Bitcoin is a peer-to-peer cryto currency and we’ve been working on a free service for bitcoin users to help with accepting payments.

Coinb.in is what is known as a “Bitcoin eWallet Service” with an easily accessible API aimed at web developers, to allow the acceptance of bitcoins and to process the payments automatically and anonymously from our network via an unbranded interface, at no fee, without having to run a bitcoin client.

Coinb.in works by providing your customer with a unique wallet address, which is linked to your account. The coinb.in service then checks the Bitcoin p2p network at regular intervals. Once the payment has been confirmed, you will receive a notification by email and the transaction data will be sent to a script of your choice, which can then be used to process the order and populate your database.

There are a number of different ways to implement Coinb.in. The most simple and least complex way would be to implement a “buy it now” button, which does not require the user to register first.

For example, on a small project we run, called Gallush the following code could be added to a product page as a bitcoin “buy it now” button.

<script src="http://coinb.in/merchant.js"></script>
<script>
    var cb = {'uid':'2',
    'amount':'3.00',
    'fromcurrency':'USD',
    'description':'Starter shell. 1 month',
    'ref':'I10',
    'requestemail':1,
    'callback':'http://www.gallush.com/btc-payments.php'};
</script>
<a href="javascript:;" onClick="coinbin(cb);">Buy it now!</a>


Here’s an example: Buy it now!

The html and javascript above, would generate a link that would require no site registration because when it is clicked it will request that the visitor enters in their email address before they can continue, because of the &requestemail parameter being set.

Once the user has provided their email address, coinb.in will convert 3 USD to the equivalent value in bitcoins, and return this value plus an address to make a payment to.

The &description parameter  should contain a full description of the purchase and the &reference parameter in our example contains the item id (I10).

Once the user had made a payment, and it has been confirmed 6 times, all of the above data and additional transaction data is then sent to the callback URL provided so that it may populate the database and process the order accordingly.

Coinb.in comes complete with, examples, documentation and an API that can output the results into several different formats including XML and JSON objects

Now the question is, would you buy web hosting with bitcoins?

]]>
https://hm2k.org/posts/presenting-coinb-in/feed 0 3070
Announcing Phurix Labs https://hm2k.org/posts/announcing-phurix-labs https://hm2k.org/posts/announcing-phurix-labs#respond Thu, 14 Jul 2011 23:06:31 +0000 http://www.hm2k.com/?p=3017 Related posts:
  1. PageRank Viewer Launch Back in 2007, we were developing code for our domain...
  2. Is Google PageRank dead? PageRank is dead, long live PageRank. As we said recently,...
  3. HM2K’s code repository HM2K’s code repository is now open for business! This repository...
  4. What is my IP? An IP address is a unique number which identifies a...
]]>
I’ve been thinking about retiring this site for some time now, but have been toying with the pros and cons.

A decision had to be made.

You see, the context of the HM2K blog has always had a subtle undertone of my business and the work I do online. That business is Phurix web hosting.

Phurix has always supported me and the blog, but unfortunately, because of other commitments I have less and less time to write and publish.

At first I thought the best solution would be to shut down the blog and call it a day, while a colleague said he thinks I should keep it online.

I’ve been thinking about a solution for a long time but then, while I was on holiday, it hit me.

Merge it into the Phurix brand and it made sense too:

  • HM2K.com was a hard concept to explain
    • Easier concept: Phurix Labs:”Where we experiment with ideas and findings”
  • HM2K.com had no context, it would often seem random
    • Makes more sense in the context of the business
  • HM2K.com had no real focus or agenda
    • Focus on what is important: the business
  • HM2K.com was a burden on one person
    • Shared with Phurix
  • HM2K.com was not making money
    • By improving brand awareness business will increase

A proposal was put forward and it went better than expected, it all seemed to fit together nicely. Perfect!

The decision was made and I have no regrets.

Today, we started by introducing a new “Phurix Labs” theme to HM2K.com, so that’s phase one is done.

Over the next few days, the website will be migrated from here to “labs.phurix.net” (where it now belongs). That’s phaze two.

Thanks for reading and I hope you continue to support the new Phurix Labs project.

These are exciting times, watch this space!

About Phurix

Since 2004, Phurix has offered affordable and reliable hosting services with a no nonsense approach. Phurix will continue to provide a high quality of service and engage with customers to ensure its future and growth.

Authorised cPanel Partner and OpenSRS partner.

About Phurix Labs

Phurix Labs is where we experiment with ideas and findings. You’ll find all sorts of useful tools and information.

]]>
https://hm2k.org/posts/announcing-phurix-labs/feed 0 3017
How to find the fastest CVSUP mirror server https://hm2k.org/posts/how-to-find-the-fastest-cvsup-mirror-server https://hm2k.org/posts/how-to-find-the-fastest-cvsup-mirror-server#comments Wed, 30 Mar 2011 14:41:42 +0000 http://www.hm2k.com/?p=2316 Related posts:
  1. FreeBSD 6.2 “/usr/ports: No such file or directory” I recently setup a new FreeBSD 6.2 server, only to...
  2. Configuring a FreeBSD IRC Shell Server This is a brief guide created to help configure a...
  3. Setting up a FreeBSD socks proxy server for use with mIRC Update: Looking for the sss.pl? Try the Simple Sockets Server...
  4. Installing Subversion on a cPanel Server It should be easy right? Just “yum install subversion”. Nope. You...
]]>
Some time ago I wrote about using fastest_cvsup, to find the fastest cvsup mirror server for use with csup on FreeBSD.

fastest_cvsup is a system utility written in Perl that finds fastest CVSup mirror server for FreeBSD, OpenBSD or NetBSD.

Here I’m going to tell you how to get started…

Install

First of all you need to install it, there are a number of ways to do this, but on FreeBSD you probably want to install from ports:

cd /usr/ports/sysutils/fastest_cvsup/ && make install clean

Note: You MUST be root to install ports

Get help

Once installed you are able to read more information about fastest_cvsup by issuing the following commands:

fastest_cvsup -h

This will display the general help.

man fastest_cvsup

This will display the more detailed manual page.

Usage examples

Here’s a few practical examples to get you started.

This example will check to see which United Kingdom (uk) based servers are quickest:

# fastest_cvsup -c uk
>> Querying servers in countries: uk
--> Connecting to cvsup.uk.freebsd.org [131.111.8.41]...
- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 136.71 ms
--> Connecting to cvsup2.uk.freebsd.org [131.111.8.41]...
- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 139.81 ms
--> Connecting to cvsup3.uk.freebsd.org [131.111.8.41]...
- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 134.28 ms
--> Connecting to cvsup4.uk.freebsd.org [195.40.6.45]...
- server replied: OK 17 0 SNAP_16_1h CVSup server ready
- time taken: 129.03 ms

>> Speed Daemons:
- 1st: cvsup4.uk.freebsd.org 129.03 ms
- 2st: cvsup3.uk.freebsd.org 134.28 ms
- 3st: cvsup.uk.freebsd.org 136.71 ms

To find the fastest server in Europe you would use something like this:

# fastest_cvsup -q -c uk,ie,fr,de,fi,no,nl,ch

Go nuts, test them all:

# fastest_cvsup -Q -r -c all

This example will give you the times of just OpenBSD and NetBSD servers:

# fastest_cvsup -c openbsd,netbsd

In this example we will use fastest_cvsup with the cvup command to update the ports using the fastest server in the United States (us):

# csup -g -L 2 -h `fastest_cvsup -Q -c us` /root/ports-supfile

Note: “-Q” is used to make it super quiet which is useful when using in scripts or in-line commands.

Find out more

Visit the fastest_cvsup website to find out more.

]]>
https://hm2k.org/posts/how-to-find-the-fastest-cvsup-mirror-server/feed 1 2316
Scan to Excel https://hm2k.org/posts/scan-to-excel https://hm2k.org/posts/scan-to-excel#comments Sat, 24 Oct 2009 12:11:04 +0000 http://www.hm2k.com/?p=546 No related posts. ]]> This week I’ve mostly been trying to figure out a way to digitalise some of my bank statements to make accountancy and archiving easier.

I figured there must be a way to scan them in using a document scanner, then use OCR software to render the data into Excel.

Of course, nothing does this natively, but there are ways to do it.

There are three parts to this process…

  1. Document scanning
  2. Data format conversion
  3. Optical character recognition (OCR)

For the scanning part I used a Ricoh Aficio MP C4500, which not only acts as a Photocopier, but as a fax machine, network printer and network scanner.

The main part is it’s ability to scan with document processing. This means (once configured) that it would only take a few minutes to scan a few hundred pages, rather than a few hours using a conventional scanner.

This device has the ability to save scanned documents as PDF or TIF. I decided to use the more versatile TIF image format.

I figured it would be easier to convert a standard image format than the proprietary PDF format. I very quickly discovered that it wasn’t that simple.

To begin with I had heard good things about two leading OCR software packages…

  • ABBYY FineReader 9.0
  • Able2Extract Pro 5.0

I found that neither of these software packages would accept TIF files, so I converted each directory of TIF files into a single PDF file using the DreamSys Tiff to PDF Converter, which was a very quick and effective command-line tool for doing the task.

I started trying out Able2Extract as I’d not used it before and I had read good things about it’s PDF to Excel conversion. The problem was it kept throwing up a “Fatal Internal Error #24” error which I was unable to work around.

I had used ABBYY in the past and it turned out to be very good OCR software for converting to Word at least, however trying to configure it to scan the areas I wanted into Excel seemed almost impossible and took forever.

I decided to go back to the drawing board…

I quickly realised that there were a few “web 2.0” software as a service tools out there that could assist me…

There’s many universal “online document converters”, a few include…

My issue with most of these is that they would recognise the PDF, but not the images inside the PDF and use OCR to render them. They are only designed to take the text found in a PDF file and extract that to Excel.

I also came across a few other software packages that will also convert from PDF files to Excel…

  • deskUNPDF Professional by docudesk
  • PDF2XL Enterprise by cogniview
  • ExpressConversion Server by adlibsoftware
  • PDF To XLS by verypdf
  • Solid Converter PDF by soliddocuments
  • TotalPDFConverter by coolutils

With all this available proprietary software for converting from PDF to Excel (XLS or CSV) its obvious that it’s a service definitely in demand.

So far I’m waiting on the following:

  • Zamzar and others to email me their conversion of the PDF file I uploaded to them.
  • Able2Extract’s support team to get back to me with regards to the error.
  • For Cogniview PDF2XL Enterprise to download.

Let’s see what gets the job done best, first, if any…

Zamzar is unable to convert from PDF to XLS, directly or indirectly. While finereaderonline will only accept images, not PDF files, which is OK, but may take some time, especially at only 10 pages per day.

Able2Extract were unable to help me with the error unless I sent them the PDF, which I can’t do due to it’s content.

I sent DreamSys an email asking them to send these guys a sample output PDF instead, but I’ve heard nothing back as of yet.

Able2Extract recommended I use their Sonic PDF Creator product to convert the original scanned TIFF files to a PDF which they claim their Able2Extract product will be able to read.

I had a play with Sonic PDF Creator and appeared to be unable to import a directory of TIF files, just each TIF file individually. This seemed like a painstaking process.

I needed to merge the TIF files together into 1 file to make it easier. PTGui Pro is able to stitch TIF files together, however it gave me an error saying:

Error loading TIFF file: Unsupported number of bits per sample (only 8, 16 or 32 are supported) or unsupported sample format. Useless.

Back to square one.

I decided to try my luck with PDF2XL, which after a little teething problem getting a working copy to begin with seemed to be quite a neat package.

PDF2XL was able to detect that the PDF I had given it (the one I created using Tiff 2 PDF) was a scanned document and began performing OCR on the file.

The results were almost prefect, VERY impressive. It seems that PDF2XL is able to do what nothing else could, not even Able2Extract. Don’t waste your time with anything else. It seems that PDF2XL is all you need.

The only thing I will say is I had to tweak the OCR settings a little bit to get it to render the page correctly.

Just when I thought everything was going great, I discovered another issue I had completely overlooked. The output was not in the correct order. I took a look at the original PDF and soon discovered that the images in the PDF were not in the correct order either.

First off, I decided that I should rename all the images based on the sheet number, that way I could be sure that they were correctly ordered. I created a batch file to preview and rename the images, called “imgrename.bat“. I was also able to use this to rename an entire directory at a time.

I tried rebuilding the PDF using DreamSys Tiff to PDF Converter which I had used to create the PDF file in the first place, only to find that it was still out of order and I couldn’t influence the sorting. I had to find something else to do the job…

Enter libtiff and it’s windows counterpart Tiff for Windows by GnuWin32. Once I had a copy of this I was able to write another batch file that would not only combine the TIFF files (with pages) into a single TIFF file (using tiffcp.exe) but I was able to convert that into a PDF using (tiff2pdf.exe). I called this script “tiff2pdf.bat“.

Bingo!

All was successful…

The next task is to firstly, cleanup anything bad in the CSV file left by OCR (cleancsv.bat) then to “normalise” the data…

But that’s another story for another time. We’ve done what we set out to do which was to scan to excel and all is well on that front.

Hope you find this useful. Enjoy!

]]>
https://hm2k.org/posts/scan-to-excel/feed 3 546
W32Dasm https://hm2k.org/posts/w32dasm https://hm2k.org/posts/w32dasm#comments Tue, 13 Oct 2009 15:55:43 +0000 http://www.hm2k.com/?p=526 Related posts:
  1. What’s wrong with low version numbers? In a presentation entitled “Why I hate Django”, Cal Henderson...
]]>
W32Dasm (or Win32DASM) doesn’t seem to exist on the map any more, but it’s still a very useful programmers tool, especially if you like reverse engineering.

W32Dasm is a Windows 32-bit (Win32) disassembler. What it does is display the programs routines in assembly code, which makes it easier for you to trace what the software is doing.

I like to use this software every once in a while, but recently I found there were no decent sources for this software.

However, I soon located a copy that I had on my computer from a while back, in a directory named “w32ds893”.

The help file details a website which appears to be down, but there is an archived version.

http://www.expage.com/page/w32dasm

This takes you to another now defunct site, which is also archived:

members.home.net/w32dasm/

As you can see from that page you can download w32dasm v8.7 as w32ds87.zip, but not the latest version.

I uploaded w32ds893.zip which contains “W32DSM89.EXE“, which is the latest known version:

I don’t know where this was originally sourced from, but I know it works fine.

Note: If you have any questions or know of any updates, please feel free to add a comment below. Thanks.

]]>
https://hm2k.org/posts/w32dasm/feed 11 526
Pingotron https://hm2k.org/posts/pingotron https://hm2k.org/posts/pingotron#respond Thu, 01 Oct 2009 11:23:44 +0000 http://www.hm2k.com/?p=276 Related posts:
  1. Find the ip address of a seized website So your favorite site is now displaying the following message:...
]]>
I’ve been meaning to publish a post about Pingotron for some time now, but now I fear it’s already too late.

Quite a few months back I was looking for an application that could sit on my desktop and tell me instantly if any of my servers had stopped responding by ping.

There’s probably hundreds of ways of monitoring services, including paid for web services such as Pingdom, and open source software that runs on your web server such as Nagios. None of them really hit the spot for the services I wanted to monitor, or they were expensive.

A quick and easy way to monitor services that was fairly non-intrusive was what I wanted. Enough detail to tell you that a server was unreachable by ping and when it happened.

Pingotron seemed ideal…

Pingotron is a computer program for controlling and monitoring network devices, such as computers, network printers, routers and other devices, on TCP/IP networks. The program has two versions: Pingotron (basic) and Pingotron PRO.

A list of desired hosts that you wish to control are entered into the program.

The program sends ICMP “echo request” packets to each host and listens for ICMP “echo response” replies. Various properties (ping interval, size of packet, time-out request) can be configured for each host. The program can notify an administrator when a problem arises with any host with an alert sound, e-mail, blinking tray notification and/or network notification. The PRO version has an alarm history log feature, alarm statistics, and ping history and ping statistics for all hosts, in addition, it has a multi-user mode.

I started to use it, however, straight away I came across an odd issue which seemed to only affect the DG834 series routers.

The software reported the ping response from these routers as an “unknown response”, while in windows regular ping, they responded just fine.

It was clear that the software seemed to think that the response was malformed, perhaps it wass, however regular windows ping does not.

I emailed the details over to the author via the support email address. I got a response the same day.

Anatoly Dobrinin fixed the bug, provided me with the latest PRO version download and a valid serial number to register it as a full version.

What a great author! I was impressed. Sure I would never have paid for this software, as there were clearly free solutions, so this was great!

This was last year in 2008. This year, I find that if you visit Pingotron.com you find yourself at some kind of ad filled domain parking page. Fortunately you can still find an archived copy of Pingotron.com in the web archive.

Update: As Pingotron appears to be no more I have decided to share my resources…

Hello,

Thank you for your message.

This bug has been fixed today.

Please download and install the program again.

You can download the program here:

http://www.pingotron.com/setup_pro.zip

You can use this registration code to register  the pro version:

EET4-3EZS-VTK0-M0U7

Best regards,
Anatoly Dobrinin

Note: If Anatoly would like me to remove this, feel free to contact me.

A copy of setup_pro.zip can be found on megaupload.

Further Update: I had another issue that I tried to report, but since pingotron.com is unreachable, nothing can be done about it.

It wasn’t a major issue. The issue was that sometimes when explorer crashes, the Pingotron icon does not reappear in the system tray.

There was no way to recover the icon or window, without killing the “Pingotron.exe” and restarting it. Running “Pingotron.exe” again would only give you the error “The program is already running!”.

I solved this by writing a script using AutoIT which would Check if the Pingotron window exists, restore it, otherwise run “Pingotron.exe”. I called it Start Pingotron.

Anyway, since Pingotron is clearly no longer in active development, I am wondering is there’s anything else to use instead. Any ideas? Let me know.

Perhaps I’ll just end up writing my own service instead…

I noticed that sometimes when explorer crashes, the pingotron icon does not reappear in the system tray.
]]>
https://hm2k.org/posts/pingotron/feed 0 276