- Start vm with tart
tart run archlinux --no-graphics --dir=shared:~/Sources --rosetta=ROSETTA
- mount rosetta to Linux
sudo mkdir -p /mnt/rosetta
sudo mount -t virtiofs ROSETTA /mnt/rosetta
I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.
Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?
''' | |
ROP Analyze | |
Written by St4rk | |
The code is a total mess and I don't know python (it's one of many reasons | |
that I decided to use python here, to learn) | |
Feel free to modify and do whatever you want | |
''' | |
# imports |
with (true) { | |
// f() will allocate a buggy JSArray. The length is set to 24 but the capacity is only 16. | |
// take a look at JSCreateLowering::ReduceJSCreateArray to see why this is happening | |
function f(){ | |
var x = 8; | |
var y = 0xffffffff; | |
var ind = x & y; | |
x = 16; | |
y = 0xffffffff; | |
var ind2 = ind + (x&y); |
__author__ = 'breddels' | |
""" | |
Demonstrates combining Qt and tornado, both which want to have their own event loop. | |
The solution is to run tornado in a thread, the issue is that callbacks will then also be executed in this thread, and Qt doesn't like that. | |
To fix this, I show how to use execute the callback in the main thread, using a Qt signal/event in combination with Promises. | |
The output of the program is: | |
fetch page, we are in thread <_MainThread(MainThread, started 47200787479520)> | |
response is 191548 bytes, we are in thread <Thread(Thread-1, started daemon 47201018689280)> | |
the other thread should fulfil the result to this promise, we are in thread <Thread(Thread-1, started daemon 47201018689280)> |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <signal.h> | |
#include <err.h> | |
#include <string.h> | |
#include <alloca.h> | |
#include <limits.h> | |
#include <sys/inotify.h> |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <elf.h> | |
#include <err.h> | |
#include <syslog.h> | |
#include <sched.h> |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from PIL import Image | |
import struct, os, sys | |
def usage(): | |
print './png2rgb565.py HOGE.png' | |
sys.exit(1) | |
# hotkey_utils.py - bNull | |
# | |
# Some useful shortcuts for binding to hotkeys. Current output/hotkeys: | |
# | |
# [+] Bound make_dwords to Ctrl-Alt-D | |
# [+] Bound make_cstrings to Ctrl-Alt-A | |
# [+] Bound make_offset to Ctrl-Alt-O | |
import idaapi | |
import idc |