User Control Panel
Advertisements

HELP US, HELP YOU!

AlphaCGI

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Promote A Bot or Site
View unanswered posts
Author Message
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Sun Sep 18, 2005 9:44 pm    Post subject: AlphaCGI Reply with quote

Yet another of my projects: AlphaCGI.

It's for running a Chatbot::Alpha bot in a CGI sense (not a bot that signs onto messengers, but one you can chat with online via HTTP). So for example if your site needs a "Live Help" dealy, you can write an Alpha reply set for handling your customer's common questions and such.

The example(s):
Quote:
AlphaCGI Testing (AlphaEliza replies)
http://www.aichaos.com/AlphaCGI/
this is also the reply set that comes in the zip

Casey Rive
http://www.aichaos.com/bots/casey/


And from the readme.txt included:
Code:
AlphaCGI - Yet Another Project Of AiChaos Inc
(C) 2005 Cerone Kirsle

===================
SETTING UP ALPHACGI
===================

I'll skip over the part about uploading and chmodding on your web server
as I assume you know how to do that already.

Edit config.pl to do the basic configuration on your bot.

Your "replies" folder contains your Alpha responses. All these must be of
a .CBA extension.

tmpchat.html is the template for your chat page. The standards that must
be followed for the script to function correctly:

   1. <FORM> Data:
      Name = whatever you want
      Action = chat.cgi
      Method = either GET or POST, preferrably POST.

   2. SendMessage Form Fields:
      action (hidden) = chat
      user   (hidden) = {user}
      msg    (text)   = "" (blank)
      submit button

   3. Exchange Template
      Mark a piece of code with {exchange} and {/exchange} surrounding
      them (note these tags must be on the line all by themselves). The
      code between these two tags will be copied for each interaction in
      the user's history.

      Example:
         {exchange}
         <b><font color="#FF0000">{user}:</font></b> {msg}<br>
         <b><font color="#0000FF">{bot}:</font></b> {reply}<br>
         {/exchange}

   4. Special Tags
      Bracketed tags can be used to insert special variables. The list
      of tags are:

      {user}  = user's username (IP Address)
      {bot}   = bot's name (edited in config.pl)
      {msg}   = user's message
      {reply} = bot's reply
      {exchange}...{/exchange} = history template

============
HOW IT WORKS
============

AlphaCGI uses Chatbot::Alpha 1.70 to load your Alpha files and chat. To keep conversations
going (i.e. use of topics and such), sessions are used.

When a new user connects, a session is made. These sessions include a Chatbot::Alpha object
and a little info about the user (i.e. their conversation history). Data::Dumper writes the
session hashref to a file, and this hashref is loaded on later requests to keep a conversation
going. Sessions time out after 15 minutes of inactivity.

Sessions are created named after the user's first IP address. Even if their IP changes over
the course of the conversation, their session is still based on their first IP (so dynamic IP
addresses should have no problem accessing your CGI bot).

=======
CAVEATS
=======

Saving of user variables (i.e. name, age, etc) or retrieving of bot variables isn't built-in.
You could use the #CODE commands in Alpha to modify variables in their session, or add bot
variables to config.pl and access them from #CODEs but not much else can be done. However the
Leviathan style tag setting has minor support for:
   {>name} inserts "Internet User"
   {^name} inserts bot's name.
   Any other variable inserts "undefined"

========
SEE ALSO
========

Chatbot::Alpha from KIRSLE - http://search.cpan.org/~kirsle/
Chatbot::Alpha 1.70 - http://search.cpan.org/~kirsle/Chatbot-Alpha-1.70/lib/Chatbot/Alpha.pm


Download:
http://www.aichaos.com/download/aichaos/tech/AlphaCGI.zip

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
mattaustin
Sentinel
Sentinel


Joined: 19 Jul 2004
Posts: 556
Location: Los Angeles, CA
Reputation: 50.7
votes: 1

PostPosted: Sun Sep 18, 2005 11:55 pm    Post subject: Reply with quote

nice app and idea but it does open up a few XSS exploites to your site.

this means you would be able to get other peoples cookies which can be used to bypass most login systems. (includeing most forums, e-mail even cpanel)

this should be fixed by filtering the msg varrible

POC:
---------------------------------------------------
http://domain.com/chat.cgi?action=chat&user=%7Buser%7D&msg=<script>alert()</script>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Promote A Bot or Site All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group