Psotnic /
Install
Psotnic install guide
Overview
Psotnic is an IRCnet bot written in C++. The main goal of the project was to create a fast, stable and easy to use bot.
Installation
Psotnic is not available in the ports of OpenBSD 7.2, therefore it must be built from source.
- Grab the source code from the official repository:
$ curl -OJL https://github.com/psotnic/psotnic/archive/refs/tags/v0.2.14.tar.gz $ tar -xzvf psotnic-0.2.14 $ cd psotnic-0.2.14
- Apply the patch for OpenBSD 7.2:
$ curl -s http://devune.nastycode.com/psotnic-0.2.14-openbsd.patch | patch --posix -p1
The patch includes few type castings and enabling clang as default compiler along with required compiler flag changes.
- Configure compilation options and build the binary:
$ ./configure && make dynamic
- To verify a successful build go to
./bin
directory and run the binary.
$ cd ./bin $ ./psotnic
You should see the following output if the build is valid:
Syntax: ./psotnic [-v] [-a] [-p] [-n] [-c decrypted config] [crypted config]
Configuration
As a demonestration we will use a dafault config for a bot to connect tor IRCNow server.
- Generate a hash of your main password for the bot, using:
$ echo "mymainpassword" | ./psotnic -p
The output would be similar to the this:
Psotnic C++ edition, version 0.2.14-ipv6 (rev: UNKNOWN, build: May 21 2023 09:00:38) Copyright (C) 2003-2007 Grzegorz Rusin <grusin@gmail.com> If you find this software useful please donate at http://psotnic.sf.net/donate [*] Bot is now running in MD5 hash generator mode [?] String to hash: [*] MD5 hash : 9dc275cb3ffdb686407934814bc5771c
- Create a config file named
samplebot.cfg
with the following content:
nick samplebot realname Sample Bot altnick samplebot server 198.251.82.194 6667 myipv4 127.0.0.1 listen 62450 ownerpass 9dc275cb3ffdb686407934814bc5771c
Replace the value for
ownerpass
with the hash obtained from the previous step.
- Next, encrpyt the raw config file using:
$ ./psotnic -c samplebot.cfg
- Now, run the bot with the encrypted config file:
$ ./psotnic samplebot.cfg
- Create the bot owner on the first run with every new config use telnet:
$ telnet localhost 62450
Type in the owner password from the first step and create the user by specifying a name and a password.
Alternatively, you could directly message the bot on one of the IRC servers from the config file as follows:
/msg samplebot mainowner <OWNERNAME> <PASSWORD>
See also:
- Psotnic Documentation: https://www.psotnic.com/documentation/