expanded alt version

This commit is contained in:
Pratyush Desai 2022-02-28 19:01:59 +05:30
parent baffac466d
commit 39c02a3523
Signed by: pratyush
GPG Key ID: DBA5BB7505946FAD
7 changed files with 159 additions and 1 deletions

24
Channel_Key_Hack.patch Normal file
View 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 20201126 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);
}
}

0
HACKING Normal file
View File

View File

@ -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
View 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
View File

@ -0,0 +1,33 @@
cat Dump.XML |
#geht nicht: sed 's/\[\^@]/\&#129370/g' |
sed 's/\x01/\&#9742;/g' |
sed 's/\x02/\&#9728;/g' |
sed 's/\x03/\&#9762;/g' |
sed 's/\x04/\&#9777;/g' |
sed 's/\x05/\&#9798;/g' |
sed 's/\x06/\&#9770;/g' |
sed 's/\x07/\&#9811;/g' |
sed 's/\x08/\&#127770;/g' |
#TAB ... sed 's/\x09/\&#9900;/g' |
#\n sed 's/\x0a/\&#9901;/g' |
sed 's/\x0b/\&#9903;/g' |
sed 's/\x0c/\&#9904;/g' |
#\r sed 's/\x0d/\&#9906;/g' |
sed 's/\x0e/\&#9907;/g' |
sed 's/\x0f/\&#9775;/g' |
sed 's/\x10/\&#9810;/g' |
sed 's/\x11/\&#9813;/g' |
sed 's/\x12/\&#9814;/g' |
sed 's/\x13/\&#128013;/g' |
sed 's/\x14/\&#9832;/g' |
sed 's/\x16/\&#10052;/g' |
sed 's/\x17/\&#9936;/g' |
sed 's/\x18/\&#9834;/g' |
sed 's/\x19/\&#9836;/g' |
sed 's/\x1a/\&#8734;/g' |
sed 's/\x1b/\&#9757;/g' |
sed 's/\x1c/\&#9761;/g' |
sed 's/\x1d/\&#9759;/g' |
sed 's/\x1e/\&#9787;/g' |
sed 's/\x1f/\&#9735;/g' |
cat > Dump_Esc.xml

59
extra_shares/Fuck_zero.c Normal file
View 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
View 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