Quantcast

What works and what is paused · Email is limited to account activation and password resets.

Jump to content


Photo

Attic ABer in 30 lines of Ruby.


  • Please log in to reply
18 replies to this topic

#1 Inkheart

Inkheart
  • 268 posts

Posted 28 February 2012 - 07:57 AM

https://gist.github.com/1933290

It uses a persistent connection and is stripped to the bone for maximum speed. No frills, just buys expensive items. : )

Advertisement

    #2 Xilvain

    Xilvain
    • 9 posts

    Posted 28 February 2012 - 09:16 AM

    Has anyone tested this out to see how it goes?

    #3 Inkheart

    Inkheart
    • 268 posts

    Posted 28 February 2012 - 09:22 AM

    Has anyone tested this out to see how it goes?


    Well, I have, haha. I pretty much just wanted to show it to somebody. I was using it just fine earlier, but it seems like Neo is borked and no shops are restocking, so now wouldn't be a good time for anybody to test it.

    #4 Jun

    Jun
    • 907 posts

    Posted 28 February 2012 - 09:26 AM

    Anything makes it better than our Attic ABer?

    #5 Inkheart

    Inkheart
    • 268 posts

    Posted 28 February 2012 - 09:30 AM

    Anything makes it better than our Attic ABer?


    Sorry, I've never used it, so I wouldn't know. The fact that it has no frills means it's probably slightly better at grabbing high-end items, but with the drawback that you won't know until you check the account. It checks at :53, and then two more times after that just in case, but I imagine Codex's does, too.

    #6 Jun

    Jun
    • 907 posts

    Posted 28 February 2012 - 09:43 AM

    Sorry, I've never used it, so I wouldn't know. The fact that it has no frills means it's probably slightly better at grabbing high-end items, but with the drawback that you won't know until you check the account. It checks at :53, and then two more times after that just in case, but I imagine Codex's does, too.


    Lets wait until the shops start to restock again. I find codex's good enough but id like to try this one and see whats different.

    #7 ch33psh33p

    ch33psh33p
    • 249 posts

    Posted 28 February 2012 - 10:00 AM

    Inkheart, the attic has items come in at 52, and sometimes even 51.

    It doesn't come in exactly at 53, so I think it'd be more effective if you had it check over a certain range, say 51-54.

    #8 Inkheart

    Inkheart
    • 268 posts

    Posted 28 February 2012 - 10:24 AM

    Huh, that I did not know. Thanks for the heads-up. Ideal solution is probably to start at 51 and then check three more times.

    #9 Leaf

    Leaf
    • 372 posts

    Posted 07 March 2012 - 08:11 PM

    so has anyone aside from inkheart tested it? I'm really really curious as to how it adds up.

    how does it know what items are high value?

    #10 Strategist

    Strategist
    • Sadmin

    • 10013 posts


    Users Awards

    Posted 07 March 2012 - 09:01 PM

    I dl'ed it but all I get when i open it is the black box for a couple of seconds, then it shuts itself off. Any ideas?

    #11 Noitidart

    Noitidart
    • Neocodex Co-Founder

    • 23214 posts


    Users Awards

    Posted 07 March 2012 - 11:21 PM

    I dl'ed it but all I get when i open it is the black box for a couple of seconds, then it shuts itself off. Any ideas?

    I recommend you change your password as he probably just logged your pw and/or cookies. So log out and back in.


    edit:
    oh wait theres source, hm looks good. i dont know many sorry

    #12 Strategist

    Strategist
    • Sadmin

    • 10013 posts


    Users Awards

    Posted 08 March 2012 - 12:47 AM

    lol its all good Noity Toity :p


    Ive used Inkhearts programs before and they run very well, except this one. I don't know why either, unless im missing a file to run it? Any help from the author would be much appreciated :p

    #13 Arkidas

    Arkidas
    • 1231 posts

    Posted 12 March 2012 - 01:11 PM

    File "aaa.py", line 4
    require 'net/http/persistent'
    ^
    SyntaxError: invalid syntax

    Does it mean there's a module missing?

    #14 Inkheart

    Inkheart
    • 268 posts

    Posted 15 March 2012 - 08:14 PM

    File "aaa.py", line 4
    require 'net/http/persistent'
    ^
    SyntaxError: invalid syntax

    Does it mean there's a module missing?


    Heh, it's Ruby, not Python, so you'll need to save it with a .rb extension instead of .py. Of course, you'll probably have to install Ruby, too. : P

    #15 Strategist

    Strategist
    • Sadmin

    • 10013 posts


    Users Awards

    Posted 15 March 2012 - 08:23 PM

    I dl'ed it but all I get when i open it is the black box for a couple of seconds, then it shuts itself off. Any ideas?


    Lol ill just put this here again :p Any ideas Inkheart? :p

    #16 Melchoire

    Melchoire
    • 5284 posts


    Users Awards

    Posted 15 March 2012 - 09:05 PM

    This line is pretty cool:

    Conn.headers['Cookie'] = resp.get_fields('Set-Cookie').map { |c| c.split(';')[0] } * ';'


    Convoluted, but a sharp contrast to the cookie parsers we used to write with VB =P

    #17 Inkheart

    Inkheart
    • 268 posts

    Posted 15 March 2012 - 10:54 PM

    Lol ill just put this here again :p Any ideas Inkheart? :p


    Hm... it's probably the way you're running it. It's not an executable, just a script to be interpreted, so it has to be passed directly to the Ruby interpreter a la "ruby attic_aber.rb". I mostly released it to show off. : ) I didn't expect much interest given the existence of Abrosia, so I didn't provide any instructions, for which I apologize. Assuming you've got Ruby set up in any sane way, you'll also have to run "gem install net-http-persistent", which allows for a persistent connection and thus, theoretically, faster buy times by avoiding as much TCP as possible between requests. Always happy to help you get my stuff running, so feel free to inform me of any further issues.

    Melchoire, I freely admit to that being one of my favorite little tricks. : )

    Edited by Inkheart, 15 March 2012 - 10:55 PM.


    #18 Melchoire

    Melchoire
    • 5284 posts


    Users Awards

    Posted 15 March 2012 - 11:28 PM

    Melchoire, I freely admit to that being one of my favorite little tricks. : )


    Very nifty. I remember fumbling with an ugly for-loop and regex to parse cookies when I was doing this last year.

    #19 daj0sephz

    daj0sephz
    • 172 posts

    Posted 31 March 2012 - 09:58 PM

    could you explain how to use this exactly? do i need to download ruby?


    1 user(s) are reading this topic

    0 members, 1 guests, 0 anonymous users