Bitcoin Forum

Bitcoin => Project Development => Topic started by: mcorlett on February 15, 2012, 06:37:35 PM



Title: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: mcorlett on February 15, 2012, 06:37:35 PM
I'd like a PHP script that does the following (in chronological order):
  • Connects to freenode (bonus points for SSL!)
  • Joins the #bitcoin-otc channel
  • Authenticates with gribble (feel free to use exec() in order to interface with GPG)
  • Rates a user
  • Peacefully disconnects from the network

There are tons of these IRC bot scripts, you just need to repurpose one of them to do what I ask.


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: btc_artist on February 15, 2012, 06:50:42 PM
There are tons of these IRC bot scripts, you just need to repurpose one of them to do what I ask.
There are?  When I needed some IRC automation code in PHP a while back, I couldn't find anything worth looking twice at.  So I rolled my own code.

I could do this for you, but It'd be significantly more than 0.9 BTC.

Out of curiosity, what are the exact steps to authenticate with gribble and rate the user?


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: mcorlett on February 15, 2012, 07:07:13 PM
Out of curiosity, what are the exact steps to authenticate with gribble and rate the user?
Message asking for a challenge string:
Code:
/msg gribble ;;gpg eauth mcorlett
Result:
Quote
Request successful for user mcorlett, hostmask mcorlett!~milton@unaffiliated/mcorlett. Get your encrypted OTP from http://bitcoin-otc.com/otps/17A99445F6DE80ED

Decrypt the one time password:
Code:
wget -O - http://bitcoin-otc.com/otps/17A99445F6DE80ED | gpg --decrypt --passphrase <private key passphrase>
Result:
Quote
You need a passphrase to unlock the secret key for
user: "Milton Corlett <milton.corlett@gmail.com>"
4096-bit RSA key, ID F6DE80ED, created 2011-12-18 (main key ID A88CD64E)

gpg: encrypted with 4096-bit RSA key, ID F6DE80ED, created 2011-12-18
      "Milton Corlett <milton.corlett@gmail.com>"
freenode:#bitcoin-otc:daf52608da5c293e733e4258b12949e0f6f245f73f3c2f3ec08d144f

Now you give it the decrypted OTP back to verify your identity:
Code:
/msg gribble ;;gpg everify freenode:#bitcoin-otc:daf52608da5c293e733e4258b12949e0f6f245f73f3c2f3ec08d144f
Result:
Quote
You are now authenticated for user mcorlett with key 17A99445F6DE80ED

Finally, rate the user:
Code:
/msg gribble ;;rate <nick> <rating> [<notes>]
Output:
Quote
Rating entry successful. Your rating of 1 for user <nick> has been recorded.

I make it sound like a lot of work, but that's because of my thoroughness. It's only 15 seconds or so doing it by hand if you know what you're doing.

I'll probably just make it myself if I don't get any offers. I was hoping to avoid messing with sockets, but it's a learning experience none the less. Thanks.


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: btc_artist on February 15, 2012, 07:34:13 PM
Are you willing to drop 3 BTC on it?


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: mcorlett on February 15, 2012, 07:37:19 PM
Are you willing to drop 3 BTC on it?
I'll let you know if I haven't found someone else or made it myself.

Thanks.


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: btc_artist on February 15, 2012, 08:56:38 PM
Are you willing to drop 3 BTC on it?
I'll let you know if I haven't found someone else or made it myself.

Thanks.
Sure.  Or if you want, I can share my IRC class/object with you (for a donation of course :P) and all you would have to do is add the part to authenticate with gribble and send the rating.


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: stcupp on February 15, 2012, 08:58:22 PM
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1817&lngWId=8

This is a very simple one that i found years ago and have used for many projects very easy to configure and add commands and such and very simple coding


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: mcorlett on February 16, 2012, 10:11:12 PM
I made one in Python instead, easy!

Thanks.


Title: Re: [BOUNTY] 0.9BTC for a PHP IRC bot
Post by: btc_artist on February 16, 2012, 10:55:33 PM
Good deal. :)