Skip to content

Instantly share code, notes, and snippets.

View zycon's full-sized avatar
🎯
Focusing

Tibin Lukose zycon

🎯
Focusing
View GitHub Profile
#!/bin/bash
echo "folder path, . folder current directory"
read SOURCE_FOLDER
echo "userid"
read CRED
echo "hostname"
read HOST
ZIP_FILE="/tmp/backup.zip"
NEXTCLOUD_URL="https://"$HOST"/remote.php/dav/files/"$CRED"/docker-try/"
@zycon
zycon / gist:9c276602cf7b5ee9681266cb19d50afe
Created October 24, 2023 18:23
missing profile snap.microk8s.microk8s.
apparmor_parser --add /var/lib/snapd/apparmor/profiles/snap.microk8s.*
@zycon
zycon / gist:e01d44cdf1b995e0bc825fbda318c0dd
Created June 21, 2023 08:58
Simple python 2 webserver debug
Python 2.7 webserver to debug incoming traffic
python -m SimpleHTTPServer 80
@zycon
zycon / gist:856c7eac09612287f81f4dc08d509d96
Created April 30, 2023 17:53
Bash Loop iteration on commands
// converting canon cr2 images to jpeg
//create a folder named "Converted"
for i in *.CR2; do sips -s format jpeg $i --out Converted/$i.jpg;done
screen - To create a screen
screen -x [screen id] - Connect / Attach to a specific running screen.
Ctrl + D - while in a screen to Terminate / Stop a screen from running.
Ctrl + A, Then press D - while in a screen to detach from screen without disturbing it.
killall screen - Detach or terminate all screens.
##Creating user
CREATE USER read_u PASSWORD 'any-password';
##Creating role
create role client_readonly;
###Select the database that you need to grant the access then execute the queries
##Select public table too if neccessary
GRANT USAGE ON SCHEMA client_schema TO client_readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA client_schema TO client_readonly;
##Making sure the future created tables in the schema have this rule enabled
@zycon
zycon / gist:f598f5c0df7b608756d0079ee23928b9
Created March 19, 2021 17:21
Run program background linux
run.sh > /dev/null 2>&1&
### FILTER PODS
kubectl delete pods --field-selector=status.phase=Pending
### GET IMAGES
kubectl get pods -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c
### Delete pods not running
kubectl get pods | grep -v Running | awk '{print $1}' | xargs kubectl delete pod
@zycon
zycon / portopen.ps
Created September 23, 2020 07:17
windows-port opening
$listener = [System.Net.Sockets.TcpListener]6655
$listener.Start();
$listener.Stop();
@zycon
zycon / readme.md
Last active June 18, 2020 20:08
openvpn http traffic to burp suite

Sometime it would be hard to configure proxy in smartphone for insepcting the packets. And some apps might not respect it too, the quick solution which came into my mind is to configure an openvpn server in laptop and then forward the http packets to burp in the host machine Steps

  1. Configure an openvpn server with a client in a host
  2. Configure burp suits to listen on all interface with invisible proxy listening on port 8080
  3. forward the packets by applying the iptables in NAT entry
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 443 -j REDIRECT --to-port 8080

you may need to root your android and push the burp root certificates to the trusted system ca's to intercept the app traffic