Giter Site home page Giter Site logo

wraith / wraith Goto Github PK

View Code? Open in Web Editor NEW
76.0 9.0 23.0 11.16 MB

Wraith IRC Bot

Home Page: http://wraith.botpack.net

License: Other

Shell 2.39% Makefile 1.62% C 17.97% C++ 74.39% Perl 0.24% Batchfile 0.08% M4 3.17% mIRC Script 0.15%
c-plus-plus irc c bot eggdrop

wraith's Introduction

Wraith

Build Status

Wraith is an IRC channel management bot written purely in C/C++. It has been in development since late 2003. It is based on Eggdrop 1.6.12 but has since evolved into something much different at its core. TCL and loadable modules are currently not supported.

  • Wraith aims to be a secure and easy to setup and manage botnet.
  • A botnet can be setup in a matter of minutes and updated later with 1 command.
  • Leaf bots save no files locally, but rather store configuration encrypted in their own binary.
  • Hubs do not connect to IRC, and keep a local encrypted copy of the userfile.

All official sites, documentation, support venues, repositories and source urls are referenced here.

For official release announcements send an email to: [email protected]

Download: https://github.com/wraith/wraith/wiki/Download Git: git://github.com/wraith/wraith.git

See git for a list of Contributors: git shortlog -sen master

Support:

Please support wraith by signing up for a shell at http://www.xzibition.com (coupon 'wraith' for 30% off)

The botpack ghost inspired the early versions of wraith and a few cmds. einride ievil

The following botpacks gave inspiration, ideas, and some code: awptic by lordoptic optikz by ryguy and lordoptic celdrop by excelsior genocide by Crazi, Dor, psychoid, and Ace24 tfbot by warknite and loslinux

wraith's People

Contributors

bdrewery avatar dereckson avatar estella avatar fred0r avatar silv3rr avatar wfleurant avatar zacheryph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wraith's Issues

flood-chan-bytes bytes:sec

Add a flood-chan-bytes to count bytes per second. This combined with flood-chan should help with slow floods involving a lot of data.

OP via Chat-Bot through botnet

it would be great as i am using groups that i dont ned to put the chat-bots manually to some chans and so the op-request is carried through the botnet to a bot who is op on the specific channel

Limit issue during splits

[14:45] * prefix () Quit (hub.efnet.us hub.efnet.nl)
[14:45] * PhOBi` () Quit (hub.efnet.us hub.efnet.nl)
[14:45] * sub_zero_ () Quit (hub.efnet.us hub.efnet.nl)
[14:46] * iphone sets mode: +l 25
(people chatting)
[15:01] * iphone sets mode: +l 22
[15:04] * iphone sets mode: +l 25
[15:09] * hub.efnet.nl sets mode: +l 27
[15:09] * prefix () has joined #chan
[15:09] * PhOBi` () has joined #chan
[15:09] * sub_zero_ () has joined #chan
[15:09] * iphone sets mode: +l 25
[15:11] * iphone sets mode: +l 28

reported by @DucCh

Look for userlist file in ${HOME} instead of ./ (or both?)

I moved my bot/hub/etc to date based directories as I compile new ones. I noticed that the hub had no idea who any of the bots were and saw a binary file ~/.u

Maybe add an optional hub configuration line for userlist file locations with some defaults?

Dynamic roles

  1. Cleanup role code
    1. DRY code between src/botnet.c and src/mod/channels.mod/channels.c
  2. Define roles per groups (multiple groups in 1 chan are counted as 1 group)

Timezone

It would have been very nice to be able to set the timezone in .set :)

Provide an option to not repeatedly force crontab insertions

I'd like to avoid this:

Jul 26 11:09:01 server CRON[16064]: pam_unix(cron:session): session opened for user wraith by (uid=0)
Jul 26 11:09:01 server CRON[16064]: pam_unix(cron:session): session closed for user wraith
Jul 26 11:11:01 server CRON[16417]: pam_unix(cron:session): session opened for user wraith by (uid=0)
Jul 26 11:11:01 server CRON[16417]: pam_unix(cron:session): session closed for user wraith
Jul 26 11:14:01 server CRON[16999]: pam_unix(cron:session): session opened for user wraith by (uid=0)
Jul 26 11:14:01 server CRON[16999]: pam_unix(cron:session): session closed for user wraith
Jul 26 11:16:01 server CRON[17337]: pam_unix(cron:session): session opened for user wraith by (uid=0)
Jul 26 11:16:01 server CRON[17337]: pam_unix(cron:session): session closed for user wraith
Jul 26 11:19:01 server CRON[17910]: pam_unix(cron:session): session opened for user wraith by (uid=0)
Jul 26 11:19:01 server CRON[17910]: pam_unix(cron:session): session closed for user wraith
Jul 26 11:21:01 server CRON[18242]: pam_unix(cron:session): session opened for user wraith by (uid=0)
Jul 26 11:21:01 server CRON[18242]: pam_unix(cron:session): session closed for user wraith

Also, adding a cron entry is pretty trivial once you've gotten through the setup for the bot/hub.

Groups fixes

  1. If when removing groups via botset, the new groups matches the global setting, just clear it. This will avoid confusion due to the auto-adding of main
  2. Need a way to query a random bot in a group, such as botcmd ? %group command
  3. Reported that .+chan #chan groups group does not work as expected.
  4. status from hub shows channels as inactive when they are not.

FiSH stale keys

Timestamps

Auto re-key exchange if the stored key is stale. A user may have already been ACCEPTED a long time ago, but the bot, or the user, may no longer have a valid key.

Invalid keys

If a msg comes in with an invalid key, rekey.

New Auth support without cleartext pass

 -> auth?
 <- -Auth $rand
 -> +Auth2 encrypt($key = sha1($secpass + $rand + $auth-key), $cleartext = $userpass)

New set auth-compat (default 0) to allow using the old system.

Revenge

Bots should have minimal revenge support. They don't need to add users, but they should at least kick/deop abusers.

Member caching

Members should be cached for a short period to prevent cycling to get around flood/voice controls.

Build failure if TCL unable to be found

The generate_defs.sh script is not checking the HAVE_LIBTCL defs, and is trying to find them regardless. This results in errors.

Error: Unable to generate typedef for: Tcl_CreateCommand

botcmd formatting/logging

  1. botcmd should not log the command on the destination bot, to the same user who ran it. It should only show the output.
  2. botcmd should format the output according to HANDLEN like net* commands do.

Channel flood auto locking

Set +i if banlist is full

If the total of these lists exceeds the masklist from 005 (MAXLIST=beI:100), then set +i and notify the channel of the reason. Only the +f bot should do this.

Set +im during drone flood

Like nomassjoin, this should look for mass NICK, PRIVMSG, and NOTICE

Binary fails to run on OpenBSD, libssl undefined symbol errors

./wraith:/usr/lib/libssl.so.15.0: undefined symbol 'X509_EXTENSION_free'
./wraith:/usr/lib/libssl.so.15.0: undefined symbol 'X509_free'
./wraith:/usr/lib/libssl.so.15.0: undefined symbol 'OCSP_RESPID_free'
./wraith:/usr/lib/libssl.so.15.0: undefined symbol 'i2d_DHparams'
./wraith:/usr/lib/libssl.so.15.0: undefined symbol 'd2i_DHparams'
./wraith:/usr/lib/libssl.so.15.0: undefined symbol 'X509_NAME_free'

FiSH Key Exchange updates

set 'fish-auto-keyx'

Allow disabling auto key exchange

Paranoid mode

Add fish-key-paranoid which would invalidate the FiSH key after every message. This would then auto re-key-exchange. This fixes replay attack.

CBC won't work with how clients currently implement it, and even if they did, it would quickly become garbage due to IRC being asynchronous. See https://gist.github.com/1066319 for an example.

Getin limits

The new getin changes from #35 are making the limits get flooded when a bot needs to be invited.

uptime.mod

Copy uptime.mod from Eggdrop and optionally support.

.botmsg spacing and FiSH issues

  1. .botmsg with a nick as a target will FiSH the content if a key is found, but it will send plaintext to a #channel, even if a key is present.
  2. bunch of unneeded spaces in the LOG of botmsg, like below:
    [13:28:30] #ducch# botmsg wrt0 ducch test123
    (wrt0) Sent message to ducch

I couldn't fix these myself =(

Fish needs auto KEYX on decrypt error

in query

08:29:16 [bryan] auth? *
08:29:20 -!- FiSH: Sent my DH1080 public key to wraithtcl, waiting for reply ...
08:29:21 -!- FiSH: Key for wraithtcl successfully set!
08:29:22 [bryan] auth? *
08:29:25 [wraithtcl] auth. wtest2 *

on bot

 [14:29:16] (wtest2) [bryan!bryan@host] +OK O.czD.Jf8wN. 

+Voice changes

  • +voice should auto enforce +m
  • Just devoice clients that flood
    • Ensure that ops can re-voice these clients without the bots enforcing the devoice
  • Change the emode voice stuff to be configurable. Have it select Op or User and select which flag gets access to revoice/devoice enforcing.

Flood auto +i logic

Really no need to set +i during a flood from 1 user if no recent joins have occurred.

+g rejects .adduser's message

when using .adduser on someone who's in +g, he won't receive the message at all. any /accept or -g after the message was already blocked by the ircd won't help, because the message won't be sent again - not automatically and not on demand.
also, the bot will not let the issuer know that the target was in +g either.

Compile failure without TCL

[wraith@alteran wraith-v1.4.0]$ ./configure --prefix=/home/wraith
checking for g++47... no
checking for g++-4.7... no
checking for g++46... no
checking for g++-4.6... no
checking for g++45... no
checking for g++-4.5... no
checking for g++-4.4... no
checking for g++-4.4.1... no
checking for g++-4.4.2... no
checking for g++-4.4.0... no
checking for g++44... no
checking for g++4... no
checking for eg++... no
checking for g++-3.3... no
checking for g++33... no
checking for g++-3... no
checking for g++3... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking whether the compiler understands -Wall... yes
checking whether the compiler understands -pipe... yes
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /bin/sed
checking whether head -1 works... yes
checking for gawk... gawk
checking for basename... basename
checking for objcopy... objcopy --remove-section=.note --remove-section=.comment
checking for strip... strip
checking for gdiff... diff
checking for uname... uname
checking for ccache... no
checking for distcc... no
checking system type... Linux
checking system release... 2.6.32-220.13.1.el6.centos.plus.x86_64
checking system machine... x86_64
checking whether IPv6 is enabled... yes
checking for socklen_t... yes
checking for random limit... RAND_MAX
checking whether the compiler understands -static... yes
checking for socket in -lsocket... no
checking for dlopen in -ldl... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether stat file-mode macros are broken... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking std_arg.h usability... no
checking std_arg.h presence... no
checking for std_arg.h... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking sys/ptrace.h usability... yes
checking sys/ptrace.h presence... yes
checking for sys/ptrace.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking for path to OpenSSL... /usr
checking for OpenSSL version... OK
checking for AES_encrypt in -lcrypto... yes
checking whether TCL Script is enabled... yes
checking for Tcl library... not found
checking for Tcl header... not found
checking whether the Tcl system has changed... yes
configure: error:

  Tcl cannot be found on this system.

  Tcl is not required. Wraith will be compiled without TCL support. If you
  already have Tcl installed on this system, please specify the path by
  rerunning ./configure using the --with-tcllib='/path/to/libtcl.so' and
  --with-tclinc='/path/to/tcl.h' options.

checking for pid_t... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for working volatile... yes
checking whether byte ordering is bigendian... no
checking whether char is unsigned... no
checking for pid_t... (cached) yes
checking for size_t... (cached) yes
checking for uid_t in sys/types.h... (cached) yes
checking for long long int... yes
checking for int8_t... yes
checking for uint8_t... yes
checking for int16_t... yes
checking for uint16_t... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking whether lstat correctly handles trailing slash... yes
checking whether lstat accepts an empty string... no
checking whether lstat correctly handles trailing slash... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for alarm... yes
checking for working mktime... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking whether stat accepts an empty string... no
checking for struct timespec... yes
checking for struct stat.st_mtim... yes
checking for two-parameter timespecsub... no
checking for strftime... yes
checking for clock... yes
checking for fsync... yes
checking for getrusage... yes
checking for isascii... yes
checking for getpassphrase... no
checking for memcpy... yes
checking for memset... yes
checking for random... yes
checking for rename... yes
checking for snprintf... yes
checking for srandom... yes
checking for gettime... no
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for vsnprintf... yes
checking for vsprintf... yes
checking for uname... yes
configure: creating ./build/config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating src/Makefile
config.status: creating src/compat/Makefile
config.status: creating src/crypto/Makefile
config.status: creating src/mod/Makefile
config.status: creating src/buildinfo.h
config.status: creating src/mod/mod.mk
config.status: creating src/config.h
Generating lib symbols


------------ Configuring BDLIB ------------
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -pipe accepts -g... yes
checking how to run the C++ preprocessor... g++ -pipe -E
checking whether the compiler understands -Wall... yes
checking whether the compiler understands -pipe... yes
checking whether the compiler understands -static... yes
checking for cppunit-config... no
checking for Cppunit - version >= 1.9.10... checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking whether make sets $(MAKE)... yes
checking for gawk... gawk
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for a sed that does not truncate output... /bin/sed
checking for bison... bison -y
checking for basename... basename
checking for valgrind... no
checking for strip... strip
checking for gdiff... diff
checking for uname... uname
checking for ccache... no
checking for distcc... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for working volatile... yes
checking whether byte ordering is bigendian... no
checking whether char is unsigned... no
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for select... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating build/Makefile
config.status: creating src/tests/Makefile
config.status: creating build/config.h

...

Compiling: cmds
In file included from cmds.c:60:
libtcl.h:11:17: error: tcl.h: No such file or directory
In file included from libtcl.h:14,
                 from cmds.c:61:
.defs/libtcl_post.h:3: error: expected unqualified-id before ‘do’
cmds.c:4850: error: expected ‘}’ at end of input
make[1]: *** [cmds.o] Error 1
make: *** [dynamic] Error 2
[wraith@alteran wraith-v1.4.0]$

Speedup request_in

Right now if a bot needs access to a channel, it just asks random bots. This can take a long time if only 1 bot is in the channel from the whole net. Instead, a bot should broadcast a 'WHOSIN #chan' (similar to arp who-has). Bots will respond if they are in the channel. The bot can then ask specific bots for invite.

Now, this could just be changed to a 'INVITEME #chan', but that would violate the set in-bots feature, which prevents making the whole net waste its precious irc queue on redundant tasks.

n bots per irc server

it would be nice if wraith takes care with a variable that there are max 'n' bots on a single irc server

Impossible to compile on FreeBSD

I am having fatal-errors compiling Wraith (specifically BDlib) on FreeBSD.
Attached is a copy of the errors.

gmake[1]: Entering directory `/usr/home/wraith/wraith'
gmake[2]: Entering directory `/usr/home/wraith/wraith/lib'
[*] Making libraries
gmake[3]: Entering directory `/usr/home/wraith/wraith/lib/bdlib'
[*] Making BDLIB
gmake[4]: Entering directory `/usr/home/wraith/wraith/lib/bdlib/src'
[*] Building bdlib
[C ]    base64.c
In file included from base64.c:29:
In file included from ./base64.h:32:
In file included from ./String.h:32:
./ReferenceCountedArray.h:76:24: error: no member named 'max' in namespace 'std'
        newSize = std::max(size_t(size * 1.5), newSize);
                  ~~~~~^
./ReferenceCountedArray.h:348:21: error: no member named 'max' in namespace 'std'
      Reserve( std::max(oldLength, n) ); //Will set capacity()/size
               ~~~~~^
2 errors generated.
gmake[4]: *** [base64.o] Error 1
gmake[4]: Leaving directory `/usr/home/wraith/wraith/lib/bdlib/src'
gmake[3]: *** [bdlib] Error 2
gmake[3]: Leaving directory `/usr/home/wraith/wraith/lib/bdlib'
gmake[2]: *** [build] Error 2
gmake[2]: Leaving directory `/usr/home/wraith/wraith/lib'
gmake[1]: *** [lib] Error 2
gmake[1]: Leaving directory `/usr/home/wraith/wraith'
*** Error code 2

Stop.
make: stopped in /usr/home/wraith/wraith


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.