Skip to content

Instantly share code, notes, and snippets.

View DavidTan0527's full-sized avatar
💻
Coding

Tan Weiu Cheng DavidTan0527

💻
Coding
View GitHub Profile
@DavidTan0527
DavidTan0527 / intro-pwn-cheatsheet.md
Last active November 15, 2024 03:50
A quick guide to get started with pwn

Getting Started

For system security related challenges,

You will see a server endpoint nc xxx.xxx.xxx.xxx yyyy and an attached zip file.

The attached zip file will contain

  1. The source code of the program
  2. Compiled binary of the program
  3. Makefile to compile the program
@DavidTan0527
DavidTan0527 / python3-cheatsheet.md
Last active October 20, 2022 15:35
Python cheatsheet for beginner hackers (or anyone else that may benefit from this :P)

Python3 has many useful libraries (PyCryptodome) that can deal with Cryptography scheme.

Python3 differentiates string and bytes with the b'' syntax

s1 = b'abcd' # Bytes of 'abcd'
s2 = 'abcd' # String of 'abcd'

Here are some of the useful commands that is supported natively in Python3:

import java.io.*;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
public class SpeedDemon {
// Do not edit this method for contest submission
public static void main(String[] args){
long[] primes = {
1, 1, 2, 3, 5, 7, 11, 13, 17, 19, -1, 23, 29, -1, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107,
109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229,

IS1103-notes

Notes for IS1103 course on ethical views

PS: this note is written under my own understandings of the course and material, read at your own risk ;)

PPS: My friends and I used this note blindly, we all got A and A+ in the end :P

Structure of notes

  1. There are 5 main ethical views, each has 3 components that define the ethical view it is under.
  2. Each component has a definition, which is the first key-point.
#include <iostream>
#include <algorithm>
#include <cmath>
#include <queue>
#include <set>
#include <vector>
#include <string>
#include <string.h>
using namespace std;