Skip to content

Instantly share code, notes, and snippets.

View prashanthpai's full-sized avatar

Prashanth Pai prashanthpai

View GitHub Profile
@prashanthpai
prashanthpai / python_getdents.py
Last active July 5, 2024 21:26
Python wrapper for getdents/getdents64() syscall
#!/usr/bin/env python
import os
import sys
import ctypes
import struct
from ctypes.util import find_library
# struct linux_dirent64 {
# ino64_t d_ino; /* 64-bit inode number */
# off64_t d_off; /* 64-bit offset to next structure */
Testing presentation from gist
Go Go Go
14:00 9 Mar 2017
Gopher
* Title of slide or section (must have asterisk)
Some Text
[ppai@gd2-1 xlator-sym-go]$ ./main /usr/local/lib/glusterfs/3.12dev
/usr/local/lib/glusterfs/3.12dev/auth/addr.so
auth.addr.*.allow
auth.addr.*.reject
auth.ip.*.allow
/usr/local/lib/glusterfs/3.12dev/auth/login.so
auth.login.*.allow
auth.login.*.password
@prashanthpai
prashanthpai / freeotp_backup.md
Created September 24, 2018 04:15 — forked from kontez/freeotp_backup.md
A guide to back up and recover 2FA tokens from FreeOTP (Android)

Backing up and recovering 2FA tokens from FreeOTP

Backing up FreeOTP

Using adb, create a backup of the app using the following command:

adb backup -f freeotp-backup.ab -apk org.fedorahosted.freeotp
@prashanthpai
prashanthpai / json2toml.py
Created February 23, 2022 05:01
Convert a json file to toml file using Python
#!/usr/bin/env python
# Prerequisite:
# pip install toml
import json
import sys
import toml