• No results found

2.3 The web interface

3.1.4 Eggdrops’ extra scripts

A copy of these scripts can be found in the appendix A of this document.

x.tcl: This script has been developed by Alexander Maassen aka Outsider from another

bot lending project on Undernet (Key2peace / http://www.key2peace.org/) for the Loufiz

project.

It ensures a good integration of each bot with the Cservice bot (named X) by allowing our

eggdrops to authenticate to X, and perform several operations their access level allows

(remove a ban set on a bot, request operator status and make X invite the bot in the desired

channel). Special care has also been taken to ensure each bot will not flood X with multiple

requests.

reop_bot.tcl: This script has also been developed by Alexander Maassen aka Outsider for

the Loufiz project, to allow each bot to give back the operator status to another bot of the

botnet.

identhost.tcl: This script has also been developed by Alexander Maassen aka Outsider

for the Loufiz project. When triggered using a defined channel message, it sends via notice

the ident@host of the user who triggered it.

Its purpose is to help users who have no clue of what their ident@host is, to fill up the

identifier creation web form.

loufiz_newapp.tcl: This script has been developed by Craig Shue aka Shoey (IRC

operator on Undernet) from another bot lending project on Undernet (Acetone /

http://www.acetone.org/), for the Loufiz project; in order to take a snapshot of each channel

requesting eggdrops.

It makes the hub bot join the requesting channel and discovers how many users are

present, making a difference between “real” users and clones (several connections made

from a single IP), and find out how many users are operator of this channel.

The result is then sent to the project administrators on IRC, and displayed in the hub

bot’s telnet administration interface (also called “the partyline”). The command and the

associated result are sent and retrieved by using the scheduled updates from database to

the botnet.

bnusers: In order to dispatch instructions from the hub to the leaf bots, a script (which can

be downloaded from eggdrop related websites) called bnusers is loaded in each bot. This

script is declined in 2 flavors: a master script (bnusers_master.tcl) loaded in the hub; and a

slave script (bnusers_slave.tcl) loaded in each leaf.

greetd.tcl: This script sends a greeting via notice to all users joining the channel. It is

used, in addition of the channel’s topic, to give them the website address. It can be

downloaded from eggdrop related websites.

Guillaume Tournand <[email protected]>

September 2003

44/489

3.2 The database

The chosen database is MySQL (http://www.mysql.com/), which has the advantage of

being widely spread and well integrated with / by other free software.

The MySQL version used is 3.23.36.

In order to ease the administration of the database, phpMyAdmin

(http://www.phpmyadmin.net/ - a web suite for database management) has been installed.

The listing of the tables and their syntax does not represent a big interest. They have

been created according to the design, and their SQL code can be found in the appendix B of

this document.

3.3 The web interface

The website uses CSS (Cascade Style Sheets), which are files located in a custom

folder (defining the font, background …); defining a global new look for the website display is

doable by these files modification.

The dynamic content is displayed by the web interface by using the PHP language

(Hypertext Preprocessor http://www.php.net/). Its benefits of a good interoperability with

databases (like MySQL) and an easy integration with the Apache web server

(http://www.apache.org/).

The PHP version used is 4.2.1.

The language set by default for the website is defined by the language of the web

browser: if the language of the browser is French the language will be set as French, English

otherwise.

Swapping language is done very conveniently by clicking on the desired language flag

(see picture below). The displayed page will refresh with the new selected language. This

click sets a new value to the language variable in the PHP session, and refreshes the page.

Because every page includes the text to display from a shared folder (the name of the

folder corresponds to the language variable), changing the current language does not send

the visitor back to the home page of the website.

Figure 3.3: The language swap

Each web form is displayed by a PHP page and its validation sends all input to the

associated PHP page, which checks, process the input, and displays the result as seen in

the design section.

The check section of the pages ensures that all mandatory fields of the form have been

filled up, that no “illegal” characters have been written (for example a channel name can not

contain any space), that the user performing the operation has enough access to perform

this operation, and that no other concurrent entry already exist in the database (for example

Guillaume Tournand <[email protected]>

September 2003

46/489

Related documents