Talk:Dante

From Botdom Wiki
Jump to: navigation, search

This is the discussion page for Dante

Suggestions for SVN version

  • Include Dios
    • SubjectX52873M is working on including this.
      • Done as of SVN revision 48. Nol888(Talk) 12:10, 30 January 2008 (PST)

0.9a through 0.4 patch

To use this patch you need to replace the "getAuthToken" function in /system/classes/damn.php with the code below. The function can be found towards the bottom of the stated file. <php> /** *Get Token * *This function logs the bot into it's account and steals the cookie from the server. The cookie contains an Md5 hash, called an AuthToken. The dAmn server (chat.deviantart.com:3900) uses the AuthTokens for login not passwords. So the bot needs to grab the Authtoken before logging into the chat server. *@author SubjectX52873M <SubjectX52873M@gmail.com> *@author electricnet *@return mixed FALSE on errors, string( 32 ) on success *@version 0.4 */ function getAuthToken() { internalMessage( "Getting authtoken..." ); global $event,$config; $login = parse_ini_file( f( "config.ini" ) ); //This loads the $login

$query = "username=" . $login['username'] . "&password=" . $login['password'] . "&reusetoken=1" . chr( 0 ); $data = "POST /users/login HTTP/1.1\n" . "Host: www.deviantart.com\n" . "User-Agent: " . BotUserAgent . "\n" . "Accept: text/html\n" . "Cookie: skipintro=1\n" . "Content-Type: application/x-www-form-urlencoded\n" . "Content-Length: " . strlen( $query ) . "\n\n" . $query; unset( $login ); //Remove $login to prevent modules from grabbing the password. $a = socket_create( AF_INET, SOCK_STREAM, getprotobyname( "tcp" ) ); @socket_connect( $a, "www.deviantart.com", 80 ); @socket_send( $a, $data, strlen( $data ), 0x0 ); $response = @socket_read( $a, 8192 ); if ( socket_last_error( $a ) ) { internalMessage( "WARNING Can't open socket for login. Check your internet connection." ); die; } @socket_clear_error( $a ); @socket_close( $a );

if( !empty( $response ) ) { $full1=explode("Set-Cookie: ",$response); $full1=explode(";",$full1[1]); $fullcookie=$full1[0].';'; $response = urldecode( $response );

if( stristr( $response, "Set-Cookie: " ) && stristr( $response, "authtoken" ) ) { $bits = explode( "userinfo=", $response ); $cookie = substr( $bits[1], 0, strpos( $bits[1], "; expir" ) ); $cookie = unserialize( $cookie ); if( !empty( $cookie['authtoken'] ) ){ internalMessage( "Authtoken: " . $cookie['authtoken'] ); //Need a authtoken event $event = "authtoken"; include f( "system/callables/event.php" ); $this->spoof($fullcookie); return $cookie['authtoken']; } else { internalMessage( "Oops, couldn't get the authtoken. You may need to find it yourself." ); $event = "authtoken-fail"; include f( "system/callables/event.php" ); return FALSE; } } else { internalMessage( "Oops, couldn't get the authtoken. You may need to find it yourself." ); $event = "authtoken-fail"; include f( "system/callables/event.php" ); return FALSE; } } else { internalMessage( "Oops, couldn't get the authtoken. You may need to find it yourself." ); $event = "authtoken-fail"; include f( "system/callables/event.php" ); return FALSE; } }

function spoof($fullcookie){ #echo "COOKIE: $fullcookie \n"; $data = "GET /chat/Botdom HTTP/1.1\n" . "Host: chat.deviantart.com\n" . "User-Agent: ".BotUserAgent." \n" . "Referer: http://chat.deviantart.com/" . "Accept: text/html\n" . "Cookie: " . trim($fullcookie) . "\n\n"; $a = socket_create(AF_INET, SOCK_STREAM, getprotobyname("tcp")); socket_connect($a, "chat.deviantart.com", 80); socket_send($a, $data, strlen($data), 0x0); $response = socket_read($a, 8192); #echo ">HTTP\n" . $response . "\n"; // This is only for debugging; We don't really want to use the response for anything socket_close($a); } </php>

Things that are not bugs

Before reporting bugs check that you are using the command properly.

  • "Fatal error: Call to undefined function socket_create() in C:\Documents and Settings\Daverto\Desktop\Dante_0.8_01142007\main.php on line 98"
    • This is caused by a improper setup of php. This is not a bug.
    • Check the bot's php setup instructions in the manual.
    • In Dante 0.9 this error should be caught before the bot starts up.
  • Most situations of the bot getting disconnected.
    • Check with The-Bot-Team before reporting.
  • No Trivia, or other feature.
    • Not a bug. Add that to suggestions.
  • Does not parse or something it does not send the variables to the file. So it wont work properly when called. for example
 $Timer->register(time,DATA TO SEND does not parse onto the file called,filegoes here,CODE possible still does not parse variables into the file even if i put them here);

Coaster3000 17:02, 26 January 2010 (PST)--

I forgot to document that $data should be available in the included file or evaluated code as the variable $data. The documentation clearly states that you can either provide a file name to be included or code to be execute through eval. You can't use both methods at the same time. If there is a bug I don't have a way to test it. I stopped working on this program years ago.
If this is the case then i did not use it properly if your saying the way to retrieve data is $data then i did it wrong and its not a bug. Thankyou Coaster3000 10:59, 27 January 2010 (PST)

Things that are bugs

Core Issues (Critical)

  • Removing the google search module prevents commands from working
    • Caused by a continue statement in the regex command parser.
      • Fixed in Dante 0.10 (SVN/Trunk)

Core Issues (Non-Critical)

  • Bot messages are not consistent.

Module Issues

  • Idler
    • Due to the rebuilt core of Dante 0.9 the params function no longer exists.
    • Idler Fix
      • This is to fix the idler command in the games module. Just copy the php file in the zip to the system folder inside the bot's folder. This restores the params function to the bot.
  • google on linux
    • Nusoap library prevents bot from loading. Need alternative library or method.
      • Resolved in Dante 0.10 (SVN/trunk, revision 13) Nol888(Talk) 15:27, 20 January 2008 (PST)


Possible Bugs

my code made a fatal error in well not sure what but here is the error message

 PHP Fatal error:  Call to a member function isIgnored() on a non-object in C:\Documents and Settings\Chris\Desktop\Dante 0.10\system\callables\event.php on line 37

but i believe its nothing to do with my code it just happened by itself somehow.My code could not have done that :) it has no ignore function in it at all its just messaging and stuff. Coaster3000 13:34, 1 February 2010 (PST)

You're on your own for this one. Development stopped 3 years ago. :) --SubjectX52873M 13:48, 1 February 2010 (PST)
damnit. Ill try debugging and if i fix this bug my i give you a unofficial fix to the files :D coaster3000 13:50, 1 February 2010 (PST)
NOTE its not a bug it turns out my code messed up system somehow i changed one of my variable names and its fixed :) NOTE TO ALL never use $user for a variable when making modules :P coaster3000 14:01, 1 February 2010 (PST)
It's been years, but iirc that's a Dante function. You probably mistyped a class-variable-name, otherwise I'd have to say you aren't proficient enough with PHP to be modifying it in the first place.. --Kyogo 16:28, 1 February 2010 (PST)

General Discussion

eh, i think we should put the bit about SubjectX etc being banned back in the title. After all, that *is* the reason and there's no reason to hide that. Infinity0 06:46, 26 September 2007 (PDT)

Development has been permanently halted. I have not worked on the bot since being banned and I would not be able to modify the bot without alot of work. I've decided to write a new bot in python which will appear in a few weeks if nothing happens to me. --SubjectX52873M 12:34, 6 January 2008 (PST)

Okay, something has happened. I don't have time for new bots. I will be fixing up Dante for a bug fix. I hope to release Dante 1.0 within a month after getting the bugs out. --SubjectX52873M 13:08, 18 January 2008 (PST)


Development of Dante has not been transfered to any new people. Only Nol888 and myself have access to the development repository on epochwolf.com. The respository is on my server and is freely maintained by myself for the community. New bots using Dante's source are welcome but anyone wishing to develop on the Dante project should contact me. I have not transfered the rights of the project. (I am still the project owner and Nol888 is a developer on the project) Anyone wanting to work on Dante will need access to my repository. I can be reached at SubjectX52873M@gmail.com. --SubjectX52873M 09:18, 11 August 2008 (PDT)

The repository no longer exists. --SubjectX52873M 16:17, 26 January 2010 (PST)

Well, as far as i know Subject is the sole programmer of Dante. So in my opinion it should stay they way it was unless otherwise stated by him, considering he's the one who made it... --Kyogo 20:51, 12 August 2008 (PDT)

Psst. I've contacted Subject by email, and he has formally told me that the only developers currently of dante are himself and nol888 --Miksago 00:19, 13 August 2008 (PDT)
Try reading the previous comments before posting your own. --SubjectX52873M 05:57, 13 August 2008 (PDT)


I had a question for a while what exactly does SVN stand for? Coaster3000 17:32, 26 January 2010 (PST)--

http://en.wikipedia.org/wiki/Subversion_(software) --SubjectX52873M 17:36, 26 January 2010 (PST)