This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKING_DIRECTORY="/home/kali/Desktop/" | |
cd $WORKING_DIRECTORY | |
mkdir -p "$WORKING_DIRECTORY/logs/ | |
DATE=`date +%d.%m.%y` | |
TIME=`date +%H.%M.%S` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Win32 API Contants | |
const FILE_ATTRIBUTES = { | |
"FILE_ATTRIBUTE_ARCHIVE": 0x20, | |
"FILE_ATTRIBUTE_HIDDEN": 0x2, | |
"FILE_ATTRIBUTE_NORMAL": 0x80, | |
"FILE_ATTRIBUTE_NOT_CONTENT_INDEXED": 0x2000, | |
"FILE_ATTRIBUTE_OFFLINE": 0x1000, | |
"FILE_ATTRIBUTE_READONLY": 0x1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Inspired by this post https://www.deepfryd.com/burp-academy-apprentice/ | |
How to use: | |
1) Browse to https://portswigger.net/web-security/all-labs. | |
2) Open your web browser's Developer tools by pressing 'F12' on your keyboard. | |
3) Click on the console tab. | |
4) Paste the following Javascript code into the console's prompt and hit 'Enter' on the keyboard. | |
5) Wait for all the labs to be updated with their respective levels (Tested ~12s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CS2106 Lab Assignment 1 Zip Build Script v2 by @rizemon | |
# Improvements added: | |
# - No longer requires creation of temp directory to house copies of necessary files | |
# - Now checks for missing files and reports them | |
# - Add reminder for student to check whether they have entered their information into the files | |
# Modify this | |
NUSNET_ID="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CS2106 Lab Assignment 1 Zip Build Script v1 by @rizemon | |
# ---------------------------------- | |
# Colors (From https://gist.github.com/jonsuh/3c89c004888dfc7352be) | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rich.console import Console | |
from rich.table import Table | |
from itertools import product | |
class InvalidInputException(Exception): | |
pass | |
def JK_flop(Q, J, K): | |
# Returns Q+ and Q+' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rich.console import Console | |
from rich.table import Table | |
import sys | |
from itertools import product | |
from math import ceil | |
def main(): | |
if len(sys.argv) != 3: | |
print("Command: python3 column.py <literals> <minterms>") | |
print("e.g python3 column.py A,D,B,C 4,7,3,1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import log2 | |
from sys import argv | |
from rich.console import Console | |
from rich.table import Table | |
########## CHANGE THIS ########### | |
NWAY = 2 # 1/2/4 | |
# Number of bytes | |
WORD = 4 # 4 bytes (Probably no need to change this) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Do `python3 -i vector.py` to use it interactively | |
from vpython import vector as v | |
from vpython import * | |
from typing import Union, Type | |
import sympy as sym | |
from fractions import Fraction | |
def man(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
if len(sys.argv) < 3: | |
print("Usage: python test.py A B") | |
sys.exit(1) | |
A,B = int(sys.argv[1]), int(sys.argv[2]) | |
if B < 0: | |
print("B should be positive.") |
NewerOlder