SphtBot - version 3.01 build 540About
Installation and notes
Creating a profile
Battle.net Product SetupDownload and extract Storm.dll to your SphtBot installation directory. Depending on which product(s) you want to log on as, the following files will need to be copied into the appropriate directories (you may setup SphtBot to work with multiple products):
Known issues
Commands which can be entered using the user-input box/botnetinfo <botnet user> *** Displays information about a BotNet user/bnd [<msg>] *** Sends a message to everyone on the BotNet who is in your database. If <msg> is omitted, enables chat lock for BotNet /bnc [<msg>] *** Sends a message to everyone on the BotNet (must be ADMIN). If <msg> is omitted, enables chat lock for BotNet /med <msg> *** Emotes a message to the BotNet database /meb <msg> *** Emotes a message to the entire BotNet (must be ADMIN) /bnw <botnet user> <msg> *** Sends a message to a bot (must be on a database for user to receive message) /mew <botnet user> <msg> *** Emotes a message to a bot (must be on a database for user to receive message) /botnet <source> <cmd> *** Sends a command to all bots on current database /broadcast <source> <cmd> *** Sends a command to all bots (must be ADMIN to send outside of database) /botnetmessage <source> <botnet user> <cmd> *** Sends a command to a bot (must be ADMIN to send outside of database) /setuser <usermask> [operation]<flags> *** Modifies a database entry, removes a database entry, or creates a database entry /deluser <usermask> *** Deletes a database entry /find <usermask> *** Finds and lists all flags which apply to a username/mask, and the entries which contribute them /findex <user> *** Finds and lists flags which specifically apply to the specified username alone /findname <usermask> *** Finds and lists all names which match the specified usermask /findin <user> *** Finds and lists all usermasks that match the specified username while excluding the specific username /findattr <flags> *** Lists all entries with the specified attributes /countattr <flags> *** Returns number of entries with the specified attributes /expattr <usermask> <flags> *** Finds and lists masks which apply to username to show specifically why username has specified flags /setchatlock <bnd|bnc|battlenet|#channel> *** Sets where text is sent to by default /setbnwlock <none|botnet user> *** Sets BotNet whisper lock /bnr <msg> *** Whispers the user that last whispered you over BotNet /bnrw <msg> *** Whispers the user that you last messaged over BotNet /chatdropoptions *** Displays the current BotNet chat drop options /setchatdropoptions <0|1|2> <0|1|2> <0|1|2> <0|1> *** Sets BotNet chat drop options. See BotNet protocol specification for more information /botnetusers *** Displays the number of users connected to BotNet /databaseusers *** Displays the number of users in the database /reconnect *** Reconnects to Battle.net /forceconnect *** Forces a connect to Battle.net (bypasses any holds the bot has put on connecting) /bnreconnect *** Reconnects to BotNet /bnforceconnect *** Forces a connect to BotNet (bypasses any holds the bot has put on connecting) /clearqueue *** Clears the chat queue /clearscreen *** Clears the chat window /battlenet [<msg>] *** Sends a message to Battle.net. If <msg> is omitted, enables chat lock for Battle.net /fjoin *** Forces a channel join, ignoring any full / empty / restricted warnings /rejoin [<channel>] *** Rejoins the current channel. Can be used to quickly adjust caps if rejoining an empty channel /setwlock <user> *** Sets Battle.net whisperlock /r <msg> *** Whispers the user that last whispered you /rw <msg> *** Whispers the user that you last messaged /profile <user> *** Displays a user's profile /sysrecorddata <user> *** Queries system data on an account /recorddata <user> *** Queries record data on an account /ladderrecorddata <user> <product> *** Queries ladder record data on an account /rawquery <user> <path> *** Queries a database entry on an account /setvalue <user> <path>:<value> *** Sets a database entry on an account (must be ADMIN to write other accounts, or to write to non profile\ of your own account) /ladderdata <type> <league> <sort> <starting rank> <count> *** Works for STAR/SEXP/W2BN/JSTR, can be used from ANY product. An invalid sort method will result in you being disconnected, but NOT ipbanned. /laddersearch <username> <type> <league> <sort> *** Works for STAR/SEXP/W2BN/JSTR, can be used from ANY product. An invalid sort method will result in you being disconnected, but NOT ipbanned. /downloadfile <ip>:<port> <filename> *** Downloads a file from Battle.net /canceldownload *** Cancels a file download /forcecanceldownload *** Forcefully cancels a file download /downloadprogress *** Displays the progress of a file download /uptime *** Displays various uptime statistics /status *** Displays various system statistics /version *** Displays the bot version /networkstatus <battlenet|bnls|botnet|all> *** Displays various connection statistics /listplugins *** Displays the loaded plugins /loadplugin <filename> *** Loads a plugin /unloadplugin <filename> *** Unloads a plugin /reload *** Reloads configuration settings /fbnr *** Queries information on the user that last whispered you over BotNet /fbnrw *** Queries information on the user that you last messaged over BotNet /fr *** Queries information on the user that last whispered you /frw *** Queries information on the user that you last messaged /refreshicons *** Reloads the icon files /claninfo <user> *** Displays various information about a user's clan statistics /ping <user> *** Displays a user's ping /listgames /gameinfo <title> /gameinfop <title>{ctrl+tab}<password> /news /queryrealms *** Lists available realms /mcplistgames *** Realm only /mcpgameinfo <title> *** Realm only /mcpmakegame <title> *** Realm only /mcpjoingame <title> *** Realm only /mcpleavegame *** Realm only /mcpmotd *** Realm only /mcpladderdata <type> <position> *** Realm only /mcpladdersearch <username> <hardcore> <expansion> *** Realm only /debug /realmlogon <realm> *** Logs onto realm /createchar <charactername> *** Creates a character /logonchar <charactername> *** Logs on a character /deletechar <charactername> /listchars *** Can be used even after logging on as a character /realmreconnect /setstatstring <statstring> *** Updates your statstring in the channel /copystatstring <user> *** Copies a user's statstring /resetstatstring /statchat <message> *** Sends a statchat message (Diablo only) /poke <user> /ktbpa *** Sends "#ktbpa" to Battle.net (Keep the Battle.net pride alive!) /hex <message> /des *** Sends 3DES encrypted chat /rsa *** Sends RSA encrypted chat /settarget <user> (user to encrypt rsa to, and for sending deskeys) /listkeys *** Lists 3DES keys /key *** Displays active 3DES key /randomize <type stuff for randomizing deskey> /sendkey <keyname or wildcard mask> /makekey <keyname> (use randomize first) /delkey <keyname or wildcard mask> /setkey <keyname or wildcard mask, new active deskey> /dmencrypt <message> *** Sends DMEncrypt-compatible text scrambling /reverse <message> *** Sends "coolio" reverse /rot13 <message> *** Sends ROT13-compatible text scrambling /rot47 <message> *** Sends ROT47-compatible text scrambling /showundecoded *** Toggles option to show undecoded text for text scrambling ciphers /channels *** Lists available product-specific channels /randsha1 *** Generates a random pre-hashed X-SHA1 password /irc *** Sends a IRC command /irclist *** Enables/disables the visual IRC channel list /ircusers <#channel> /ircboot <#channel> <user> [<message>] /ircw <target> <message> /irctrout <#channel> <target> /ircnotify <on|off> *** Toggles IRC enter/leave notifications /ircping <target> /ircctcp <target> <request> /ircsetfinger /ircignoremask /ircr *** Whispers the user that last whispered you. /ircrw *** Whispers the user that you last messaged. /fircr *** Queries information on the IRC user that last whispered you /fircrw *** Queries information on the IRC user that you last messaged /#[<channel>] *** Sends message to IRC channel. Omit <channel> and use /# to send message to last channel. Special thanksSkywing, for his expert advice and leadership. For development of the Battle.net Logon Server, BotNet server, BinaryChat plugin API, WebChannel ISAPI, and many more innovations and standards. Furthermore, as is quite obvious from the start, I've used many of the conventions set in place by BinaryChat when developing SphtBot.Yoni, for co-development of the Battle.net Logon Server. Kp, for co-development of the BotNet server. Adron, without him this bot would not have been possible. His revolutionary NBBot paved the way for Battle.net bots and got me interested in programming for Battle.net in the first place. Chewbacca, for truly setting the standard for Battle.net bots. Chewbacca's bot went far beyond any other Battle.net bot of the time. DarkMinion, for introducing me to Clan [vL] and supporting my membership. Soulburner, his DamnBot proved to be a great inspiration to me. The members of Valhalla Legends and all the wonderful people who beta tested the bot despite poor documentation and precious little tech support. oper.dll
TriviaBot.dll
Plugin Developer ReferenceSphtBot supports the powerful BinaryChat plugin API that allows end-users to customize the program to a great degree. Allowing the user to transfer control to an external dll allows complete near customization of the bot for specialized purposes. Users are encouraged to develop their own plugin dlls for SphtBot. Following is the information required to use this plugin API in C/C++.Managing plugins: To load a plugin, use the /loadplugin <Plugin path> command. The /unloadplugin <Plugin path> command unloads a plugin from memory, and the /listplugins command displays all active plugins. SphtBot will automatically load all plugins in its directory on startup. Plugin format: BinaryChat plugins are regular Win32 DLL files with the .bcp extension. All BinaryChat plugins must export the function SetInterfaceInformation. This function receives a pointer to a PluginInformation structure. You should determine which PluginInformation version you are using through the dwSize member. Your plugin should take note of the addresses of various BinaryChat-supplied API functions for future reference. In addition, if you wish to install one of the provided hooks, you should set the corresponding function pointer (and, optionally, the 32-bit parameter associated with it) in the structure to the address of your hook function. By default, all of the hook functions are set to NULL, which indicates to BinaryChat that no plugin hook is present. Plugin header definitions: struct PluginInformation; struct StateInformation; // User functions typedef BOOL (WINAPI * SetInterfaceInformationProc)(PluginInformation * lpInterfaceInfo); typedef BOOL (WINAPI * MessageHookProc)(DWORD dwConnectionId, BYTE MessageId, LPCVOID lpMessageData, DWORD nMessageSize, LPARAM lParam); typedef BOOL (WINAPI * EnumChannelProc)(LPCSTR lpszUniqueName, LPCSTR lpszStatstring, DWORD dwFlags, DWORD dwPing, BOOL bInvisible, DWORD dwAccountNumber, DWORD dwRegAuthority, LPARAM lParam); typedef BOOL (WINAPI * ConnectionHookProc)(DWORD dwConnectionId, DWORD dwEventCode, DWORDLONG qwPlatformId, LPARAM lParam); typedef DWORD (WINAPI * PluginTimerProc)(DWORD dwTimeDelay, LPARAM lParam); typedef BOOL (WINAPI * CommandHookProc)(LPCSTR lpszMessage, LPCSTR lpszSendingUser, BOOL bFromTelnet, LPARAM lParam); typedef BOOL (WINAPI * EventHookProc)(LPARAM lParam); // APIs typedef BOOL (WINAPI * ClearMessageProc)(BYTE MessageId); typedef BOOL (WINAPI * IsMessageSetProc)(BYTE MessageId); typedef BOOL (WINAPI * SetMessageProc)(BYTE MessageId); typedef BOOL (WINAPI * QueueMessageProc)(BYTE MessageId, LPCVOID lpMessageData, DWORD nMessageSize); typedef BOOL (WINAPI * QueueChatMessageProc)(LPSTR lpszChatMessage, BOOL bFixD2Command); typedef BOOL (WINAPI * QueryStateInformationProc)(StateInformation * lpStateInfo); typedef BOOL (WINAPI * QueryChannelInformationProc)(EnumChannelProc lpCallback, LPARAM lParam); typedef BOOL (WINAPI * CloseConnectionProc)(DWORD dwConnectionId); typedef BOOL (WINAPI * SendConnectionMessageProc)(DWORD dwConnectionId, BYTE MessageId, LPCVOID lpMessageData, DWORD nMessageSize); typedef BOOL (WINAPI * SetOutputColorProc)(BYTE ColorId); typedef BOOL (WINAPI * WriteOutputTimestampProc)(void); typedef BOOL (WINAPI * WriteOutputStringProc)(LPCSTR lpszString); typedef BOOL (WINAPI * ProcessBotCommandProc)(LPCSTR lpszCommand); typedef LPCSTR (WINAPI * GetRegistryPathProc)(void); typedef BOOL (WINAPI * ResetAwayIdleProc)(void); typedef HWND (WINAPI * GetWindowProc)(DWORD dwWindowId); typedef BOOL (WINAPI * IsServiceProc)(void); typedef HMENU (WINAPI * GetMenuProc)(DWORD dwMenuId); struct PluginInformation { DWORD dwSize; ClearMessageProc PNetClearMessage; IsMessageSetProc PNetIsMessageSet; SetMessageProc PNetSetMessage; QueueMessageProc PNetQueueMessage; QueueChatMessageProc PNetQueueChatMessage; QueryStateInformationProc PSysQueryStateInformation; QueryChannelInformationProc PSysQueryChannelInformation; CloseConnectionProc PNetCloseConnection; SendConnectionMessageProc PNetSendConnectionMessage; SetOutputColorProc PUISetColor; WriteOutputTimestampProc PUIWriteTimestamp; WriteOutputStringProc PUIWriteString; HINSTANCE hBotNetClient; #ifdef _PLUGIN_SUPPORTS_BOTNET BotNetConnectionState * lpBotNetConnection; #else void * lpBotNetConnection; #endif MessageHookProc MessageHook; // non-const LPARAM MessageHookParam; // non-const ConnectionHookProc ConnectionHook; // non-const LPARAM ConnectionHookParam; // non-const PluginTimerProc PluginTimer; // non-const LPARAM PluginTimerParam; // non-const CommandHookProc CommandHook; // non-const LPARAM CommandHookParam; // non-const HINSTANCE hPlugin; EventHookProc EventHook; // non-const LPARAM EventHookParam; // non-const HANDLE hPluginEvent; }; struct PluginInformation2 : public PluginInformation { ProcessBotCommandProc PSysProcessBotCommand; }; struct PluginInformation3 : public PluginInformation2 { GetRegistryPathProc PRegGetRegistryPath; ResetAwayIdleProc PNetResetAwayIdle; GetWindowProc PUIGetWindow; IsServiceProc PSysIsService; GetMenuProc PUIGetMenu; }; struct PluginInformation4 : public PluginInformation3 { IsUserFilteredProc PFltIsUserFiltered; IsMessageFilteredProc PFltIsMessageFiltered; EnumUserFiltersProc PFltEnumUserFilters; EnumMessageFiltersProc PFltEnumMessageFilters; AddUserFilterProc PFltAddUserFilter; AddMessageFilterProc PFltAddMessageFilter; RemoveUserFilterProc PFltRemoveUserFilter; RemoveMessageFilterProc PFltRemoveMessageFilter; NotifyMsgProc PUINotifyMsg; EnumLoadedPluginsProc PSysEnumLoadedPlugins; }; There is plenty more to discover... Have fun! - Spht[vL] |