Skip to content

Instantly share code, notes, and snippets.

View victorazzam's full-sized avatar
🍊
Messing with GPT-4

Victor Azzam victorazzam

🍊
Messing with GPT-4
View GitHub Profile
@victorazzam
victorazzam / maze-robot-y1.ino
Created July 29, 2020 09:35
Final code for the Arduino maze robot in Year 1 of CS course.
// by Victor Azzam and Gerard O'Brien
// B00099167 B00099300
#include <Servo.h> // Include servo library
Servo servoLeft; // Declare servos
Servo servoRight;
void setup()
{
@victorazzam
victorazzam / battleship.py
Last active March 9, 2019 23:52
Simple peer-to-peer game of Battleship based on the classic board game.
#!/usr/bin/env python3
#
# A peer-to-peer game of Battleship because who doesn't like a bit of P2P gaming? Enjoy :D
#
# First edit: November 18th 2015
# Last edit: March 5th 2019
# Author: Victor Azzam
import re
import signal
@victorazzam
victorazzam / ringzer0.py
Created October 11, 2018 22:00
Interact with the RingZer0 challenge site.
#!/usr/bin/env python3
import bs4, getpass, urllib3
url = "https://ringzer0ctf.com"
url1 = f"{url}/login"
url2 = f"{url}/challenges"
# Set up the connection pool
http = urllib3.PoolManager()
@victorazzam
victorazzam / morse.py
Last active December 17, 2019 04:51
Morse code translator.
#!/usr/bin/env python3
from sys import argv, exit
u = "Usage: morsecode <from> <text>\nTypes: morse (m), english (e)"
e = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
m = ".- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. -- -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --.. ----- .---- ..--- ...-- ....- ..... -.... --... ---.. ----.".split()
english = dict(zip(e, m))
morse = dict(zip(m, e))
@victorazzam
victorazzam / serv.py
Last active August 27, 2018 05:11
Simple server-client socket implementation.
#!/usr/bin/env python3
import sys, socket, threading, readline
IP = sys.argv[1]
PORT = int(sys.argv[2])
UDP = socket.SOCK_DGRAM
TCP = socket.SOCK_STREAM
@victorazzam
victorazzam / chat.py
Last active February 14, 2019 22:53
Simple peer-to-peer chat using Python sockets.
#!/usr/bin/env python3
from sys import argv, stdout, exit
from threading import Thread
import re, socket, random, gnureadline
PORT = 6310
def Bind_UDP():
global sock2
@victorazzam
victorazzam / bfi.py
Created August 27, 2018 02:58
Brainfuck interpreter written in Python 3
#!/usr/bin/env python3
import os, sys
if not sys.argv[1:]:
sys.exit("Usage: bfi.py file [input]")
if not os.path.isfile(sys.argv[1]):
sys.exit("File not found.")