Don’t make unsubscribing from a newsletter too easy!

It’s probably a commercial trick to make the process of unsubscribing from a newsletter (*cough* spam *cough*) a bit harder than subscribing to it, but this time I must say I stumbled accross an extreme case!

1. The very easy subscribing part:

About 10 minutes ago I got an e-mail on an e-mail account I haven’t used in the last 2 years. I even forgot about the existence of it (the reason I still received this e-mail is because I set it up to forward mails to my real e-mail account) and before that I may have used it 4 or 5 times at most. I’m sure about this since I made it with a special reason.
Although I can’t remember doing so, it seems I somehow magically managed to subscribe to a newsletter with it and they have now e-mailed me.

2. The extremely difficult unsubscribing part.

I was very happy to see a little message at the end of the e-mail that said “click here to unsubscribe”.  So I clicked on it and then I landed on this page (in case the website goes down, I included a screenshot at the end of my post). Ironic captcha, isn’t it?
Being very competitive I decided to give it a few tries, but I gave up after all and decided to blog about it. Now that I’ve done so, I think it’s time to do some DNS and whois lookups ;-)

Unsubscribe From Spam

Word Challenge on Facebook + Java Native Access

I was curious how hard it is to access Windows Native Libraries (.dll files) with Java, so I made some time for a small and fun project this week: I made a bot for a Facebook application called Word Challenge. The Word Challenge Bot (I named it NRBot for now – haven’t made up my mind on a final name) isn’t done yet, but the basics are. It already allows you to score a lot of points in a small amount of time without doing a lot ;-)

So what’s still to be done then? Well here are some points I was thinking about, but I’m not sure when or if I will ever complete them, because I need to finish some other projects first:
- improve UI (now it’s just an ugly console app)
- improve code to find the correct window (now I’m just calling User32.FindWindowA with a hardcoded name in it – this will only work with Mozilla Firefox and if the game window was the last window that was opened)
- use OCR (Optical Character Recognition) to auto detect the letters provided by the application – this way the bot would become totally automatic!

Here’s some information on how the bot works:
It will only work on Windows. I’m using JNA (Java Native Access) to directly access native shared libraries (.dll files). You might say I should’ve used Java AWT (Abstract Windowing Toolkit), more specifically the Robot class, or that I should code such tools in C or C++, but as I mentioned before I made this decision on purpose because I wanted to know how hard it was to access Native Libraries from Java.
When you start the program, it searches the World Challenge application window. Like I said above, I still have to improve this. After this, the bot asks to type in the 6 letters you get from Word Challenge and then starts bruteforcing every possible combination with these letters. To do this, I used a PermutationGenerator I found on the internet (actually this only returns all 6 char possibilities so I used a bit of common sense to find the smaller unique combinations). Then the bot sends every possible combination to the application using SendMessageA(int hWnd, int msg, int wParam, int lParam); followed by a carriage return and a line feed.

I did some tests already, and the bot finds ALL possible words within a few seconds! Awesome, isn’t it? :-)

Here’s the sourcecode (you will have to add the JNA library to your project to compile), and for those who just want to cheat but don’t care about Java a .jar file is included (run from CommandLine with “java -jar NRWords.jar”).
Feel free to use and improve the source any way you want, but I would appreciate it if you let me know you did!

Your mobile device has encountered an unexpected error (0xE8000001)

Your mobile device has encountered an unexpected error (0xE8000001). That’s the error I got stuck on for the last 1.5 weeks when trying to deploy and test my iPhone application on my device instead of the simulator.

I surfed tons of forums and discussion boards but didn’t find any solution, but since this is something I really had to get past, I didn’t give up and tried out everything I could think about… with success! :-)

The weird thing about this error is that it doesn’t occur the first time you deploy your application. Everything goes great until you try it a 2nd time (or sometimes it works a couple of times and then it just happens at random). I read rumors that if you restore your iPhone, you can deploy your app again 1 time (or a couple of times) and after that the error appears again.
These facts made me suspect that there is something left or changed on the device after the first time you install your application, so here’s what I did:
- I restored my iPhone and jailbroke it, installed SSH on it, connected to it from my laptop and started looking around. I made a full dump of the file system (list of files & dirs, file properties, file sizes,…) and then deployed my application a couple of times until I got the error.
- When I got the error I made a new dump of the file system and I wrote a little tool that compared the 2 lists from head to toe.
- After having found all the differences I started changing them back one by one and tested if the change fixed my problem.
- I quickly found out that the directory “/private/var/mobile/Media/PublicStaging” was holding a copy of my application and after deleting this copy, I could deploy again just fine.

I suppose this is a bug in the iPhone SDK, or maybe in v2.2 of the iPhone OS? I don’t know exactly, but if you encounter this error when deploying your app, here’s what to do:
1. jailbreak your iPhone (unless there’s another way to do step 2, then you can skip this step)
2. install SSH on it
3. every time you get the error, SSH to your iPhone (default root password on v2.2 is “alpine”) and delete your application folder inside “/private/var/mobile/Media/PublicStaging”
4. you can now deploy again ;-)

Oh and euhm… don’t forget to put SSH off again when you’re done, or change your default password, because you don’t want anyone to SSH into your iPhone when you’re on some public wifi, do you?

Hello!

Welcome to my blog. On this blog I will post about some of my experiences and ideas on all different sorts of IT stuff.


 

January 2012
M T W T F S S
« Feb    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Follow

Get every new post delivered to your Inbox.