Skip to content

Instantly share code, notes, and snippets.

View momenbasel's full-sized avatar
💭
👨‍💻👨‍💻

Moamen Basel momenbasel

💭
👨‍💻👨‍💻
View GitHub Profile
@mberman84
mberman84 / gist:f092a28e4151dd5cecebfc58ac1cbc0e
Last active June 23, 2024 15:34
Steps to install Textgen WebUI
# this tutorial assumes conda and git are both installed on your computer
conda create -n tg python=3.10.9
conda activate tg
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
git clone https://github.com/oobabooga/text-generation-webui.git
cd text-generation-webui
pip install -r requirements.txt
# GPU only:
@ajxchapman
ajxchapman / burp_scopes.py
Created March 25, 2020 19:53
Turn a list of scopes into a Burpsuite target import JSON configuration file
import json
import re
import sys
scopes = []
f = sys.stdin
if len(sys.argv) == 2:
f = open(sys.argv[1])
scopes_defs = [x.strip().lower() for x in f.readlines() if len(x.strip())]
@TarlogicSecurity
TarlogicSecurity / kerberos_attacks_cheatsheet.md
Created May 14, 2019 13:33
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@LiveOverflow
LiveOverflow / docker-compose.yml
Last active January 3, 2022 15:42
flaglab - Real World CTF 2018
web:
image: 'gitlab/gitlab-ce:11.4.7-ce.0'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.example.com'
redis['bind']='127.0.0.1'
redis['port']=6379
gitlab_rails['initial_root_password']=File.read('/steg0_initial_root_password')
@taylorotwell
taylorotwell / weather.sh
Last active August 27, 2019 13:40
Weather CLI
alias weather='curl -s wttr.in | sed -n "1,7p"'
@zzOzz
zzOzz / gist:1a12485befeb1ffd600732ffa8923761
Created February 1, 2017 19:56
Restore Linux file "rm"
If a running program still has the deleted file open, you can recover the file through the open file descriptor in /proc/[pid]/fd/[num]. To determine if this is the case, you can attempt the following:
$ lsof | grep "/path/to/file"
If the above gives output of the form:
progname 5383 user 22r REG 8,1 16791251 265368 /path/to/file
take note of the PID in the second column, and the file descriptor number in the fourth column. Using this information you can recover the file by issuing the command:
$ cp /proc/5383/fd/22 /path/to/restored/file
If you're not able to find the file with lsof, you should immediately remount the file system which housed the file read-only:
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 3, 2024 12:57
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jclulow
jclulow / awk.js
Created November 10, 2011 05:18
Awk in Javascript?
/*
* map predicate to code...
* /regex/ --> function (groups, next)
* ^ ^ function to call if we should
* | \---skip remaining predicates for this line
* \- e.g. groups[1] is first regex group, etc
*/
function line(predicate, codeblock) {
return ({ predicate: predicate, codeblock: codeblock });