Skip to content

Instantly share code, notes, and snippets.

@mach1el
mach1el / htb-little-tommy.py
Created January 15, 2019 04:13
Get your flag at HTB pwn challenge Little Tommy
import re
import sys
import socket
import telnetlib
from hexdump import hexdump
from struct import pack, unpack
current_chunk = 0
current_memo_chunk = 0
@mach1el
mach1el / disable-keyring.txt
Created February 23, 2019 08:47
Disable keyring
sudo mv /usr/bin/gnome-keyring-daemon /usr/bin/gnome-keyring-daemon-old
sudo killall gnome-keyring-daemon
@mach1el
mach1el / 10-udisks2.rules
Created February 25, 2019 04:52
udisks2 + polkit: Allow unauthenticated mounting
// See the polkit(8) man page for more information
// about configuring polkit.
// Allow udisks2 to mount devices without authentication
// for users in the "wheel" group.
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
action.id == "org.freedesktop.udisks2.filesystem-mount") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
@mach1el
mach1el / pci_pm.rules
Created March 28, 2019 00:28
/etc/udev/rules.d/pci_pm.rules
# blacklist for pci runtime power management
SUBSYSTEM=="pci", ATTR{vendor}=="0x1234", ATTR{device}=="0x1234", ATTR{power/control}="on", GOTO="pci_pm_end"
SUBSYSTEM=="pci", ATTR{power/control}="auto"
LABEL="pci_pm_end"
@mach1el
mach1el / 70-synaptics.conf
Created April 4, 2019 12:59
/etc/X11/xorg.conf.d/70-synaptics.conf
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" "on"
@mach1el
mach1el / 30-touchpad.conf
Created July 30, 2019 18:07
/etc/X11/xorg.conf.d/30-touchpad.conf
Section "InputClass"
Identifier "devname"
Driver "libinput"
MatchIsPointer "on"
MatchIsKeyboard "on"
MatchIsTouchpad "on"
MatchIsTouchscreen "on"
Option "Tapping" "on"
Option "ClickMethod" "clickfinger"
Option "NaturalScrolling" "true"
@mach1el
mach1el / powertop.service
Created December 5, 2019 13:42
/etc/systemd/system/powertop.service
[Unit]
Description=Powertop tunings
[Service]
Type=exec
ExecStart=/usr/bin/powertop --auto-tune
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
@mach1el
mach1el / start_smb.sh
Created December 20, 2019 02:39
Start share smb service on linux
#!/bin/bash
rm -rf /tmp/smb-share
echo '[+] Making SMB share directory'
mkdir /tmp/smb-share
echo '[+] SMB directory made at /tmp as smb-share'
ls -l /tmp/smb-share
echo '[+] Configuring permissions on SMB share created'
chmod 0555 /tmp/smb-share
chown -R nobody:nogroup /tmp/smb-share
echo '[+] Permissions added!'
@mach1el
mach1el / libinput-gestures.conf
Created January 13, 2020 10:01
/etc/libinput-gestures.conf
gesture swipe up 3 xdotool key alt+Tab
gesture swipe down 3 xdotool key super+F11
gesture swipe left 3 xdotool key alt+Left
gesture swipe right 3 xdotool key alt+Right
gesture swipe left_down 3 xdotool key control+w
gesture swipe right_down 3 xdotool key control+shift+t
gesture swipe right 4 xdotool key shift+super+Left
@mach1el
mach1el / lightdm.conf
Created July 9, 2020 08:53
Lightdm config file
#
# General configuration
#
# start-default-seat = True to always start one seat if none are defined in the configuration
# greeter-user = User to run greeter as
# minimum-display-number = Minimum display number to use for X servers
# minimum-vt = First VT to run displays on
# lock-memory = True to prevent memory from being paged to disk
# user-authority-in-system-dir = True if session authority should be in the system location
# guest-account-script = Script to be run to setup guest account