Skip to content

Instantly share code, notes, and snippets.

View sohay666's full-sized avatar
😺
need some fishcake

Sohay sohay666

😺
need some fishcake
View GitHub Profile
@sohay666
sohay666 / php_upgrade.md
Created September 6, 2024 07:40 — forked from bvalerin/php_upgrade.md
Upgrade from PHP 7.3 to PHP 8 on Mac Os with Homebrew

Upgrading with Homebrew

Start by making sure brew is up-to-date:

brew update

Install Xcode Dev Tools

xcode-select --install

Upgrade with tap shivammathur/homebrew-php

brew tap shivammathur/php

@sohay666
sohay666 / gist:cda88ddaed9eb6a446db58ea00af0d0e
Created October 22, 2023 16:02
Cracking .zip passwords with John The Ripper (Mac OS)
/opt/homebrew/Cellar/john-jumbo/1.9.0/share/john/
$ brew install john-jumbo
$ export PATH=$PATH:/usr/local/share/john
$ zip2john YOUR_FILE.ZIP > zip_hash.txt
$ john --format=PKZIP --wordlist YOUR_WORDLIST_HERE zip_hash.txt
$ john --show zip_hash.txt
@sohay666
sohay666 / app-upload-patch.py
Created August 29, 2023 03:50
Example secure code for upload Flask
import os, imghdr, uuid
from flask import Flask, request, send_from_directory
from werkzeug.utils import secure_filename
app = Flask(__name__)
UPLOAD_FOLDER = 'uploads'
app.config['UPLOAD_EXTENSIONS'] = ['.jpg', '.png', '.gif']
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = 1 * 1024 * 1024 #max 1 mb
@sohay666
sohay666 / curl.md
Created August 19, 2023 03:27 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

/.git/config
/wp-admin/js/widgets/index.php
/wp-content/uploads/2020/10/casper_speed.php
/wp-logout.php
/gk.php
/wp-content/0day.php
/autoload_sitemap.php
/comment.php
/wp-content/uploads/archieving.php
/js/logs.php
@sohay666
sohay666 / xss-proctect.go
Last active December 23, 2022 13:04
xss sanitze for labstack
// secure code for middleware
example :
```
// only POST method can be overridden
e.Pre(middleware.MethodOverride())
// protect from xss
e.Use(middleware.SecureWithConfig(middleware.SecureConfig{
XSSProtection: "1; mode=block",
ContentTypeNosniff: "nosniff",
@sohay666
sohay666 / Learn CSS
Created June 25, 2022 07:47
Learn CSS
CSS Syntax
----------------------------------------
Css is for styling the HTML page, it's not a programing language
basicly it's only like this:
selector {
property1 : value;
property2 : value;
}
@sohay666
sohay666 / selenium
Last active June 25, 2022 07:46
Setup selenium in Ubuntu Server
sudo apt update
sudo apt -y upgrade
sudo apt-get -y install python3-pip python3-dev build-essential libssl-dev libffi-dev xvfb
pip3 install selenium
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
tar -xvzf geckodriver*
mv -v geckodriver /usr/local/bin
cd /usr/local/bin
chmod +x geckodriver
#checking geckodriver only execute like this: ./geckodriver
@sohay666
sohay666 / manualCheck.py
Last active May 10, 2022 10:02
Decode Abi sample with python
from datetime import datetime
from eth_abi import decode_abi
#author: sohay
#telegram chanel: https://t.me/listmicintoken
'''
I am curious about the bytecode from solidty, and how to decode that byte???
after read the doc of solidity about abi, it's easy to decode that as long as we know the abi function.
There's a sample i try to decode.
So i try to decode the bytecode to know the lockdate for the Liquidity of the token.
@sohay666
sohay666 / uaf.c
Last active May 4, 2022 09:17
Example Uaf(Use After Free)
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
/*
What is use after free (UAF) attack ?
- when the program tries to access a portion of memory after it has been freed that may force the program to crash
even we are able to overwrite the object and the worst part program you might get arbitrary code execution.