Giter VIP home page Giter VIP logo

swirc's Introduction

README

Swirc Logo

Coverity Scan Build Status CodeQL macOS

What is Swirc?

Swirc is a BSD licensed, console based and lightweight ICB and IRC client written in C/C++, whose goals are to be portable and secure.

Official Swirc homepage

Program options

usage: swirc [-46?CPRSdipv] [-W password] [-c server[:port]] [-j join] [-n nickname] [-r rl name] [-u username] [-x config]

-4                   Use IPv4 addresses only
-6                   Use IPv6 addresses only
-?, --help           Output help
-C                   Do not change color definitions
-P                   Permanently disable SASL authentication
-R                   Disable TLS/SSL peer verification
-S                   Force TLS
-W <password>        Equal effect as flag 'p' but non-interactive
-c <server[:port]>   Connect to IRC server
-d                   Debug logging
-i                   Turn on Internet Citizen's Band mode
-j <join>            A comma-separated list of channels to join
-n <nickname>        Online nickname
-p                   Query for server password (for private servers)
-r <rl name>         Your real name
-u <username>        Your username
-v, --version        Output Swirc version
-x <config>          Config file

SAST Tools

PVS-Studio - static analyzer for C, C++, C#, and Java code.

Cloning

To clone the repository use Git.

$ git clone https://github.com/uhlin/swirc.git

Building

Framework

Swirc currently depends on:

Which means that on for example a Debian GNU/Linux system you need to install these packages before building:

# apt install gettext libcurl4-openssl-dev libhunspell-dev libidn11-dev libncursesw5-dev libssl-dev

And on Mac OS X, provided that Homebrew is installed, issue:

$ brew install hunspell
$ brew install libressl

Prompts that begin with a hash(#) symbolizes that the command shall be executed as root, while prompts that begin with a dollar sign ($) symbolizes that the command shall be executed as a normal user.

Void Linux

# xbps-install -S gettext-devel hunspell-devel libcurl-devel libidn-devel libnotify-devel ncurses-devel openssl-devel

Building for the UNIX environment

On the BSDs and GNU/Linux the configure script will per default generate make definitions that expects that the C compiler GCC is installed on your system. A make utility must also be present. Regarding Mac OS X I suggest that you install Xcode. Due to certain circumstances I no longer can confirm that building for OS X works.

$ cd /path/to/swirc
$ ./configure
$ make

Configuration options

The following options can be passed to the configure script:

  • --with-libnotify: Enable support for desktop notifications
  • --without-libiconv: Build without GNU libiconv
  • --without-libidn: Build without GNU libidn
  • --without-libintl: No internationalization

Install

  1. Installing it under /usr/local:

     $ sudo make install
    
  2. Installing it under /home/user without the translations (in which case you also should've passed --without-libintl to the configure script):

     $ PREFIX=/home/user make install-no-lc-msgs
    

Building for Windows

To build Swirc for Windows you must have Visual Studio.

So, fire up the command prompt for Visual Studio where the needed tools (the compiler, etc.) are loaded into the environment. The regular command prompt won't work. Then:

cd c:\path\to\swirc
nmake -f Makefile.vc

Done!

To make a distribution of Swirc use:

nmake -f Makefile.vc dist

Cleaning

Examples:

$ make clean
$ nmake -f Makefile.vc clean

swirc's People

Contributors

hack3ric avatar uhlin 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

swirc's Issues

E-Mail

Hi,

ive found a bug in swirc, that i would prefer to report via e-mail instead of public github.

An email to bredband.net bounced back.

How can i proceed?

Kind regards,
Michael

Window support like irssi?

Hi,

Looks like a promising project but it seems to lack some kind of window feature irssi or am I missing something?

Best regards,
Daniel

Resizing the window leads to a fatal error/crash on Windows 10

Swirc Version: 3.3.1
OS: Windows 10 Home, Version 21H1, Build 19043.1237

Resizing the window leads to a fatal error and crashes the program:
term_resize_panel: newwin(1, 120, 0, 0): unable to create new window

image

A lot of rendering artifacts occur during the resizing, and the window always reverts itself back to the default size. Is this intended behavior?

See also video: https://streamable.com/avlnbi

Issues with protocol colon escaping.

IRC protocol colon escaping seems to be done haphazardly. For example:

When a channel key containing a ":" is set, the ":" is erroneously stripped from display.

Server sending a "MODE #test +kl a:b :99" parses as: "mode/[#test] [+kl ab 99] by user". The ':' should not be stripped as part of a channel key, but it it is.

(Servers may allow a colon in the key as long as the colon is not the first character).

However, it is displayed on the status bar as [#test(+klnt a:b :99)]" which is also incorrect, as the ':' before 99 (last argument) should have been stripped here but is not.

When colon escaping is used in non-traditional places it seems to not always be escaped - for example, on inspircd (testnet.inspircd.org) channel modes are often misparsed, for example: "[#test(:+nt)]".

The practice of colon-escaping all final arguments, including those without spaces, is unusual but not in violation of the IRC RFC.

Reproducible crash from protocol fuzzing

Protocol fuzzing found the following reproducible crash:

(start netcat server with attached fuzzing data.)

nc -l 6667 <fuzz.log&

(start swirc)

gdb swirc
(gdb) run -c localhost -n x -u x -r x
Starting program: swirc -c brrpi02 -n x -u x -r x
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
FATAL: In events/names.c: Can't find a window with label pp NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

(crash backtrace)

Thread 3 "swirc" received signal SIGABRT, Aborted.
[Switching to Thread 0x752ff440 (LWP 12067)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x76925824 in __GI_abort () at abort.c:89
#2 0x00021d7c in hInstall (ctx=0x752fec14) at src/events/names.c:221
#3 0x00021e1c in event_names_htbl_insert (nick=0x74900f09 "c", channel=0x74901610 "pp ", 'N' <repeats 99 times>) at src/events/names.c:242
#4 0x0001c2cc in event_join (compo=0x74900c88) at src/events/channel.cpp:129
#5 0x0002f1a4 in irc_search_and_route_event (compo=0x74900c88) at src/irc.c:499
#6 0x0002f4e8 in ProcessProtoMsg (token=0x74900948 ":c JOIN pp ", 'N' <repeats 99 times>) at src/irc.c:552
#7 0x0002f7ec in irc_handle_interpret_events (recvbuffer=0x74900470 ":127.0.0.1 001 joseph :a", message_concat=0x752fedb8, state=0x752fedbc) at src/irc.c:646
#8 0x0003403c in net_irc_listen (connection_lost=0x752fee3b) at src/network.cpp:382
#9 0x00032230 in listenThread_fn (arg=0x0) at src/net-unix.c:150
#10 0x76c92fc4 in start_thread (arg=0x752ff440) at pthread_create.c:458
#11 0x769ca038 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:76 from /lib/arm-linux-gnueabihf/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

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.