Skip to content

Instantly share code, notes, and snippets.

View toufik-airane's full-sized avatar

Toufik Airane toufik-airane

View GitHub Profile
@toufik-airane
toufik-airane / main.py
Created March 24, 2025 12:55
Agent-Driven Web Browsing Interface
import base64
import asyncio
import json
from playwright.async_api import async_playwright
from agents import Agent, Runner
agent = Agent(model="gpt-4o", name="Assistant", instructions="""
You are a UI automation assistant.
Your task is to analyze a given screenshot and return a valid JSON object for automation purposes.
https://github.com/search?o=desc&s=committer-date&type=Commits&q=toufik-airane
import sqlite3
import os
import hashlib
import pickle
from flask import Flask, request
app = Flask(__name__)
USERNAME = "admin"
PASSWORD = "password123"
#!/bin/sh
sudo launchctl stop com.fleetdm.orbit
sudo launchctl unload /Library/LaunchDaemons/com.fleetdm.orbit.plist
sudo pkill bastion-desktop || true
sudo rm -rf /Library/LaunchDaemons/com.fleetdm.orbit.plist /var/lib/orbit /usr/local/bin/orbit /var/log/orbit /opt/orbit/
sudo pkgutil --forget com.fleetdm.orbit.base.pkg || true
---
# These are optional elements. Feel free to remove any of them.
status: {proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)}
date: {YYYY-MM-DD when the decision was last updated}
deciders: {list everyone involved in the decision}
consulted: {list everyone whose opinions are sought (typically subject-matter experts); and with whom there is a two-way communication}
informed: {list everyone who is kept up-to-date on progress; and with whom there is a one-way communication}
---
# {short title of solved problem and solution}
{
"id": "VULN-001",
"title": "SQL Injection",
"description": {
"detailedDescription": "A vulnerability that allows attackers to execute arbitrary SQL commands.",
"detailedImpact": "The attacker can gain unautorized access to the database.",
"stepsToReproduce": [
"Navigate to the login page.",
"Enter a valid username and use the following payload as the password: ' OR '1'='1'; --",
"Submit the form.",
You're right — brute-forcing is mostly a waste of resources.
But since the weakest wallets have already been emptied, there aren’t many other viable options left.
### Brainflayer & Mnemonics
- **Brainflayer**: This method (brute-forcing known wordlists or passphrases) has been largely exhausted.
- **Mnemonic brute-force**: Generating keys from 12- or 24-word combinations (128-bit or 256-bit entropy) is computationally impractical at scale.
### RNG Bugs
- The **2015 Java-Android RNG bug** has already been fully exploited — any low-entropy wallets from that era are gone.
@toufik-airane
toufik-airane / gist:c1c57633645105a16fc68b5e04a58f62
Created April 23, 2024 07:03
Smart contract vulnerabilities
Reentrancy
Front-running
Integer overflow/underflow
Denial-of-Service (DoS)
Solidity-specific vulnerabilities
Uninitialized storage pointers
Unchecked external calls
Access control issues
Ether withdrawal issues
Transaction-ordering dependence (TOD)
## 🧠 Web3 Security Quizz
**⏱️ Duration**: 60 minutes
**📋 Format**: Multiple Choice Quiz (QCM)
**📈 Total Questions**: 12
---
### **1. Contract Interaction Logic**
You deployed both Contract X and Contract Y. You called `Y.increment_1()` followed by `Y.increment_2()`. What are the values of the `counter` variables in X and Y?
This file has been truncated, but you can view the full file.
{"43ea0313": ["setRitualFee(uint256)"], "270d13fb": ["isCoinIdUnique(uint16)"], "aec77b63": ["returnTokensInPool(address[],uint256[])"], "2442cfec": ["putBtoWithStc(uint256,uint256,bytes32,uint256,uint256,uint256,uint256,bytes32,bytes32,uint8)"], "010afc20": ["claimWrappedContractAdmin()"], "6165234c": ["setPermissions(address,bool)"], "cd63d930": ["distributionCap()"], "2302c948": ["EtherDank()"], "b0dc63eb": ["startWineryProductByRegulator(string,string,string,string,int256)"], "ad62bda5": ["setRoundLength(uint32)"], "03976b0e": ["setBattleProviderAddress(address,address)"], "bb11ed7e": ["rescueTokensInMultiplePolls(uint256[])"], "d82ce857": ["getPI_edit_26()"], "f0adda7d": ["setNextVersionAddress(address)"], "17753c44": ["DIGTREX()"], "6d78a434": ["IntegrativeWalletToken(uint256,uint256,uint256,address)"], "f5da16e9": ["RECHToken()"], "12192b00": ["getInitialHP(uint64,uint64,uint64)"], "71e3fdc4": ["moveMintTokens(address,address,uint256)"], "9304ddc8": ["setUnitCreationFee(uint256)"], "5142ba74": ["rollov