Skip to content

Instantly share code, notes, and snippets.

@freetom
freetom / OpenVPN_over_TOR.md
Last active October 9, 2023 09:21
OpenVPN over TOR - just in case

OpenVPN over TOR

Note that the VPN interface in vpn config has to be tun and the protocol tcp.

Add the following to you vpn-tor.conf:

socks-proxy 127.0.0.1 9050
up-delay
route x.x.x.x 255.255.255.255 192.168.1.1
@freetom
freetom / setup_email_server_instructions.md
Last active November 20, 2023 18:08
Setup email server (Postfix+Dovecot+OpenDKIM)

Introduction

To get emails on a server belonging to your domain.tld you need a Mail Transfer Agent (MTA) (e.g: Postfix) and a Mail Delivery Agent (MDA) (e.g: Dovecot).

Additionally, you need SPF and DKIM to be configured, to comply with modern RFCs (otherwise emails coming from your server will be refused by e.g: Gmail.)

The following instructions are to setup:

  • Postfix, using SMTP (port 25) and Submission (port 587)
  • Dovecot, using IMAPs (port 993)
  • OpenDKIM will listen only for connections coming from localhost on port 8891
@freetom
freetom / Linux Drivers CLI CheatSheet.md
Created September 9, 2023 15:42
Linux Drivers CLI CheatSheet

Note: A driver is a module if it's built so that it can be loaded and unloaded at runtime, otherwise it can only be built-in into the Kernel at compile time



List all drivers/modules

lsmod


@freetom
freetom / gist:9419895d0fdc04327d9cf7f039dcba7e
Created August 23, 2023 14:01
ffmpeg increase media's volume
# increase audio volume by 50%
ffmpeg -i input.wav -af "volume=1.5" output.wav
Append the following to the end of `/etc/sudoers`
`USERNAME ALL=(ALL) NOPASSWD: ALL`
Substitute `USERNAME` with your user name.
@freetom
freetom / auditd_tips.md
Created January 5, 2023 09:56
Auditd tips and notes

Configuration file for auditd is: /etc/audit/auditd.conf


List configured rules: auditctl -l

The -l option lists all current active rules and, if you see the -a never,task line shown above, none of the rules following it will log anything. This rule, which is often a default in new auditd installations, is telling the daemon to append (-a) a rule to the task list (as in the list of tasks the kernel is running — don’t worry about this just yet), which will stop auditd from ever recording anything.


@freetom
freetom / sime-photo-previewer.html
Last active December 16, 2022 22:03
This is a simple HTML webpage which can be used locally, to download and display the low quality version of the given SIMEPHOTO's pictures codes
<!--
This is a simple HTML webpage which can be used locally, to download and display the low quality version of the given SIMEPHOTO's pictures codes
The practical purpose is that photographers who use SIMEPHOTO gets sales-reports which only states the picture code.
To make it easier to see which pictures got sold, this simple webpage allows to download and display all the pictures given a list of codes.
Examples codes are the followings:
SIM-1044624
SIM-1044643
# Android Proxy
## Set proxy on device
adb shell settings put global http_proxy x.x.x.x:8080
## Get proxy
adb shell settings get global http_proxy
---
@freetom
freetom / gist:3ec72ad882c4bd31e3cff6377dce3265
Created October 18, 2022 18:43
.ts - Video Transport Stream Files Merging
cat `cat files` | ffmpeg -i pipe: -c:a copy -c:v copy output.mp4
e.g: cat 1.ts 2.ts 3.ts | ffmpeg -i pipe: -c:a copy -c:v copy output.mp4
@freetom
freetom / gist:2a446a226d0e98807c8b0c1111ef2def
Created June 9, 2018 09:14
CVE-2018-12072 & CVE-2018-12073
CVE-2018-12072
[Description]
An issue was discovered in Cloud Media Popcorn A-200 03-05-130708-21-POP-411-000 firmware.
It is configured to provide TELNET remote access (without a password) that
pops a shell as root. If an attacker can connect to port 23 on the device, he can
completely compromise it.
------------------------------------------