Eggdrop

De Linuxmemo.

IRC bot
http://www.eggheads.org/
http://www.eggheads.org/support/egghtml/1.6.20/

Voir: Irc, irssi

Sommaire

[modifier] Installation

  • démarrage automatique via crontab de l'utilisateur
crontab -e
0,10,20,30,40,50 * * * * /home/pi/botchk >/dev/null 2>&1

[modifier] Configuration

  1. Edit your config file completely.
  2. Start the bot with the "-m" option to create a user file, i.e. './eggdrop -m LamestBot.conf'.
  3. When starting the bot in the future, drop the "-m". If you have edited your config file correctly, you can type:
chmod u+x <my-config-file-name>
  1. lui donner le status owner
/msg <botnick> hello. This will make you the bot's owner
  1. modifier le mot de passe du bot
/msg <bot> PASS <new password>

[modifier] botchk cron file

cd /usr/share/eggdrop/scripts
chmod 700 autobotchk
./autobotchk <config> -dir /home/botdir -noemail

[modifier] Commandes

[modifier] Console commandes

http://www.egghelp.org/commands/index.htm

http://www.egghelp.org/commands/irc.htm

/dcc chat nick_bot

Afficher les utilisateurs et le status dans le channel

.channel [channel-name]

Donner le status op a nickname

.op <nickname> [channel]
  • Utilisateurs du bot :
.who : Liste les utilisateurs de la Party-line.
.whom : Liste les utilisateurs de la Party-line.
.echo off/on : Eviter les retours de message dans la Party-line.
.me : Agit sur la Party-line.
.nick <pseudo> : Changer votre pseudo dans la Party-line.
.newpass <mot-de-passe> : Changer votre mot de passe d'accès.
.botinfo : Informations sur le bot.
.bottree : Arbre représentant les bots connectés au botnet.
  • Opérateur du bot :
.op <pseudo> <#salon> : Ajoute un opérateur sur un salon.
.deop <pseudo> <#salon> : Supprime un opérateur sur un salon.
.kickban <pseudo> <message> : Bannir un utilisateur pour 2 heures (par défaut).
.kick <pseudo> <#salon> <message> : Kick un utilisateur d'un salon.
.+ban <pseudo> <#salon> <message> : Ban de façon permanente.
.+ban <host> : Ban tout les utilisateur avec l'host spécifiée.
.resetbans <#salon> : Supprimer les bans non-permanent d'un salon.
.-ban <host> : Supprimer les bans d'une host spécifique.
.+ignore <host> : Ignorer tout les utilisateurs avec cette host.
.-ignore <host> : Supprimer l'ignore d'une host.
.bans <#salon> all : Afficher les bans permanents.
.say <message> : Faire parler le bot.
.act <message> : Faire agir le bot.
.msg <pseudo> : Envoyer un query par le bot.
.topic <message> : Changer le topic.
.invite <pseudo> <#salon> : Inviter quelqu'un sur un salon.
.servers : Liste des serveurs utilisés par le bot.
.channel <#salon> : Liste des utilisateurs d'un salon.
.console <#salon> <modes> : Changer le mode d'un salon.
.match <pseudo> : Informations sur un utilisateur.
.whois <pseudo> : Informations sur un utilisateur.
  • Maître du bot :
.chaninfo <#salon> : Afficher la configuration d'un salon
.save : Sauvegarder le fichier utilisateur du bot.
.reload : Recharger le fichier utilisateur du bot.
.rehash : Rehasher le bot.
.restart : Redémarrer le bot.
.adduser <pseudo> : Ajouter un utilisateur présent.
.deluser <pseudo> : Supprimer un utilisateur present.
.+user <pseudo> <host> : Ajouter un utilisateur et son host.
.-user <pseudo> : Supprimer un utilisateur.
.+host <pseudo> <host> : Ajouter une host à un pseudo existant.
.-host <pseudo> : Supprimer une host d'un pseudo.
.+bot <pseudo> <host> : Ajouter un bot et son host.
.-bot <pseudo> <host> : Supprimer un bot et son host.
.chattr <pseudo> +<flag> : Ajouter un flag à un utilisateur.
.chattr <pseudo> -<flag> : Supprimer un flag à un utilisateur.
.chpass <pseudo> <nouveau-pass> : Changer le mot de passe d'un utilisateur.
.chnick <ancien-pseudo> <nouveau-pseudo> : Changer le pseudo d'un utilisateur.
.chinfo <pseudo> <message> : Changer le message d'accueil.
.jump <serveur> : Changer le bot de serveur.
.status : Statut de l'eggdrop.
  • Propriétaire du bot :
.+chan <#salon> : Joindre un salon.
.-chan <#salon> : Quitter un salon.
.chansave : Sauvegarder la configuration des salons.
.chanload <#salon> : Recharger la configuration d'un salon.
.chanset <variable> : Modifier une variable d'un salon.
.set <variable> <valeur> : Modifier une variable de configuration.
.loadmodule : Charger un module.
.unloadmode : Décharger un module.
.die <message> : Arreter le bot.

[modifier] /msg Commandes

  • Eggdrop Message / Query Commands
All users: ADDHOST HELP IDENT INFO PASS VOICE WHO WHOIS
Channel/global ops: OP INVITE GO KEY
Global masters:DIE JUMP MEMORY SAVE REHASH RESET
Channel masters: STATUS


ADDHOST :-

/MSG YourBot ADDHOST

Allows the bot to recognise you from a new hostmask. The new hostmask can not match any hostmask from an existing user.

HELP :- Displays a list of message commands available for you to use.

IDENT :-

/MSG YourBot IDENT [handle]

This allows the bot to recognise you from a new address/hostmask that you are currently using. Handle needs to be specified if you are using a different nick to your handle when entering this command.

INFO :-

/MSG YourBot INFO [channel] [info line]

This will set a global info line or channel specific (if the channel is specified) info line when you join a channel. You can not of joined the channel in the past three (3) minutes for the info line to be displayed. This will also show up on a .who or .whois performed in the bots partyline (dcc chat session).

/MSG YourBot INFO [channel] NONE

This will erase your current info line.

PASS :-

/MSG YourBot PASS

This sets a password for your handle. You need a password to use most commands and/or chat with your eggdrop bot.

/MSG YourBot PASS

Allows you to change your password.

VOICE :-

/MSG YourBot VOICE [channel]

Voices you on any channel where I have ops and you don't have voice. If a channel name is specified, you will only be voiced on that channel.

WHO :-

/MSG YourBot WHO

This will show you a list of who is on the specified channel

WHOIS :-

/MSG YourBot WHOIS

Shows information about the specified handle.

OP :-

/MSG YourBot OP [channel]

Ops you on any channel where I have ops and you don't. If a channel name is specified, you will only be opped on that channel.

INVITE :-

/MSG YourBot INVITE

This will invite you to a channel (if the bot is on the specified channel).

GO :-

/MSG YourBot GO

This makes the bot leave (cycle) a channel if not currently opped.

KEY :-

/MSG YourBot KEY

This will send you the key for a channel that is +k and possibly also invite you to that channel if it is +i (if the bot is on the specified channel).

JUMP :-

/MSG YourBot JUMP [server [port [server password]]]

This will make the bot jump to a new server. You can optionally specify a server to jump to, in the form of 'new.server.com' or 'new.server.com 6667', etc.

MEMORY :-

/MSG YourBot MEMORY

This displays the bot's memory usage information.

SAVE :-

/MSG YourBot SAVE

This makes the bot save its userfile.

REHASH :-

/MSG YourBot REHASH

This makes the bot reload its config file.

RESET :-

/MSG YourBot RESET [channel]

This makes the bot reset its channel information, in case it becomes out of sync with reality. It isn't used much anymore.

STATUS :-

/MSG YourBot STATUS

This gives you a short display of the bots current status. The status command in the partyline gives more information.

[modifier] Botnet ensemble de robots IRC reliés entre eux

http://www.eggheads.org/support/egghtml/1.6.20/botnet.html

Pour nous seulement 2 eggdrop:

  • BotHub
  • BotShare
  1. Modifier le fichier de configuration de chaque eggdrop
    1. vérifier "my-ip"
    2. section "Botnet - DCC - Telnet" dé commenter la ligne "listen 3333 bots" ou 3333 est le numero de port communication entre les bot.
    3. activer l'option "+shared" sur le ou les canaux a partager: set global-chanset = +shared
    4. activer les modules "Transfer" et "Share": dé commenter "loadmod transfer" et loadmod share
  2. Se connecter sur BotHub puis déclarer son correspondant
    1. .+bot BotShare 192.168.0.30:3333
    2. .botattr BotShare +s (s pour shared)
    3. vérifications .channel
  3. Faire de meme sur BotShare
    1. .+bot BotHub 192.168.0.20:3333
    2. .botattr BotHub +hp (h pour hub et p pour pasive)
    3. .botattr BotHub |s #channel (This sets #channel as a share channel.)
    4. vérifications .channel
  4. Se reconnecter sur BotHub, faire le lien
    1. .link BotShare (ne faire qu'un seul lien)

[modifier] Scripts

"netbots.tcl" est une script TCL pour la gestion du botnet des eggdrops.

http://www.egghelp.org/netbots/index.htm

wget http://www.egghelp.org/files/netbots/netbots4.10.zip
mkdir netbots
unzip netbots4.10.zip -d netbots
cd netbots
vim netset.tcl
laisser "set nb_flag N"
modifier "set nb_key "changethis""
cd ..
vim eggdrop.conf
ajouter source "netbots/netbots.tcl"
kill -1 $(cat pid.bot)

[modifier] Astuces

  • Des MSGXXX ou XXX est le numéro de code apparaissent si les fichier de langue n'ont pas été misent en place.
  • Le répertoire "logs" doit être créer a la main car si non aucun log n'est produit.
  • auto-op pour username ".chattr username +a #channelname"
Outils personnels