September 13th, 2011 § § permalink
Every so often I try a crackme. I just enjoy the problem solving. I’m terrible, but somehow I get a kick out of it.
crackmes.de is down, so I stumbled across the next best, maybe a better thing. http://www.woodmann.com/RCE-CD-SITES/Quantico/mib/train.htm
An amazing collection of scene crackmes; if you ever thought you were good enough to represent – this is where to start.
Being an infant, I stuck with the tutorials. Even then I struggled. For hours.
My *working* solution to CrackMe1 is below. To make it a little more difficult for myself, I thought I would give C++ a spin.
I was bitterly disappointed that my keygen was larger than the original crackme.
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
//declare local variables
string _name;
int i = 0;
int char_sum = 0;
int _first, _second;
char c, d;
//ask user to input name, store it in local variable
cout << "name: ";
cin >> _name;
//put the name variable to uppercase
while(_name[i])
{
c = _name[i]; //create char from current index on string
d = toupper(c); //put char to upper
char_sum = (int(d)) + char_sum; //increment the count
i++;
}
//http://www.woodmann.com/RCE-CD-SITES/Quantico/mib/crack10.htm
_first = char_sum ^ 22136;
_second = _first ^ 4660;
//output the serial!
cout << "serial: " << _second << endl;
system("PAUSE");
return EXIT_SUCCESS;
}
July 5th, 2011 § § permalink
I’m working on a piece of software at the moment that will eventually require multiple users to access the database simultaneously. I’m a pretty basic coder, and I was wondering whether there was a way I could read/write to the database without using lock-in/lock-out controls. I was dreading have to do t.
I wanted the program to use a Microsoft Access 2007 Database, mostly because it would be very portable, rapid development that would be easy to backup when it went into operation. Performance isn’t so much an issue, seeing as there will 4 or 5 users maximum.
I had difficulty determining whether or not this could done. I don’t know why. I guess its obvious to most people.
The simple answer is it can be done. In both Microsoft Access and MySQL. Before I lept into development, I wanted to see how the database behaved in C#, so I thought I’d write a quick application to test whether or not I actually can write by multiple users.
(As it turns out, it can be done in Microsoft Access but I found it very problematic in my testing)
You’ll want an SQL database that is made to look like this:
CREATE TABLE helloworld(
id INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
name VARCHAR(30));
And then compile this short c# program. Don’t forget to change the various settings that affect you.
You’ll need the MySQL .NET Connecter, and include a reference in your project.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//the additional references you'll need
using System.Data;
using MySql.Data;
using MySql.Data.MySqlClient;
using System.Threading;
namespace mySQLTest
{
///
<summary> /// This program is written to prove that multiple threads or users can simulatenously access the MySQL data base and write. /// The MySQL connector handles the lockout or connection attempts automatically. /// </summary>
class Program
{
static void Main(string[] args)
{
//declare two threads to act like users
Thread thread1 = new Thread(new ThreadStart(DatabaseClass.doStuff));
Thread thread2 = new Thread(new ThreadStart(DatabaseClass.doOtherStuff));
//start the threads running
thread1.Start();
thread2.Start();
//the current 'main' thread, should run in a loop until the other two have finished.
while (thread1.ThreadState != ThreadState.Stopped && thread2.ThreadState != ThreadState.Stopped)
{
Thread.Sleep(200);
}
//once the threads are finished, notify us through the console.
Console.WriteLine("End");
Console.ReadLine();
}
}
static class DatabaseClass
{
///
<summary> /// this function is quite well documented in the MySQL manual, the section that talks about .NET connectors. /// </summary>
public static void doStuff()
{
string connStr = "server=192.168.3.11;user=root;database=world;port=3306;password=password;";
MySqlConnection conn = new MySqlConnection(connStr);
try
{
Console.WriteLine("Connecting to MySQL...");
conn.Open();
//i want to enter a thousand items
int i = 0;
do
{
string sql = "INSERT INTO helloworld (name) VALUES ('user1')";
MySqlCommand cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
i++;
} while (i < 1000);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
conn.Close();
Console.WriteLine("Done.");
}
public static void doOtherStuff()
{
string connStr = "server=192.168.3.11;user=root;database=world;port=3306;password=password;";
MySqlConnection conn = new MySqlConnection(connStr);
try
{
Console.WriteLine("Connecting to MySQL...");
conn.Open();
int i = 0;
do
{
string sql = "INSERT INTO helloworld (name) VALUES ('user2')";
MySqlCommand cmd = new MySqlCommand(sql, conn);
cmd.ExecuteNonQuery();
i++;
} while (i < 1000);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
conn.Close();
Console.WriteLine("Done.");
}
}
}
If you were to shoot into MySQL Console right now, and ran:
SELECT * FROM helloworld;
You’d be delighted (like I was), to find your two users have simultaneously written to the database.
June 22nd, 2011 § § permalink
The OLE DB provider “Microsoft.ACE.OLEDB.12.0″ has not been registered.
Was the message I recieved from Visual Studio 2008 as I tried to use an Access database with my new application.
I protested quietly – knowing that the OLE DB providor WAS installed and WAS referenced in my project… I’d come across the problem before but couldn’t remember how I fixed it.
Getting Error “The OLE DB provider “Microsoft.ACE.OLEDB.12.0″ has not been registered”. when importing excel file. had the answer (a fair way down the page).
The Microsoft.ACE.OLEDB.12.0 is for x86 architecture – by default Visual Studio was compiling in x64.
Build > Configuration Manager > Platform > “New…” > x86
And it works!
June 18th, 2011 § § permalink
Came across an interesting problem – endnote removed itself from the toolbar in office 2007.
These is some incompatibility with the .dll and the new office, that emerges under certain conditions.
The most frustration part is that it isn’t clear how you restore it.
Office Button > Word Options > Add Ins > Manage : Disabled Items
This will tell you that something went wrong with EndNote – now all you need to do is click enable.
Restart Word, and your back again!
June 17th, 2011 § § permalink
This may seem really dumb, but it will drive you up the wall if you’ve ever got caught in it.
Situation – you may be editing a HDV movie in Adobe Premiere Pro – but for some reason you’ve had to delve into the archive for some DV footage.
Annoyingly, you realise its still on tape. You blow the dust of the DV camcorder, plug it into the firewire – hear the satisfying device found sound.
You goto ‘Capture’ only to see that you cannot play or record the video.
I wasn’t even editing HDV when this happened, which in itself is a pretty big indicator of what the problem is, in fact I’d already dumped over 50 hours of DV footage!
Simple solution, somehow find the ‘Capture Format’ in the comparatively few options you have in the capture window, and change from HDV to DV.
June 17th, 2011 § § permalink
So I finally crumbled. I had to try it and find out what this AdWords is all about.
Compromise my website ideals… check.
Make my own private site messier… check.
But with sometimes terabytes of monthly traffic… I’d be crazy not to try!
If Google is as good as it says it is, hopefully there’ll be good, relevant ads.
We’ll find out!
May 13th, 2011 § § permalink
Sometimes manufactures supply their flashing software in 16bit executables, which is really unhelpful if your running 32bit or 64bit operating systems.
I wound up in a crazy but unsurprising situation where I needed to flash a BIOS. Problem was the manufacture supplied 16bit flashing software.
This wouldn’t be so bad if it weren’t for the fact they supplied the software under the “Vista 64bit” download section.
Floppy drives are almost non-existent these days, and I had already decided I was not going to install one just so I could flash the BIOS (where would I find a floppy disk anyhow??)
You can make USB sticks bootable with MS-DOS, fortunately the tutorial had the links to the correct software required.
1. hpflash.zip and win98boot.zip.
I’ve uploaded the same files here for long jeopardy.
(hpflash1 and win98boot).
2. Install the HPFlash utility
3. Run the install utility, formatting a USB stick. I recommend doing a quick format. Make sure you select ‘Make Bootable’ and select the bootable files from the unpacked win98boot.zip
4. When you open your USB stick, it will appear empty – copy the flash files (or whatever executables you wanted to run in 16bit) to the stick.
5. Put into the computer you want to boot, make sure you check your BIOS settings enable booting off USB stick.
May 5th, 2011 § § permalink
I did the modification for the AE72H / AE92H/ (U)BC72XLT / (U)BC92XLT as described at http://www.discriminator.nl/.
Everything went really well, thought I’d share a few notes about the modification.
I was lucky that I head a fresh and pointy solder tip that had been well looked after. When soldering LND7, you need to be super accurate.
Don’t bother doing the modification to your scanner unless you have reasonable soldering skills. You will cause damage otherwise.
I did the modification because I wanted to use PDW. Unfortunately I wasn’t having much more success at the end of the modification than I was before it… might have another play tonight.
The other important thing is that you DO use a 10k resistor. For giggles I took it out after a bit of a play with PDW, and the scanner turned off.
It didn’t break it, but I wouldn’t do it again.
May 4th, 2011 § § permalink
If you are on this page because you want to know the channels the Victorian SMR network uses, scroll straight down to the text file. It should feed straight into the profile file.

This is what you ought to see when Trunkview is all working.
I’ve been trying to figure out how to trunk track the SMR network for a while.
Plenty of forum posts asking, but there seems to be a wide spread resistance on the forums to sharing information.
Its one of the few internet based cultures where exclusiveness seems to reign supreme. I could go on, but I’ll restrain myself.
Trunkview obviously follows the MPT1327 protocol, which is what is used by the Victorian SMR network.
Unfortunately (as in my previous post about Programming SMR Trunk Tracking Frequencies), you cannot program most scanners to follow this protocol. If you really want to follow conversations, you are better off just programming in the voice frequencies into a scan list.
These lists are published all over the web, readily accessible.
The really important thing about the SMR network and Trunkview is knowing:
Base frequency is 162.0500 MHz
The channels are [1 - 251],[301 - 364].
That last bit is really important. Trunkview generally wants to know a control channel, base freq and freq step. The SMR network doesn’t have channels [252 - 300].
********** TEXT FILE HERE ***********
In this file, SMR, is the channel list that Trunkview needs. But first I need to describe how to set Trunkview up to use it.
1. You need to scan for a strong Control Channel. A control channel sounds like this. (In case that doesn’t work, I’ve uploaded here for long jeopordy ). The site the file is from is http://www.kb9ukd.com/. I they don’t mind me linking them. No doubt they’ll let me know if it is.
In my experience Trunkview is fairly forgiving of noise on the control channel, but ultimately you would as clear as possible. In my examples, I’ll be using control channel 164.7375 MHz. This channel is very clear for me, but you may not even be able to receive it. For giggles, find your own.
2. You need to calculate the base frequency. I know I said it was 162.0500, but I could be wrong. Also the base channel would be different if your scanning higher frequency MPT networks. I can listen to a number of networks in the 400-500 MHz range.
The formula is
CCh – (Ch# * Step) = Base
CCh = Control Channel
Ch# = Channel Number
Step = Frequency Step
So for my situation, the working would be 164.7375 – (215*0.0125) = 162.0500
Notice the step frequency is 0.0125? Thats because you need to use the formula in the same units. We are using MHz frequencies, therefore we should show our step frequency in MHz.
3. Normally we would have enough information to just make Trunkview work, BUT because the SMR network is “missing” a number of channels, we need to use our custom channel list.
Hook your scanner up to your computer, preferably with a COM cable so it can control it. (I might make another post about troubleshooting that)
Turn the scanner onto the control channel, and admire the flashing output of “AHOY, ALOHA and BRDCST” in the bottom left. If your not getting this, check your volume is up, and that your mic/line in is working properly. Create a new site with this information. In the case of the Vic SMR network, I recommend naming it the same as its ID.
4. The finishing parts of fairly intuitive, albeit you might have to search around a bit. I’m going to breeze over, and just give an overview.
5. Create a new profile, it needs to be the same as your site name (for vic smr), because otherwise trunkview will make channel decisions which do not follow your custom channel list.
6. Find the profile file in the \Trunkview\Profile\ folder
7. Open in wordpad, and dump in the channel list provided earlier. Save it.
8. Go back into Trunkview. When you get it all up and running, the profile and site information should automatically fill out correctly
That should be enough starter information… I think I’ll update the post when I’m feeling more focussed on describing the detail. Maybe some screen shots.
Have fun, and pop me an email if you have any trouble or success!
May 1st, 2011 § § permalink
I’ve had the frustrating experience of ghosting in my videos before.
This time I was editing GoPro footage, and, after solving my first problem with importing the video I was now finding the video was ghosting and jolty after exporting.
Whilst editing, the picture was fine. In fact, it was exactly what I wanted. In the video I was doing a lot of slow motion, sometimes at high frame rates, other times at 25-30 fps.
It didn’t matter what options I selected in export, the video was always jolty with ghosting. The solution was to deinterlace. The problem was finding out how to do this is Adobe Premiere CS4, because to me, it wasn’t obvious.
1. Highlight all the clips in the sequence, Clip > Video Options > Frame Blend (Off)
2. Select each clip individually, right-click > Frame Hold > Deinterlace (On)
3. Export!