[RESOLVED] Logical pattern or random?
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
[398 byte] By [
PeejAvery] at [2007-11-20 8:25:41]

# 1 Re: [RESOLVED] Logical pattern or random?
You need a hacker ! :D It's not easy to look and find out, it could be any algo, you know. :)
# 2 Re: [RESOLVED] Logical pattern or random?
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.
# 3 Re: [RESOLVED] Logical pattern or random?
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...
# 4 Re: [RESOLVED] Logical pattern or random?
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.
# 5 Re: [RESOLVED] Logical pattern or random?
Hmm... looked at it closely and sorry to say that it looks like its more random than anything else..
sorry no help ...
# 6 Re: [RESOLVED] Logical pattern or random?
The problem is that the gas prices are .gif images.
What do you mean?
# 7 Re: [RESOLVED] Logical pattern or random?
Each of the following arrows point to a .gif, not text.
# 8 Re: [RESOLVED] Logical pattern or random?
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
# 9 Re: [RESOLVED] Logical pattern or random?
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.
# 10 Re: [RESOLVED] Logical pattern or random?
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.
# 11 Re: [RESOLVED] Logical pattern or random?
Well, they are human readable. A screen capture and an OCR program could probably get the prices. :)
Viggy
# 12 Re: [RESOLVED] Logical pattern or random?
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:
S_M_A at 2007-11-9 12:30:21 >

# 13 Re: [RESOLVED] Logical pattern or random?
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.
# 14 Re: [RESOLVED] Logical pattern or random?
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.
# 15 Re: [RESOLVED] Logical pattern or random?
Is the pattern repeated where the price is the same?
Yes.
# 16 Re: [RESOLVED] Logical pattern or random?
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.