CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    May 2002
    Posts
    10,943

    [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?

    Code:
    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
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  2. #2
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Logical pattern or random?

    You need a hacker ! It's not easy to look and find out, it could be any algo, you know.
    Regards,
    Ramkrishna Pawar

  3. #3
    Join Date
    May 2002
    Posts
    10,943

    Re: 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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  4. #4
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: 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...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  5. #5
    Join Date
    May 2002
    Posts
    10,943

    Re: 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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  6. #6
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: 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 ....
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  7. #7
    Join Date
    Apr 2004
    Location
    England, Europe
    Posts
    2,492

    Re: Logical pattern or random?

    Quote Originally Posted by PeejAvery
    The problem is that the gas prices are .gif images.
    What do you mean?
    My hobby projects:
    www.rclsoftware.org.uk

  8. #8
    Join Date
    May 2002
    Posts
    10,943

    Re: Logical pattern or random?

    Each of the following arrows point to a .gif, not text.
    Attached Images Attached Images
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  9. #9
    Join Date
    Apr 2004
    Location
    England, Europe
    Posts
    2,492

    Re: 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
    Last edited by Zaccheus; June 27th, 2007 at 09:54 AM.
    My hobby projects:
    www.rclsoftware.org.uk

  10. #10
    Join Date
    May 2002
    Posts
    10,943

    Re: Logical pattern or random?

    Quote Originally Posted by Zaccheus
    Ok, but how does that relate to the hex numbers you posted?
    Those aren't hex numbers. Those are the image file names.

    Quote Originally Posted by Zaccheus
    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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  11. #11
    Join Date
    Apr 2004
    Location
    England, Europe
    Posts
    2,492

    Re: 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.
    My hobby projects:
    www.rclsoftware.org.uk

  12. #12
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Logical pattern or random?

    Well, they are human readable. A screen capture and an OCR program could probably get the prices.

    Viggy

  13. #13
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: 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.

  14. #14
    Join Date
    May 2002
    Posts
    10,943

    Re: Logical pattern or random?

    Quote Originally Posted by MrViggy
    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.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  15. #15
    Join Date
    Aug 2001
    Location
    Texas
    Posts
    645

    Re: 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.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured