Skip to content

Instantly share code, notes, and snippets.

View luk0y's full-sized avatar
🎯
Focusing

luk0y luk0y

🎯
Focusing
View GitHub Profile
@luk0y
luk0y / gen-rsa-pubkey.sh
Created November 10, 2020 06:23 — forked from icetan/gen-rsa-pubkey.sh
Create a public RSA key from modulus and exponent on the command line
#!/bin/bash
set -e
b2hex() { echo -n $1|base64 --decode | xxd -p -u | tr -d \\n; }
modulus=$(b2hex u2/nlDLMbqLY+XBnWlqHv74a/wvmPoefKv+5NkTU0sbQAEMN7Gar9Hgp50uMUQhiOhwO6L4hezrY021etPyh2Q==)
exponent=$(b2hex AQAB)
asn1conf=$(echo -e "asn1=SEQUENCE:pubkeyinfo\n[pubkeyinfo]\nalgorithm=SEQUENCE:rsa_alg\npubkey=BITWRAP,SEQUENCE:rsapubkey\n[rsa_alg]\nalgorithm=OID:rsaEncryption\nparameter=NULL\n[rsapubkey]\nn=INTEGER:0x$modulus\ne=INTEGER:0x$exponent" | openssl asn1parse -genconf /dev/stdin -noout -out /dev/stdout | base64)
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh
Goa
Gujarat
Haryana
Himachal Pradesh
Jammu and Kashmir
@luk0y
luk0y / aes-ecb-128.py
Created May 29, 2021 05:16
AES ECB 128 bit encryption in python3. 100% working
from Crypto import Random
from Crypto.Cipher import AES
import base64
from pkcs7 import PKCS7Encoder
# References
# AES 128 Bit ECB mode https://www.devglan.com/online-tools/aes-encryption-decryption
# https://stackoverflow.com/a/64545969
@luk0y
luk0y / a.txt
Created September 10, 2021 20:05
aiohttp==3.7.4.post0
async-timeout==3.0.1
asyncio==3.4.3
attrs==21.2.0
backports.zoneinfo==0.2.1
certifi==2021.5.30
chardet==4.0.0
charset-normalizer==2.0.4
dateparser==1.0.0
idna==3.2
@luk0y
luk0y / file converter.txt
Created December 9, 2023 10:51
failed to read PNG signature: file does not start with PNG signature. - apktool
Have you ever gone through this error while building apk using apktool?
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_l.png: error: failed to read PNG signature: file does not start with PNG signature.
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_l.png: error: file failed to compile.
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_r.png: error: failed to read PNG signature: file does not start with PNG signature.
W: /home/nnnn/Desktop/Android/com.package/res/drawable-hdpi/arrow_t_r.png: error: file failed to compile.
brut.androlib.exceptions.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):
Here's the solution:
@luk0y
luk0y / extenstion.js
Last active September 12, 2024 07:07
Remove "Take Screenshot" on Ubuntu from window context Menu
// Tested on Ubuntu 24.04. Updated based on the code shared here https://www.reddit.com/r/gnome/comments/vj2s53/comment/idi59rf/
// Follow this guide to create extention https://gjs.guide/extensions/development/creating.html. Add this code in extension.js and don't forget to enable the extension.
// Fan of ALT + Space for minimising windows
import { WindowMenu } from 'resource:///org/gnome/shell/ui/windowMenu.js';
export default class MyTestExtension {
constructor() {
this._originalBuildMenu = null;
}