Skip to content

Instantly share code, notes, and snippets.

View ComputerTech312's full-sized avatar

Colby ComputerTech312

View GitHub Profile
import irc3
from irc3.plugins.command import command
@irc3.plugin
class MyPlugin:
def __init__(self, bot):
self.bot = bot
self.relay_enabled = {}
@command(permission='admin', public=True
#!/usr/bin/env python3
import os
import sys
def main():
while True:
print("Select the software to install:")
print("1. ZNC")
print("2. Eggdrop")
print("3. Exit")
import sqlite3
import os
def connect_to_sqlite(db_name):
"""Connects to an SQLite database or creates it if it doesn't exist."""
connection = sqlite3.connect(db_name)
return connection
def create_table(connection, table_name):
cursor = connection.cursor()
@ComputerTech312
ComputerTech312 / detect.py
Created February 9, 2023 02:25
Monitors networking and warns when exceeeds X packets in Y time.
import os
import time
import argparse
parser = argparse.ArgumentParser(description='DDoS detector and network traffic capture script')
parser.add_argument('-i', '--interface', type=str, help='The name of the network interface to monitor', required=False)
parser.add_argument('-p', '--packet_threshold', type=int, help='The threshold for packets per second', required=False, default=10000)
parser.add_argument('-d', '--dumpdir', type=str, help='The directory to save the network traffic capture', required=False, default='/tmp/')
args = parser.parse_args()
#!/usr/bin/python3
import os
print('Downloading
os.system("wget https://znc.in/releases/znc-1.8.2.tar.gz")
os.system("tar -xzvf znc-1.8.2.tar.gz")
# Change directory
os.chdir("znc-1.8.2")

Use the following command to generate a ssl key and change "YourNickname" to your ZNC username, use this command in your home directory:

openssl req -nodes -sha512 -newkey rsa:4096 -keyout user.pem -x509 -days 3650 -out user.pem -subj "/CN=YourNickname"

Now we're going to use the following command to find out what our ssl fingerprint is, so we can copy and use that for later on for another command:

openssl x509 -sha256 -noout -fingerprint -in user.pem | sed -e 's/^.*=//;s/://g;y/ABCDEF/abcdef/'

And now from IRC, we're going to use the following command to load the module globally for your current user, NOTE: there is no need to change the variable: "$user" and that variable simply means the current user you're logged in with.

Keybase proof

I hereby claim:

  • I am computertech312 on github.
  • I am computertech (https://keybase.io/computertech) on keybase.
  • I have a public key ASCZ1jSuqk_A6c7hFT4AzmQsE6rou6USY7dIVTNhUau3ygo

To claim this, I am signing this object:

@echo off
echo --------------------------------
echo Disabling Lockscreen ads...
echo --------------------------------
echo .
adb shell pm disable-user --user 0 com.amazon.kindle.kso
echo .
echo --------------------------------
echo Disabling OTA updates...
@ComputerTech312
ComputerTech312 / irc.md
Last active August 11, 2023 06:24
IRC Guide.

Introduction to IRC

IRC (Internet Relay Chat) is a protocol that facilitates communication in the form of text. It is designed for group communication in discussion forums, called channels, but also allows one-on-one communication via private messages.

How IRC Works

When you connect to an IRC network, you're connecting to a server that's part of that network. This server relays messages to and from other users connected to the same network.

The basic unit of communication on IRC is a message, which is a single line of text. Messages can be sent to a specific user (private message), to a group of users in a channel (public message), or to the server as a command.