diff --git a/2fa.py b/2fa.py deleted file mode 100644 index 0a2d6a6..0000000 --- a/2fa.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# Two-factor Authentication (2FA) Helper - Developed by acidvegas in Python (https://acid.vegas/random) - -''' -Requirements: - pyotp (https://pypi.org/project/pyotp/) - qrcode (https://pypi.org/project/qrcode/) -''' - -import io, sys, time - -try: - import pyotp -except ImportError: - raise SystemExit('missing required \'pyotp\' module! (https://pypi.org/project/pyotp/)') -try: - import qrcode -except ImportError: - raise SystemExit('missing required \'qrcode\' module! (https://pypi.org/project/qrcode/)') - -def qrgen(data): - stdout = sys.stdout - sys.stdout = io.StringIO() - qr = qrcode.QRCode(border=1) - qr.add_data(data) - qr.make(fit=True) - qr.print_ascii(invert=True) - output = sys.stdout.getvalue() - sys.stdout = stdout - return output - -name = input('name : ') -issuer = input('issuer : ') -secret = input('secret : ') or pyotp.random_base32() -uri = pyotp.totp.TOTP(secret).provisioning_uri(name, issuer) -qr = qrgen(uri).replace(' ', ' ')[:-1] -max_len = len(qr.split('\n')[1]) -print(f'{uri}\n{qr}') -del name, issuer, uri, qr -while True: - code = pyotp.TOTP(secret).now() - seconds = int(time.strftime('%S')) - remain = 60-seconds if seconds >= 30 else 30-seconds - print(f'{code} ({remain})'.center(max_len), end='\r') - time.sleep(1) \ No newline at end of file diff --git a/acidbox/.bashrc b/acidbox/.bashrc deleted file mode 100644 index 2a0c08e..0000000 --- a/acidbox/.bashrc +++ /dev/null @@ -1,54 +0,0 @@ -[[ $- != *i* ]] && return - -export LC_CTYPE=en_US.UTF-8 -export LC_ALL=en_US.UTF-8 - -alias backup='rm ~/.backup/*.tar.gz && tar cvf ~/.backup/backup-DATE,tar.gz ~/' -alias cmds='sh ~/.scripts/cmds' -alias colors='sh ~/.scripts/colors.sh' -alias contact='sh ~/.scripts/contact' -alias diff='diff --color=auto' -alias dvtm-help='cat ~/.scripts/dvtm-help' -alias grep='grep --color=auto' -alias ls='ls --color=auto' -alias rtach='abduco -a main' -alias rules='sh ~/.scripts/rules' -alias startx='abduco -c main sh ~/.scripts/dvtm-status.sh' -alias tb='(exec 3<>/dev/tcp/termbin.com/9999; cat >&3; cat <&3; exec 3<&-)' -alias title='echo -ne "\033]0;$*\007"' -alias vhosts='sh ~/.scripts/vhosts' - -extract () { - if [ -f $1 ] ; then - case $1 in - *.tar.bz2) tar xjvf $1 ;; - *.tar.gz) tar xzvf $1 ;; - *.bz2) bzip2 -d $1 ;; - *.rar) unrar2dir $1 ;; - *.gz) gunzip $1 ;; - *.tar) tar xf $1 ;; - *.tbz2) tar xjf $1 ;; - *.tgz) tar xzf $1 ;; - *.zip) unzip2dir $1 ;; - *.Z) uncompress $1 ;; - *.7z) 7z x $1 ;; - *.ace) unace x $1 ;; - *) echo "unkown archive format" ;; - esac - else - echo "'$1' is not a valid file" - fi -} - -rnd() { - cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $1 | head -n 1 -} - -transfer() { - tmpfile=$( mktemp -t transferXXX ) - curl -H "Max-Downloads: 1" -H "Max-Days: 1" --progress-bar --upload-file $1 https://transfer.sh/$(basename $1) >> $tmpfile; - cat $tmpfile; - rm -f $tmpfile; -} - -PS1='\e[1;34m> \e[0;32m\w \e[0;37m: ' diff --git a/acidbox/.scripts/cmds b/acidbox/.scripts/cmds deleted file mode 100755 index f2e1707..0000000 --- a/acidbox/.scripts/cmds +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh -BLUE='\033[1;34m' -CYAN='\033[0;36m' -GREY='\033[1;30m' -RESET='\033[0m' -YELLOW='\033[0;33m' -echo -e "\n[${BLUE}INFORMATION COMMANDS${RESET}]" -echo -e " ${GREY}* ${CYAN}colors${YELLOW}\tDisplay terminal color support" -echo -e " ${GREY}* ${CYAN}contact${YELLOW}\tInformation on how to contact the system administrator" -echo -e " ${GREY}* ${CYAN}rules${YELLOW}\tDisplay the server rules" -echo -e " ${GREY}* ${CYAN}vhosts${YELLOW}\tList all of the Virtual Hosts" -echo -e "\n${RESET}[${BLUE}SESSION COMMANDS${RESET}]" -echo -e " ${GREY}* ${CYAN}dvtm-help${YELLOW}\tInformation about dvtm and how to use it" -echo -e " ${GREY}* ${CYAN}rtach${YELLOW}\tReattach to your main abduco session ${GREY}(Create session with startx)" -echo -e " ${GREY}* ${CYAN}startx${YELLOW}\tStart a dvtm session in abduco ${GREY}(See dvtm-help for more information)" -echo -e "\n${RESET}[${BLUE}OTHER COMMANDS${RESET}]" -echo -e " ${GREY}* ${CYAN}backup${YELLOW}\tCreate a backup tar file of your home directory ${GREY}(Saves to the ~/.backup/ directory)" -echo -e " ${GREY}* ${CYAN}extract${YELLOW}\tExtract any archive format ${GREY}(Usage: extract archive.tar.gz)" -echo -e " ${GREY}* ${CYAN}rnd${YELLOW}\t\tReturn a random string ${GREY}(Usage: rnd )" -echo -e " ${GREY}* ${CYAN}tb${YELLOW}\t\tUpload a text files contents to termbin ${GREY}(Usage: cat file.txt | tb)" -echo -e " ${GREY}* ${CYAN}transfer${YELLOW}\tUpload a file to transfer.sh ${GREY}(Usage: transfer file.tar)\n" diff --git a/acidbox/.scripts/contact b/acidbox/.scripts/contact deleted file mode 100755 index 5224f4a..0000000 --- a/acidbox/.scripts/contact +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh -BLUE='\033[1;34m' -CYAN='\033[0;36m' -GREY='\033[1;30m' -RESET='\033[0m' -YELLOW='\033[0;33m' -echo -e "\n[${BLUE}CONTACT${RESET}]" -echo -e " ${GREY}* ${CYAN}E-Mail${YELLOW}\tacid.vegas@acid.vegas" -echo -e " ${GREY}* ${CYAN}Github${YELLOW}\thttps://github.com/acidvegas" -echo -e " ${GREY}* ${CYAN}IRC${YELLOW}\t\tirc.supernets.org #acidbox" -echo -e " ${GREY}* ${CYAN}Keybase${YELLOW}\thttps://keybase.io/acidvegas" -echo -e " ${GREY}* ${CYAN}Twitter${YELLOW}\thttps://twitter.com/acidvegas\n" diff --git a/acidbox/.scripts/rules b/acidbox/.scripts/rules deleted file mode 100755 index b7d96f0..0000000 --- a/acidbox/.scripts/rules +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -BLUE='\033[1;34m' -CYAN='\033[0;36m' -GREY='\033[1;30m' -RESET='\033[0m' -YELLOW='\033[0;33m' -echo -e "\n[${BLUE}RULES${RESET}]" -echo -e " ${GREY}*${YELLOW} This is a private system that you are not to give out access to anyone" -echo -e " without permission from the system admin. No illegal files or activites." -echo -e " ${GREY}*${YELLOW} Avoid denial of service attacks out of respect for other users on the system." -echo -e " ${GREY}*${YELLOW} Stay in your home directory, keep the system clean, and make regular backups.\n" diff --git a/acidbox/.scripts/vhosts b/acidbox/.scripts/vhosts deleted file mode 100755 index 8bcd0fc..0000000 --- a/acidbox/.scripts/vhosts +++ /dev/null @@ -1,12 +0,0 @@ -#! /bin/sh -BLUE='\033[1;34m' -CYAN='\033[0;36m' -GREY='\033[1;30m' -RESET='\033[0m' -YELLOW='\033[0;33m' -echo -e "\n[${BLUE}VIRTUAL HOSTS${RESET}]" -echo -e " ${GREY}* ${CYAN}ip address 1 ${YELLOW}\tvirtual.hostname1.com" -echo -e " ${GREY}* ${CYAN}ip address 2 ${YELLOW}\tvirtual.hostname2.com" -echo -e " ${GREY}* ${CYAN}ip address 3 ${YELLOW}\tvirtual.hostname3.com" -echo -e " ${GREY}* ${CYAN}ip address 4 ${YELLOW}\tvirtual.hostname4.com" -echo -e " ${GREY}* ${CYAN}ip address 5 ${YELLOW}\tvirtual.hostname5.com\n" diff --git a/acidbox/setup b/acidbox/setup deleted file mode 100755 index aec0a0f..0000000 --- a/acidbox/setup +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -set -e - -setup_motd() { - RESET='\033[0m' - GREEN='\033[0;32m' - BGREEN='\033[1;32m' - YELLOW='\033[0;33m' - CYAN='\033[0;36m' - GREY='\033[1;30m' - RED='\033[1;31m' - BLUE='\033[1;34m' - UBLUE='\033[4;34m' - echo -e "╔═══════════════════════╦══════════════════════════════════════════════════════════════╗" - echo -e "║${GREEN} ▄▄▄· ▄▄· ▪ ·▄▄▄▄ ${RESET}║ ${RED}Connection Notice${RESET} ║" - echo -e "║${GREEN} ▐█ ▀█ ▐█ ▌▪██ ██▪ ██ ${RESET}╟──────────────────────────────────────────────────────────────╢" - echo -e "║${GREEN} ▄█▀▀█ ██ ▄▄▐█·▐█· ▐█▌ ${RESET}║ ║" - echo -e "║${GREEN} ▐█ ▪▐▌▐███▌▐█▌██. ██ ${RESET}║ ${YELLOW}This system is for the use of authorized users only.${RESET} ║" - echo -e "║${GREEN} ▀ ▀ ·▀▀▀ ▀▀▀▀▀▀▀▀• ${RESET}║ ${YELLOW}All connections will be monitored and logged by the system.${RESET} ║" - echo -e "║${GREEN} ▄▄▄▄· ▐▄• ▄ ${RESET}║ ║" - echo -e "║${GREEN} ▐█ ▀█▪▪ █▌█▌▪ ${RESET}║ ${YELLOW}Connection issues? Contact ${UBLUE}${BLUE}acid.vegas@acid.vegas${YELLOW} for help.${RESET} ║" - echo -e "║${GREEN} ▐█▀▀█▄ ▄█▀▄ ·██· ${RESET}║ ║" - echo -e "║${GREEN} ██▄▪▐█▐█▌.▐▌▪▐█·█▌ ${RESET}║ ${YELLOW}Right about now, the funk soul brudda. Check it out now...${RESET} ║" - echo -e "║${GREEN} ·▀▀▀▀ ▀█▄▀▪•▀▀ ▀▀ ${RESET}║ ║" - echo -e "╚═══════════════════════╩══════════════════════════════════════════════════════════════╝" - echo "${YELLOW}Hello ${CYAN}$(whoami)${YELLOW}! You are now connected to ${RED}$(hostname)" - echo "${YELLOW}Type ${BGREEN}cmds${YELLOW} to see a list of commands available.${RESET}" - echo "[${BLUE}RULES${RESET}]" - echo " ${GREY}*${YELLOW} This is a private system that you are not to give out access to anyone" - echo " without permission from the system admin. No illegal files or activites." - echo " ${GREY}*${YELLOW} Avoid denial of service attacks out of respect for other users on the system." - echo " ${GREY}*${YELLOW} Stay in your home directory, keep the system clean, and make regular backups." -} - -setup_user() { - 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 - wget -O /home/$1/.scripts/contact https://git.supernets.org/acidvegas/acidbox/blob/master/files/contact - wget -O /home/$1/.scripts/rules https://git.supernets.org/acidvegas/acidbox/blob/master/files/rules - wget -O /home/$1/.scripts/vhosts https://git.supernets.org/acidvegas/acidbox/blob/master/files/vhosts - echo "clear && reset/home/$1/.bash_logout" - echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" > /home/$1/.bash_profile -} - -setup_motd \ No newline at end of file diff --git a/networking/ampscan.py b/ampscan.py similarity index 100% rename from networking/ampscan.py rename to ampscan.py diff --git a/bandcamp.py b/bandcamp.py index 6b7f180..898c8ce 100644 --- a/bandcamp.py +++ b/bandcamp.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# developed by acidvegas in python (https://acid.vegas/random) 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') diff --git a/btkb.sh b/btkb.sh deleted file mode 100644 index 1280689..0000000 --- a/btkb.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -pacman -S bluez bluez-utils -systemctl enable bluetooth && sudo systemctl start bluetooth -sed -i 's/#AutoEnable=false/AutoEnable=true/' /etc/bluetooth/main.conf -bluetoothctl power on # possible bluetoothctl -- -bluetoothctl agent KeyboardOnly -bluetoothctl pairable on -bluetoothctl scan on -bluetoothctl pair CC:C5:0A:20:91:5B -bluetoothctl trust CC:C5:0A:20:91:5B -bluetoothctl connect CC:C5:0A:20:91:5B -bluetoothctl scan off \ No newline at end of file diff --git a/clitter.py b/clitter.py deleted file mode 100644 index b274e40..0000000 --- a/clitter.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# CLI Twitter - Developed by acidvegas in Python (https://acid.vegas/random) - -''' -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 - -consumer_key = 'CHANGEME' -consumer_secret = 'CHANGEME' -access_token = 'CHANGEME' -access_token_secret = 'CHANGEME' - -if len(sys.argv) < 2: - raise SystemExit('[!] - Missing command line arguments! (Usage: clitter.py )') -else: - tweet = ' '.join(sys.argv[1:]) -try: - import tweepy -except ImportError: - raise SystemExit('[!] - Failed to import the Tweepy library! (http://pypi.python.org/pypi/tweepy)') -try: - auth = tweepy.OAuthHandler(consumer_key, consumer_secret) - auth.set_access_token(access_token, access_token_secret) - api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True) - if not api.verify_credentials(): - raise tweepy.TweepError -except tweepy.TweepError as ex: - raise SystemExit(f'[!] - Failed to login to Twitter! ({ex})') -else: - me = api.me() -if len(tweet) > 280: - raise SystemExit('[!] - Tweet is too long!') -else: - try: - api.update_status(tweet) - tweet = api.user_timeline(id=me.id, count=1)[0] - print(f'[+] - Tweet has been posted! (https://twitter.com/{me.screen_name}/status/{tweet.id})') - except tweepy.TweepError as ex: - raise SystemExit(f'Failed to post Tweet! ({ex})') \ No newline at end of file diff --git a/cmus-now b/cmus-now deleted file mode 100755 index f99eeb8..0000000 --- a/cmus-now +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -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 "♫ $artist - $title" \ No newline at end of file diff --git a/coingecko.py b/coingecko.py deleted file mode 100644 index 84f7686..0000000 --- a/coingecko.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -# CoinGecko API Class - Developed by acidvegas in Python (https://acid.vegas/coinmarketcap) - -''' -API Reference: https://www.coingecko.com/en/api#explore-api -''' - -import http.client -import json -import time - -class CoinGecko(): - def __init__(self): - self.cache = dict() - self.last = 0 - - def api(self, endpoint): - conn = http.client.HTTPSConnection('api.coingecko.com', timeout=15) - conn.request('GET', '/api/v3/' + endpoint, headers={'Accept':'application/json',}) - response = conn.getresponse().read().decode('utf-8') - conn.close() - return json.loads(response) - - def market(self): - if time.time() - self.last > 300: - page = 1 - while True: - data = self.api('coins/markets?vs_currency=usd&order=market_cap_desc&per_page=250&page=' + str(page) + '&sparkline=true&price_change_percentage=1h%2C24h%2C7d%2C30d%2C1y') - if not data: - break - for coin in data: - self.cache[coin['symbol']] = { - 'name' : coin['name'], - 'price' : coin['current_price'], - 'market_cap' : coin['market_cap'], - 'rank' : coin['market_cap_rank'], - 'volume' : coin['total_volume'], - 'change' : { - '1h' : coin['price_change_percentage_1h_in_currency'], - '1d' : coin['price_change_percentage_24h_in_currency'], - '1w' : coin['price_change_percentage_7d_in_currency'], - '1m' : coin['price_change_percentage_30d_in_currency'], - '1y' : coin['price_change_percentage_1h_in_currency'] - } - } - page += 1 - self.last = time.time() - return self.cache - - def trending(self): - return [coin['item']['symbol'] for coin in self.api('search/trending')['coins']] - - def global_(self): - data = self.api('global')['data'] - results = { - 'cryptocurrencies' : data['active_cryptocurrencies'] - 'markets' : data['markets'] - 'btc_dominance' : data['market_cap_percentage']['btc'] - } - return results \ No newline at end of file diff --git a/networking/ddosmonit.sh b/ddosmonit old mode 100644 new mode 100755 similarity index 100% rename from networking/ddosmonit.sh rename to ddosmonit diff --git a/gmail.py b/gmail.py deleted file mode 100644 index 05065df..0000000 --- a/gmail.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/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/bots/badparent.py b/irc/bots/badparent.py index 43c5192..986921f 100644 --- a/irc/bots/badparent.py +++ b/irc/bots/badparent.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# BadParent IRC Bot - Developed by acidvegas in Python (https://acid.vegas/trollbots) +# BadParent IRC Bot - Developed by acidvegas in Python (https://acid.vegas/random) # badparent.py ''' diff --git a/irc/bots/cancer.py b/irc/bots/cancer.py deleted file mode 100644 index 4ce5e90..0000000 --- a/irc/bots/cancer.py +++ /dev/null @@ -1,500 +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): - 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/jupiter.py b/irc/bots/jupiter.py deleted file mode 100644 index f4812d6..0000000 --- a/irc/bots/jupiter.py +++ /dev/null @@ -1,309 +0,0 @@ -#!/usr/bin/env python -# Jupiter IRC Botnet - Developed by acidvegas in Python (https://acid.vegas/jupiter) - -''' -Jupiter will create a botnet by connecting a defined number of clones to every EFMet server. -A single host could potentially create over 30 clones. -It is meant to monitor/jupe/hold nicks & be controlled to do just about anything. -The bot is designed to be very minimal, secure, & trustless by nature. -This means anyone can run a copy of your script on their server to help build your botnet. - -Commands - id | Send bot identity - raw [-d] | Send \ to server. optionally delayed with -d argument - monitor list | Return MONITOR list - monitor reset | Reset MONITOR list - monitor <+/-> | Add (+) or Remove (-) from MONITOR list. (Can be a single nick or comma seperated list) - -All commands must be prefixed with @all or the bots nick & will work in a channel or private message. -Raw data must be IRC RFC compliant data & any nicks in the MONITOR list will be juped as soon as they become available. - -It is highly recommended that you use a random spoofing ident protocol daemon: - https://github.com/acidvegas/random/blob/master/irc/identd.py -''' - -import random -import re -import socket -import ssl -import time -import threading - -# Connection -servers = ( - 'efnet.deic.eu', # IPv6 - 'efnet.port80.se', # IPv6 - 'efnet.portlane.se', # IPv6 - 'irc.choopa.net', # IPv6 - 'irc.colosolutions.net', - 'irc.du.se', - 'irc.efnet.fr', # IPv6 - 'irc.efnet.nl', # IPv6 +6669 - 'irc.homelien.no', # IPv6 - 'irc.mzima.net', # IPv6 +6697 - 'irc.nordunet.se', # IPv6 - 'irc.prison.net', - 'irc.underworld.no', # IPv6 - 'irc.servercentral.net' # +9999 -) -ipv6 = False -vhosts = None # Use (line.rstrip() for line in open('vhosts.txt','r').readlines() if line) for reading from a file. -channel = '#jupiter' -key = None - -# Settings -admin = 'nick!user@host' # Can use wildcards (Must be in nick!user@host format) -concurrency = 3 # Number of clones to load per server -id = 'TEST' # Unique ID so you can tell which bots belong what server - -# Formatting Control Characters / Color Codes -bold = '\x02' -reset = '\x0f' -green = '03' -red = '04' -purple = '06' -orange = '07' -yellow = '08' -light_green = '09' -cyan = '10' -light_cyan = '11' -light_blue = '12' -pink = '13' -grey = '14' - -# Globals -bots = list() - -def botlist(nick): - global bots - if nick[:1] == '+': - bots.append(nick[1:]) - elif nick[:1] == '-': - bots.remove(nick[1:]) - -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 is_admin(ident): - return re.compile(admin.replace('*','.*')).search(ident) - -def random_nick(): - prefix = random.choice(['st','sn','cr','pl','pr','qu','br','gr','sh','sk','kl','wr']+list('bcdfgklmnprstvwz')) - midfix = random.choice(('aeiou'))+random.choice(('aeiou'))+random.choice(('bcdfgklmnprstvwz')) - suffix = random.choice(['ed','est','er','le','ly','y','ies','iest','ian','ion','est','ing','led']+list('abcdfgklmnprstvwz')) - return prefix+midfix+suffix - -class clone(threading.Thread): - def __init__(self, server, vhost): - self.monlist = list() - self.nickname = random_nick() - self.server = server - self.sock = None - self.vhost = vhost - threading.Thread.__init__(self) - - def run(self): - time.sleep(random.randint(300,900)) - self.connect() - - def connect(self): - try: - self.create_socket() - self.sock.connect((server, 6667)) - self.raw(f'USER {random_nick()} 0 * :{random_nick()}') - self.nick(self.nickname) - except socket.error as ex: - error('Failed to connect to IRC server.', ex) - self.event_disconnect() - else: - self.listen() - - def create_socket(self): - ipv6_check = set([ip[4][0] for ip in socket.getaddrinfo(server,6667) if ':' in ip[4][0]]) - self.sock = socket.socket(socket.AF_INET6) if ipv6 and ipv6_check else socket.socket() - if self.vhost: - self.sock.bind((self.vhost,0)) - #self.sock = ssl.wrap_socket(self.sock) - - def event_connect(self): - if self.nickname not in bots: - botlist('+'+self.nickname) - if self.monlist: - self.monitor('+', self.monlist) - self.join_channel(channel, key) - - def event_ctcp(self, nick, target, msg): - if target == self.nickname: - self.sendmsg(channel, '[{0}] {1}{2}{3} {4}'.format(color('CTCP', green), color('<', grey), color(nick, yellow), color('>', grey), msg)) - - def event_disconnect(self): - if self.nickname in bots: - botlist('-'+self.nickname) - self.sock.close() - time.sleep(86400+random.randint(1800,3600)) - self.connect() - - def event_nick(self, nick, new_nick): - if nick == self.nickname: - self.nickname = new_nick - if new_nick in self.monlist: - self.monitor('C') - self.monlist = list() - elif nick in self.monlist: - self.nick(nick) - - def event_nick_in_use(self, nick, target_nick): - if nick == '*': - self.nickname = random_nick() - self.nick(self.nickname) - - def event_notice(self, nick, target, msg): - if target == self.nickname: - self.sendmsg(channel, '[{0}] {1}{2}{3} {4}'.format(color('NOTICE', purple), color('<', grey), color(nick, yellow), color('>', grey), msg)) - - def event_message(self, ident, nick, target, msg): - if is_admin(ident): - args = msg.split() - if args[0] in ('@all',self.nickname) and len(args) >= 2: - if len(args) == 2: - if args[1] == 'id': - self.sendmsg(target, id) - elif len(args) == 3 and args[1] == 'monitor': - if args[2] == 'list' and self.monlist: - self.sendmsg(target, '[{0}] {1}'.format(color('Monitor', light_blue), ', '.join(self.monlist))) - elif args[2] == 'reset' and self.monlist: - self.monitor('C') - self.monlist = list() - self.sendmsg(target, '{0} nick(s) have been {1} from the monitor list.'.format(color(str(len(self.monlist)), cyan), color('removed', red))) - elif args[2][:1] == '+': - nicks = [mon_nick for mon_nick in set(args[2][1:].split(',')) if mon_nick not in self.monlist] - if nicks: - self.monitor('+', nicks) - self.monlist += nicks - self.sendmsg(target, '{0} nick(s) have been {1} to the monitor list.'.format(color(str(len(nicks)), cyan), color('added', green))) - elif args[2][:1] == '-': - nicks = [mon_nick for mon_nick in set(args[2][1:].split(',')) if mon_nick in self.monlist] - if nicks: - self.monitor('-', nicks) - for mon_nick in nicks: - self.monlist.remove(mon_nick) - self.sendmsg(target, '{0} nick(s) have been {1} from the monitor list.'.format(color(str(len(nicks)), cyan), color('removed', red))) - elif len(args) >= 4 and args[1] == 'raw': - if args[2] == '-d': - data = ' '.join(args[3:]) - threading.Thread(target=self.raw, args=(data,True)).start() - else: - data = ' '.join(args[2:]) - self.raw(data) - elif target == self.nickname: - if msg.startswith('\x01ACTION'): - self.sendmsg(channel, '[{0}] {1}{2}{3} * {4}'.format(color('PM', red), color('<', grey), color(nick, yellow), color('>', grey), msg[8:][:-1])) - else: - self.sendmsg(channel, '[{0}] {1}{2}{3} {4}'.format(color('PM', red), color('<', grey), color(nick, yellow), color('>', grey), msg)) - - def event_mode(self, nick, chan, modes): - pass # Don't know what we are doing with this yet. - - def event_quit(self, nick): - if nick in self.monlist: - self.nick(nick) - - def handle_events(self, data): - args = data.split() - if data.startswith('ERROR :Closing Link:'): - raise Exception('Connection has closed.') - elif data.startswith('ERROR :Reconnecting too fast'): - raise Exception('Connection has closed. (throttled)') - elif args[0] == 'PING': - self.raw('PONG ' + args[1][1:]) - elif args[1] == '001': # RPL_WELCOME - self.event_connect() - elif args[1] == '433' and len(args) >= 4: # ERR_NICKNAMEINUSE - nick = args[2] - target_nick = args[3] - self.event_nick_in_use(nick, target_nick) - elif args[1] == '731' and len(args) >= 4: # RPL_MONOFFLINE - nick = args[3][1:] - self.nick(nick) - elif args[1] == 'MODE' and len(args) >= 4: - nick = args[0].split('!')[0][1:] - chan = args[2] - modes = ' '.join(args[:3]) - self.event_mode(nick, chan, modes) - elif args[1] == 'NICK' and len(args) == 3: - nick = args[0].split('!')[0][1:] - new_nick = args[2][1:] - self.event_nick(nick, new_nick) - elif args[1] == 'NOTICE': - nick = args[0].split('!')[0][1:] - target = args[2] - msg = ' '.join(args[3:])[1:] - self.event_notice(nick, target, msg) - elif args[1] == 'PRIVMSG' and len(args) >= 4: - ident = args[0][1:] - nick = args[0].split('!')[0][1:] - target = args[2] - msg = ' '.join(args[3:])[1:] - if msg[:1] == '\001': - msg = msg[1:] - self.event_ctcp(nick, target, msg) - else: - self.event_message(ident, nick, target, msg) - elif args[1] == 'QUIT': - nick = args[0].split('!')[0][1:] - self.event_quit(nick) - - def join_channel(self, chan, key=None): - self.raw(f'JOIN {chan} {key}') if key else self.raw('JOIN ' + chan) - - 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) - self.handle_events(line) - except (UnicodeDecodeError,UnicodeEncodeError): - pass - except Exception as ex: - error('Unexpected error occured.', ex) - break - self.event_disconnect() - - def mode(self, target, mode): - self.raw(f'MODE {target} {mode}') - - def monitor(self, action, nicks=list()): - self.raw(f'MONITOR {action} ' + ','.join(nicks)) - - def nick(self, nick): - self.raw('NICK ' + nick) - - def raw(self, data, delay=False): - if delay: - time.sleep(random.randint(300,900)) - self.sock.send(bytes(data + '\r\n', 'utf-8')) - - def sendmsg(self, target, msg): - self.raw(f'PRIVMSG {target} :{msg}') - -# Main -if type(vhosts) == list: - for vhost in vhosts: - for i in range(concurrency): - for server in servers: - clone(server, vhost).start() -else: - for i in range(concurrency): - for server in servers: - clone(server, vhosts).start() -while True:input('') diff --git a/irc/bots/spiderweb.py b/irc/bots/spiderweb.py new file mode 100644 index 0000000..022ea04 --- /dev/null +++ b/irc/bots/spiderweb.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# SpiderWeb IRC Bot - Developed by acidvegas in Python (https://acid.vegas/trollbots) + +''' +This bot requires network operator privledges in order to use the SAJOIN command. +The bot will idle in the #spiderweb channel. Anyone leaving the channel will be force joined back. +''' + +import socket +import ssl +import time + +nickserv_password='CHANGEME' +operator_password='CHANGEME' + +def raw(msg): + sock.send(bytes(msg + '\r\n', 'utf-8')) + +while True: + try: + sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + sock.connect(('localhost', 6697)) + raw(f'USER spider 0 * :CAUGHT IN THE WEB') + raw('NICK spider') + while True: + try: + data = sock.recv(1024).decode('utf-8') + for line in (line for line in data.split('\r\n') if len(line.split()) >= 2): + print('{0} | [~] - {1}'.format(time.strftime('%I:%M:%S'), line)) + args=line.split() + if line.startswith('ERROR :Closing Link:'): + raise Exception('Connection has closed.') + elif args[0] == 'PING': + raw('PONG ' + args[1][1:]) + elif args[1] == '001': + raw('MODE spider +BDd') + raw('PRIVMSG NickServ IDENTIFY spider ' + nickserv_password) + raw('OPER spider ' + operator_password) + raw('JOIN #spiderweb') + elif args[1] == 'PART' and len(args) >= 3: + if args[2]=='#spiderweb': + nick = args[0].split('!')[0][1:] + raw(f'SAJOIN {nick} #spiderweb') + raw(f'PRIVMSG #spiderweb :HA HA HA! IM A BIG ASSHOLE SPIDER AND {nick} IS CAUGHT IN MY SPIDER WEB!!!') + except (UnicodeDecodeError, UnicodeEncodeError): + pass + except: + sock.close() + finally: + time.sleep(15) diff --git a/lyrics.py b/lyrics.py deleted file mode 100644 index f8939d7..0000000 --- a/lyrics.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -# requires: https://pypi.org/project/lyricsgenius/ -import sys, lyricsgenius -genius = lyricsgenius.Genius('CLIENT ACCESS TOKEN') # http://genius.com/api-clients -genius.verbose = False -song = genius.search_song(sys.argv[2], sys.argv[1]) -print(song.lyrics) if song else print('no lyrics found') \ No newline at end of file diff --git a/mutag b/mutag deleted file mode 100755 index 2a7be24..0000000 --- a/mutag +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# requires: id3v2 python-eyed3 -# this script removes all id3 tags/album art & sets 'artist' to the directory name & 'song' to the file name -find $HOME/music -type f | while read SONG; do - DIR=$(dirname "$SONG") - ARTIST=$(basename "$DIR") - TITLE=$(basename "$SONG" | rev | cut -d"." -f2- | rev) - echo "$DIR | $ARTIST | $TITLE" - eyeD3 --remove-all-images "$SONG" - id3v2 --delete-all "$SONG" - id3v2 --artist "$ARTIST" --song "$TITLE" -2 "$SONG" -done \ No newline at end of file diff --git a/networking/discover.py b/networking/discover.py deleted file mode 100644 index d3a4343..0000000 --- a/networking/discover.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -import subprocess - -def portscan(ip): - ports = list() - try: - cmd = subprocess.check_output('nmap -F ' + ip, shell=True).decode() - output = cmd.split('SERVICE')[1].split('MAC')[0].split('\n') - for item in output: - port = item.split('/')[0] - if port and 'filtered' not in item: - ports.append(port) - return ports - except: - return None - -def scanhosts(subnet): - data = list() - matrix = {'ip':list(),'host':list(),'ports':list()} - cmd = subprocess.check_output(f'nmap -sP {subnet}/24', shell=True).decode() - output = cmd.split('Nmap scan report for ')[1:-1] - for item in output: - ip = item.split('\n')[0] - ports = portscan(ip) - ports = ', '.join(ports) if ports else 'N/A' - mac = item.split('MAC Address: ')[1].split()[0] - host = item.split(mac)[1].replace('(','').replace(')','')[1:-1] - matrix['ip'].append(ip) - matrix['host'].append(host) - matrix['ports'].append(ports) - data.append({'ip':ip,'mac':mac,'host':host,'ports':ports}) - for item in matrix: - matrix[item] = len(max(matrix[item], key=len)) - print('\033[30m\033[47m{0} {1} {2} {3} \033[0m'.format('IP Address'.ljust(matrix['ip']), 'MAC Address ', 'Hostname'.ljust(matrix['host']), 'Ports'.ljust(matrix['ports']))) - for item in data: - print('{0} | {1} | {2} | {3}'.format(item['ip'].ljust(matrix['ip']), item['mac'], item['host'].ljust(matrix['host']), item['ports'])) - -scanhosts('10.0.0.0') \ No newline at end of file diff --git a/networking/mullvad.sh b/networking/mullvad.sh deleted file mode 100644 index 5e5eb0c..0000000 --- a/networking/mullvad.sh +++ /dev/null @@ -1,29 +0,0 @@ -#ROOT CHECK - -ACCOUNT_NUMBER=CHANGEME -PRIVATE_KEY= CHANGEME # wg genkey - -function get_servers() { - ADDRESS="$(curl -sSL https://api.mullvad.net/wg/ -d account="$ACCOUNT_NUMBER" --data-urlencode pubkey="$(wg pubkey <<< "$PRIVATE_KEY")")" - RESPONSE="$(curl -LsS https://api.mullvad.net/public/relays/wireguard/v1/)" - FIELDS="$(jq -r 'foreach .countries[] as $country (.; .; foreach $country.cities[] as $city (.; .; foreach $city.relays[] as $relay (.; .; $country.name, $city.name, $relay.hostname,$relay.public_key, $relay.ipv4_addr_in)))' <<< "$RESPONSE")" - while read -r COUNTRY && read -r CITY && read -r HOSTNAME && read -r PUBKEY && read -r IPADDR; do - { - echo "#COUNTRY @ $CITY" - echo "[Interface]" - echo "PrivateKey = $PRIVATE_KEY" - echo "Address = $ADDRESS" - echo "DNS = 193.138.218.74" - echo -e "\n[Peer]" - echo "PublicKey = $PUBKEY" - echo "Endpoint = $IPADDR:51820" - echo "AllowedIPs = 0.0.0.0/0, ::/0" - } > /etc/mullvad-${HOSTNAME%-wireguard}.conf - done <<< "$FIELDS" -} - -function select_server() { - for file in /etc/wireguard/*; do - echo $(basename "$file" | cut -d "-" -f2 ) - done -} \ No newline at end of file diff --git a/networking/ovh6 b/networking/ovh6 deleted file mode 100755 index 2e275df..0000000 --- a/networking/ovh6 +++ /dev/null @@ -1,5 +0,0 @@ -#!/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/networking/v6gen.py b/networking/v6gen.py deleted file mode 100644 index 899849e..0000000 --- a/networking/v6gen.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python -# IPv6 Generator - Developed by acidvegas in Python (https://acid.vegas/random)) -import os,random -interface = 'eth0' -subnet = '2607:5300:201:3000:' -def randstr(size) : return ''.join(random.sample(('1234567890ABCDEF'), size)) -def randv6(subnet) : return f'{subnet}{randstr(4)}:{randstr(4)}:{randstr(4)}:{randstr(4)}' -def v6(action,address,interface) : os.system(f'sudo ip addr {action} {address} dev {interafce}') -for i in range(50): - v6('add',randv6(subnet),interface) - print(ip) -#for ip in [line.rstrip() for line in open('ipv6.txt','r').readlines() if line]: -# v6('del',ip,interface \ No newline at end of file diff --git a/pass b/pass deleted file mode 100755 index 2774ba4..0000000 --- a/pass +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh -# developed by acidvegas (https://acid.vegas/pass) -# todo: oathtool check for git gpg gpg2 oathtool shred xclip - -GPG_ID="acidvegas" -GPG_OPTS="--quiet --yes --compress-algo=none --no-encrypt-to --batch --use-agent" -PASS_DIR=$HOME/.secrets - -gc() { - git -C $PASS_DIR add -A - git -C $PASS_DIR commit -m "$@" -} - -edit() { - if [ -d /dev/shm ] && [ -w /dev/shm ] && [ -x /dev/shm ]; then - tmp=$(mktemp -u /dev/shm/pw.XXXXXXXXXX) - else - tmp=$(mktemp -u pw.XXXXXXXXXX) - fi - trap "shred -f -z $tmp" EXIT - if [ -f $PASS_DIR/$1.gpg ]; then - gpg2 -d -o $tmp $GPG_OPTS $PASS_DIR/$1.gpg - nano $tmp - if [ ! "$(gpg2 -d $GPG_OPTS $PASS_DIR/$1.gpg)" = "$(cat $tmp)" ]; then - gpg2 -e -r $GPG_ID -o $PASS_DIR/$1.gpg $GPG_OPTS $tmp - gc "modified $1" - fi - else - nano $tmp - if [ -f $tmp ]; then - mkdir -p $(dirname $PASS_DIR/$1) - gpg2 -e -r $GPG_ID -o $PASS_DIR/$1.gpg $GPG_OPTS $tmp - gc "created $1" - fi - fi -} - -otp() { - echo "not done" -} - -show() { - if [ -f $PASS_DIR/$1.gpg ]; then - gpg2 -d $GPG_OPTS $PASS_DIR/$1.gpg - else - echo "error: $1 does not exist" - fi -} - -set -f+x -export GPG_TTY=$(tty) -umask 077 -mkdir -p $PASS_DIR - -if [ "$#" = '2' ]; then - if [ "$1" = "edit" ]; then - edit $2 - elif [ "$1" = "otp" ]; then - otp $2 - fi -elif [ "$#" = '1' ]; then - show $1 -else - tree -C -l --noreport $PASS_DIR | tail -n +2 | sed -E 's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g' -fi \ No newline at end of file diff --git a/networking/riseup.sh b/riseup.sh similarity index 100% rename from networking/riseup.sh rename to riseup.sh diff --git a/tables.py b/tables.py deleted file mode 100644 index 8ca6f01..0000000 --- a/tables.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -# table plotter - developed by acidvegas in python (https://acid.vegas/random) -# tableplot.py - -data = { - 'number' : ('1','2','3','4','5'), - 'name' : ('mark', 'steven', 'fredrick', 'bronzel', 'billy'), - 'race' : ('simpson', 'WHITE BOI', 'peckerwood', 'bird', 'fartman') -} - -def table(data): - columns = len(data) - for item in data: - max(data[item], key=len) - print('┌' + '─'*amount + '┐') - print('│ ' + title + ' '*amounnt + ' │ ') - print('├───────────┼────────────────┼───────┤') - - print('└───────────┴────────────────┴───────┘') \ No newline at end of file diff --git a/todo b/todo deleted file mode 100755 index 55eff3c..0000000 --- a/todo +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -#todo: custom dmenu args cleaner, cli only mode -db=$HOME/.todo -touch $db -while : -do - cmd=$(dmenu -l 10 -m 0 -fn "Misc Ohsnap.Icons:style=Regular:size=11" -nb "#000000" -nf "#FFFFFF" -sb "#000000" -sf "#00D787" "$@" < "$db") - if [ -z "$cmd" ]; then - break - elif grep -q "^$cmd\$" "$db"; then - grep -v "^$cmd\$" "$db" > "$db.$$" - mv "$db.$$" "$db" - else - echo "$cmd" >> "$db" - fi -done -exit 0 \ No newline at end of file diff --git a/vps.sh b/vps.sh deleted file mode 100644 index 761f422..0000000 --- a/vps.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -set -xev -GIT_URL="https://raw.githubusercontent.com/acidvegas/archlinux/master" -passwd root -userdel -r alarm -useradd -m -s /bin/bash acidvegas && gpasswd -a acidvegas wheel && passwd acidvegas -timedatectl set-timezone America/New_York && timedatectl set-ntp true -echo "LANG=en_US.UTF-8" > /etc/locale.conf && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen -pacman-key --init && pacman-key --populate archlinux -pacman -Syyu -pacman -S gcc make patch pkg-config python python-pip -pacman -S abduco exa git man ncdu sudo tor weechat which -echo "clear && reset" > /etc/bash.bash_logout -echo -e "export VISUAL=nano\nexport EDITOR=nano\nunset HISTFILE\nln /dev/null ~/.bash_history -sf" >> /etc/profile -echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" > /root/.bash_profile -echo -e "[[ $- != *i* ]] && return\nalias diff='diff --color=auto'\nalias grep='grep --color=auto'\nalias ls='ls --color=auto'\nPS1='\e[1;31m> \e[0;33m\w \e[0;37m: '" > /root/.bashrc -source /root/.bashrc -history -c && export HISTFILESIZE=0 && export HISTSIZE=0 && unset HISTFILE -[ -f /root/.bash_history ] && rm /root/.bash_history -wget -O /etc/ssh/sshd_config $GIT_URL/etc/ssh/sshd_config -wget -O /etc/sudoers.d/sudoers.lecture $GIT_URL/etc/sudoers.d/sudoers.lecture -wget -O /etc/topdefaultrc $GIT_URL/etc/topdefaultrc -echo -e "set boldtext\nset markmatch\nset minibar\nset morespace\nset nohelp\nset nonewlines\nset nowrap\nset quickblank\nset tabsize 4\nunbind ^J main\ninclude \"/usr/share/nano/*.nanorc\"" > /etc/nanorc -echo -e "Defaults lecture = always\nDefaults lecture_file = /etc/sudoers.d/sudoers.lecture\nroot ALL=(ALL) ALL\n%wheel ALL=(ALL) ALL" > /etc/sudoers -echo -e "[Journal]\nStorage=volatile\nSplitMode=none\nRuntimeMaxUse=500K" > /etc/systemd/journald.conf \ No newline at end of file