expanded alt version
This commit is contained in:
parent
baffac466d
commit
39c02a3523
24
Channel_Key_Hack.patch
Normal file
24
Channel_Key_Hack.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/intcommands.c b/intcommands.c
|
||||
index 96c45c1..9fada5f 100644
|
||||
--- a/intcommands.c
|
||||
+++ b/intcommands.c
|
||||
@@ -1031,10 +1031,15 @@ void bf_c_irc_put_raw()
|
||||
char *line, *buffer;
|
||||
if (accesslevel < 3) {
|
||||
line = vector_pop_string(dstack);
|
||||
- buffer = malloc(strlen(line) + 3);
|
||||
- sprintf(buffer, "%s\r\n", line);
|
||||
- netsend(ircsocket, buffer);
|
||||
- free(buffer);
|
||||
+ // APic 2020‑11‑26 ugly Hack
|
||||
+ if(!strcmp(line, "JOIN #europa")) {
|
||||
+ netsend(ircsocket, "JOIN #europa :Polenmieze\r\n");
|
||||
+ } else {
|
||||
+ buffer = malloc(strlen(line) + 3);
|
||||
+ sprintf(buffer, "%s\r\n", line);
|
||||
+ netsend(ircsocket, buffer);
|
||||
+ free(buffer);
|
||||
+ }
|
||||
free(line);
|
||||
}
|
||||
}
|
6
Makefile
6
Makefile
@ -1,11 +1,12 @@
|
||||
CC = gcc
|
||||
HELP2MAN ?= help2man
|
||||
CFLAGS = -g -D_GNU_SOURCE -std=gnu11 -O0 -Og -Wall -Wextra -Werror
|
||||
|
||||
LIBS = -lz -lm -lcdb -ldb
|
||||
OBJECTS = vector.o node.o sql.o intcommands.o file.o db_cdb.o db_bdb.o com.o botforth.o
|
||||
HEADERS = def.h botforth.h com.h node.h vector.h
|
||||
|
||||
all: botforth db
|
||||
all: botforth db db.1
|
||||
|
||||
makeintcommand:
|
||||
./makeintcommand.sh > getintcommand.c
|
||||
@ -18,6 +19,9 @@ $(OBJECTS): $(HEADERS)
|
||||
db: vector.o node.o file.o db_cdb.o db_bdb.o db.o
|
||||
$(CC) $(CFLAGS) -o db vector.o node.o file.o db_cdb.o db_bdb.o db.o $(LIBS)
|
||||
|
||||
db.1:
|
||||
$(HELP2MAN) -N --version-string=0.1 -o db.1 ./db
|
||||
|
||||
static: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) -static -o botforth $(OBJECTS) $(LIBS)
|
||||
|
||||
|
36
db.1
Normal file
36
db.1
Normal file
@ -0,0 +1,36 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH DB "1" "October 2018" "db 0.1" "User Commands"
|
||||
.SH NAME
|
||||
db \- manual page for db 0.1
|
||||
.SH DESCRIPTION
|
||||
.SS "Argumente:"
|
||||
.TP
|
||||
\fB\-\-help\fR
|
||||
Diese Hilfe
|
||||
.TP
|
||||
\fB\-\-dump\fR
|
||||
[Eintrag] Datenbankeintrag mit Spaltennamen anzeigen
|
||||
.TP
|
||||
\fB\-\-dumpall\fR
|
||||
Alle Datenbankeintr??ge (mit Spalten) zeigen
|
||||
.TP
|
||||
\fB\-\-dumprandom\fR
|
||||
Zuf??lligen Datenbankeintrag liefern
|
||||
.TP
|
||||
\fB\-\-content\fR [Eintrag]
|
||||
Das Feld ???Inhalt??? ausgeben
|
||||
.TP
|
||||
\fB\-\-allcont\fR
|
||||
Das Feld ???Inhalt??? aller Eintr??ge ausgeben
|
||||
.TP
|
||||
\fB\-\-anlcont\fR
|
||||
^ mit ???\en??? statt ???\e0??? als Trenner
|
||||
.TP
|
||||
\fB\-\-genindex_cdb\fR
|
||||
Indexdatei f??r CDB\-Datenbank anlegen
|
||||
.TP
|
||||
\fB\-\-genindex_cdb_cmd\fR
|
||||
Indexdatei f??r CDB\-Datenbank anlegen, nur Kommandos
|
||||
.TP
|
||||
\fB\-\-genindex_cdb_nocmd\fR
|
||||
Indexdatei f??r CDB\-Datenbank anlegen, Kommandos rausgefiltert
|
33
extra_shares/Escape.sh
Normal file
33
extra_shares/Escape.sh
Normal file
@ -0,0 +1,33 @@
|
||||
cat Dump.XML |
|
||||
#geht nicht: sed 's/\[\^@]/\🥚/g' |
|
||||
sed 's/\x01/\☎/g' |
|
||||
sed 's/\x02/\☀/g' |
|
||||
sed 's/\x03/\☢/g' |
|
||||
sed 's/\x04/\☱/g' |
|
||||
sed 's/\x05/\♆/g' |
|
||||
sed 's/\x06/\☪/g' |
|
||||
sed 's/\x07/\♓/g' |
|
||||
sed 's/\x08/\🌚/g' |
|
||||
#TAB ... sed 's/\x09/\⚬/g' |
|
||||
#\n sed 's/\x0a/\⚭/g' |
|
||||
sed 's/\x0b/\⚯/g' |
|
||||
sed 's/\x0c/\⚰/g' |
|
||||
#\r sed 's/\x0d/\⚲/g' |
|
||||
sed 's/\x0e/\⚳/g' |
|
||||
sed 's/\x0f/\☯/g' |
|
||||
sed 's/\x10/\♒/g' |
|
||||
sed 's/\x11/\♕/g' |
|
||||
sed 's/\x12/\♖/g' |
|
||||
sed 's/\x13/\🐍/g' |
|
||||
sed 's/\x14/\♨/g' |
|
||||
sed 's/\x16/\❄/g' |
|
||||
sed 's/\x17/\⛐/g' |
|
||||
sed 's/\x18/\♪/g' |
|
||||
sed 's/\x19/\♬/g' |
|
||||
sed 's/\x1a/\∞/g' |
|
||||
sed 's/\x1b/\☝/g' |
|
||||
sed 's/\x1c/\☡/g' |
|
||||
sed 's/\x1d/\☟/g' |
|
||||
sed 's/\x1e/\☻/g' |
|
||||
sed 's/\x1f/\☇/g' |
|
||||
cat > Dump_Esc.xml
|
59
extra_shares/Fuck_zero.c
Normal file
59
extra_shares/Fuck_zero.c
Normal file
@ -0,0 +1,59 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
ssize_t write_all(int fd, char *buf, size_t count)
|
||||
{
|
||||
ssize_t ret;
|
||||
size_t cnt;
|
||||
for(cnt = count; cnt > 0; buf += ret, cnt -= ret) {
|
||||
ret = write(fd, buf, count);
|
||||
if(ret == -1) {
|
||||
// Datei kein Socket und nicht O_NONBLOCK, also
|
||||
// sollteâ„¢ kein EAGAIN kommen
|
||||
perror("write");
|
||||
exit(1);
|
||||
}
|
||||
// ret kann 0 sein, das heißt 0 Bytes wurden geschrieben
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
signed int fd_in = open("Dump_Esc.xml", O_RDONLY);
|
||||
if(fd_in == -1) {
|
||||
perror("open");
|
||||
exit(1);
|
||||
}
|
||||
signed int fd_out = creat("Dump_Esc_0.xml", 0640);
|
||||
if(fd_in == -1) {
|
||||
perror("creat");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
const size_t SIZ = 1024;
|
||||
char buf[SIZ];
|
||||
|
||||
for(;;) {
|
||||
ssize_t ret = read(fd_in, buf, SIZ);
|
||||
if(!ret)
|
||||
break;
|
||||
|
||||
for(size_t i=0; i<SIZ; i++) {
|
||||
if(buf[i] == '\0')
|
||||
buf[i] = '0';
|
||||
}
|
||||
|
||||
// zurückgegeben wird hier immer der Count
|
||||
write_all(fd_out, buf, ret);
|
||||
}
|
||||
|
||||
close(fd_out);
|
||||
close(fd_in);
|
||||
puts("Fertig.");
|
||||
return 0;
|
||||
}
|
2
permanent.sh
Executable file
2
permanent.sh
Executable file
@ -0,0 +1,2 @@
|
||||
./db --write command/memory/config/ircnet/channels/permanent '!wg86mdrogen #drogen #europa #lobby #Lobby.Play #SpielBank #SchwarzBurg #raspberry-pi #Geschichte +Linux.De +BotForth #CryptoCoins #PiwisWorld #Pr0n'
|
||||
./db --dump command/memory/config/ircnet/channels/permanent
|
Loading…
Reference in New Issue
Block a user