Skip to content

Instantly share code, notes, and snippets.

View astraube's full-sized avatar
🏠
Working from home

Andre Straube astraube

🏠
Working from home
View GitHub Profile
@astraube
astraube / android-adb-tap-center-screen.sh
Created August 31, 2024 22:30
Android ADB Script Tap the Center of the Screen in a Loop
#!/bin/bash
# Number of iterations
count=10
# Screen dimensions (example: 1080x1920)
width=1080
height=1920
# Calculate center
@astraube
astraube / android-adb-swipe-screen-loop.sh
Created August 31, 2024 22:29
Andrid ADB Script to Loop for Continuous Bottom-Up Movement
#!/bin/bash
# Number of iterations
count=10
# Screen dimensions (example: 1080x1920)
width=1080
height=1920
# Start and end coordinates for swipe
@astraube
astraube / package.json
Created August 29, 2024 19:41
Get the holders of a Solana token
{
"name": "solanaTokenHolders",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"keywords": [],
"author": "",
@astraube
astraube / potential-bad-domains.txt
Last active August 29, 2024 19:42 — forked from 0xngmi/potential-bad-domains.txt
List f domains associated with squarespace at risk of being hacked
List of domains that are registered with squarespace and thus could be vulnerable:
celer.network
pendle.finance
karak.network
compound.finance
hyperliquid.xyz
dydx.exchange
thorchain.com
threshold.network
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key
@astraube
astraube / via-spl-token.ts
Last active August 29, 2024 19:43
Solana SPL Token Authority Instruction
import { createSetAuthorityInstruction, AuthorityType } from '@solana/spl-token';
import { Transaction } from '@solana/web3.js';
const instruction = createSetAuthorityInstruction(
token.publicKey,
closeAuthority.publicKey,
AuthorityType.CloseAccount, // AuthorityType.MintTokens | AuthorityType.FreezeAccount | ...
null
);
@astraube
astraube / TopActivityWatcher.java
Last active August 29, 2024 19:43
Watcher Top Activity
package com.straucorp.core;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.os.Handler;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
package com.straucorp.datastorepreferences
/**
* @author Andre Straube - Created on 29/08/2021
*/
import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.SharedPreferencesMigration
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.intPreferencesKey
package com.straucorp.datastorepreferences.delegates
/**
* @author Andre Straube - Created on 29/08/2021
*/
import android.content.Context
import android.content.SharedPreferences
import androidx.annotation.GuardedBy
import kotlinx.coroutines.*
import kotlin.properties.ReadOnlyProperty
@astraube
astraube / RootUserChecker.kt
Last active August 29, 2024 19:43
Android root user checker
package com.github.astraube
import android.util.Log
import java.io.File
/**
* @author Andre - Created on 13/07/2021
*/
object RootChecker {