Skip to content

Instantly share code, notes, and snippets.

View SakiiR's full-sized avatar
🎯
Focusing

SakiiR SakiiR

🎯
Focusing
View GitHub Profile
@SakiiR
SakiiR / libc.py
Created November 27, 2019 16:40
Using libc (rand, srand) etc using python :)
from ctypes import CDLL
libc = CDLL("libc.so.6")
now = int(floor(time.time()))
libc.srand(now)
print(libc.rand())
@SakiiR
SakiiR / r2.py
Last active July 15, 2023 14:08
Radare2 utils :)
class R2:
def __init__(self, file_path, args=[], debug=False):
self._r = r2pipe.open(file_path, args)
self._debug = debug
def cmd(self, cmd, debug=True):
if self._debug and debug:
print(f"Executing command: '{cmd}'")
res = self._r.cmd(cmd).rstrip("\n")
if self._debug and debug:
@SakiiR
SakiiR / bf.js
Created April 17, 2023 08:28
PlaidCTF - CSS bruteforce write up
const puppeteer = require('puppeteer');
const Jimp = require("jimp");
const DEBUG = false;
const URL = "https://plaidctf.com/files/css.74486b61b22e49b3d8c5afebee1269e37b50071afbf1608b8b4563bf8d09ef92.html"
const minimal_args = [
'--autoplay-policy=user-gesture-required',
'--disable-background-networking',
'--disable-background-timer-throttling',
This file has been truncated, but you can view the full file.
#include <stdio.h>
int main()
{
@SakiiR
SakiiR / toggle-hyperv-forfaceit.bat
Created July 21, 2022 13:24
HyperV toggle - Faceit =)
@echo off
echo Virtualization must be disabled to use anti-cheat clients like FACEIT and ESEA
echo.
net session >nul 2>&1
if %ERRORLEVEL% EQU 0 goto :chchchchoices
echo This script requires elevated privileges. Re-run as Administrator to continue
goto :exit
:chchchchoices
@SakiiR
SakiiR / fish_prompt.fish
Created July 17, 2017 15:11
Fish Prompt, BASE THEME: shellder
# Set these options in your config.fish (if you want to :])
#
# set -g theme_display_user yes
# set -g theme_hostname never
# set -g theme_hostname always
# set -g default_user your_normal_user
# Backward compatibility
@SakiiR
SakiiR / virtual.fish
Last active January 8, 2022 16:52
Prompt VirtualEnv Fish
function prompt_virtual_env -d "Display Python virtual environment"
if test "$VIRTUAL_ENV"
prompt_segment white black (eval (echo $VIRTUAL_ENV/bin/python --version) 2>&1 | sed 's/Python /Py|/g')
end
end
@SakiiR
SakiiR / lean.plugin.zsh
Created June 18, 2019 08:56
Modified Lean ZSH Theme
# ~/.zim/modules/prompt/external-themes/lean/lean.plugin.zsh
# lean prompt theme
# by Miek Gieben: https://github.com/miekg/lean
#
# Based on Pure by Sindre Sorhus: https://github.com/sindresorhus/pure
# Colors used: (see Vim's iceberg theme)
# 242 is the gray that is used.
# 110 is the blue.
# 150 is the yellow.
#
@SakiiR
SakiiR / nmap.sh
Created August 18, 2020 14:44
Some nmap scripts
nmapFast() {
if [[ -z $1 ]] ; then
echo "USAGE: nmapFast IP/Domain"
return
fi
item=$1
item2=$(echo -ne $item|tr '/' '_')
echo " +++ "
@SakiiR
SakiiR / exploit.html
Created October 25, 2021 09:38
ASIS CTF quals 2021 - Lovely Nonces
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Exploit</title>
</head>
<body>
<script>