Click to See Complete Forum and Search --> : [RESOLVED] Logical pattern or random?


PeejAvery
June 8th, 2007, 10:14 AM
I am working with some filenames that have been encoded. I can't figure out if it is logical or random. Can anyone help?


coded => what I need
C494CFD => $2.89
97A4200 => $2.92
FDE856B => $2.93
26240B5 => $2.95
52F9B60 => $2.97
B3B4E7A => $2.98
B4F2326 => $2.99
9BD0EC4 => $3.03
D354F73 => $3.05
2E42285 => $3.09

Krishnaa
June 21st, 2007, 07:55 AM
You need a hacker ! :D It's not easy to look and find out, it could be any algo, you know. :)

PeejAvery
June 21st, 2007, 08:00 AM
Yeah. I spent forever trying to figure it out and even used a decrypter that I wrote about a year ago. I came close but not close enough. I ended up just writing an huge switch statement for about 100 items.

GremlinSA
June 25th, 2007, 03:54 PM
If you post more info i may be able to help ya..

The encoding is semi random, but there should be a key somewhere..

The valuse are all hex val's , are they stored as hex or as characters...

PeejAvery
June 25th, 2007, 04:25 PM
I'm using PHP to parse Gasbuddy.com. The problem is that the gas prices are .gif images. So, I don't want the ugly green .gif, I want text.

GremlinSA
June 26th, 2007, 04:28 AM
Hmm.... looked at it closely and sorry to say that it looks like its more random than anything else..

sorry no help ....

Zaccheus
June 27th, 2007, 10:05 AM
The problem is that the gas prices are .gif images.
What do you mean?

PeejAvery
June 27th, 2007, 10:16 AM
Each of the following arrows point to a .gif, not text.

Zaccheus
June 27th, 2007, 10:33 AM
Ok, but how does that relate to the hex numbers you posted?

EDIT:

Did you mean this page?
http://www.alabamagasprices.com/

Interesting - I think it is just an id for the image file:
http://www.alabamagasprices.com/images/p/g/757D007.gif

PeejAvery
June 27th, 2007, 10:52 AM
Ok, but how does that relate to the hex numbers you posted?
Those aren't hex numbers. Those are the image file names.

Interesting - I think it is just an id for the image file
Yes, I already know that. But I am trying to figure out if it is a logical pattern to the filenames or just a random assignment. So far, we are pretty sure it is random.

Zaccheus
June 27th, 2007, 11:04 AM
What I mean is that they are probably (something like) database row id-s, with no connection to the actual value, mapping each price to a corresponding gif. I suspect that the website is set up like this in order to make the displayed prices non-machine readable.

MrViggy
June 27th, 2007, 11:53 AM
Well, they are human readable. A screen capture and an OCR program could probably get the prices. :)

Viggy

S_M_A
June 27th, 2007, 12:07 PM
Assuming $3 being a common US price:
$3 * 7,0423 (SEK/$) / 3.58 (liter / usgallon) -> 5,90 SEK / liter
Filled my car yesterday for the common price of 12.19 SEK / liter. :cry:

PeejAvery
June 27th, 2007, 12:30 PM
Well, they are human readable. A screen capture and an OCR program could probably get the prices. :)
Yeah. I had thought of that, and am currently writing some OCR work in PHP. We shall see how it unfolds.

cvogt61457
June 27th, 2007, 12:40 PM
Is the pattern repeated where the price is the same?

If the filename is different where the price is the same, then I would conclude
that the filename is randomized to prevent someone from reading the
price programatically.

PeejAvery
June 27th, 2007, 12:47 PM
Is the pattern repeated where the price is the same?
Yes.

PeejAvery
July 6th, 2007, 03:38 PM
It turns out that gasbuddy.com is now rotating the images. The encoded filenames are changed about once a week. So, I decided to work with the GD library and see if I could come up with an OCR script since the gif images are just green and blue. Well, the script is getting too long. So, using the GD library, I am just extracting the color of the gif and the blue underline.

Now I have a monochrome gas price, which is close to what I wanted in the first place.