TwitterRSS Feed

Esc.sh

Random notes from an Engineer

Fixing the weird iptables error

I am gonna make it short and simple. This issue is something I have seen on so many Debian 7 servers. The Problem It goes like this. You're trying to list your iptables rules and you're seeing weird stuff. [email protected]~# iptables -L WARNING: Could not open 'kernel/net/netfilter/x_tables.ko': No such file or directory FATAL: Could not open 'kernel/net/ipv4/netfilter/ip_tables.ko': No such file or directory iptables v1.4.2: can't initialize iptables table filter': iptables who? (do you need to in
Mansoor A
Mansoor A
1 min read

Linux Reboot System call and Linus' Birthday

Today (28-Dec) is Linus Torvald, Linux creator's birthday and I wanted to share with you an easter egg hidden in the Linux reboot() system call. From man page of reboot SYNOPSIS: -------- #include <unistd.h> #include <linux/reboot.h> int reboot(int magic, int magic2, int cmd, void *arg); DESCRIPTION: ------------ The reboot() call reboots the system, or enables/disables the reboot keystroke (abbreviated CAD, since the default is Ctrl-Alt-Delete; it can be changed using loadkeys(1)). This syst
Mansoor A
Mansoor A
1 min read
HomePage, Ops

Pritunl - Easiest way to setup OpenVPN

Setting up OpenVPN on your own server can be real pain in the a**. I know a lot of you would agree with me there. Today, I'll show you guys how to setup OpenVPN and manage users without any hiccups. I don't think this can get any easier. Enter Pritunl. You install a few packages and you're done. You have a fully functional VPN server with a web interface where you can manage your users, servers, organizations etc. What is Pritunl? Pritunl is a distributed enterprise vpn server built using the O
Mansoor A
Mansoor A
3 min read

[Kali Linux] Fixing Wpscan due to broken dependencies

Let's keep it short and simple. You have a problem with Wpscan on your Kali Linux machine and you need to fix this thing and get to work. So, yeah. This is how the problem looks like. When you try to run wpscan, it says "cannot load such file -- nokogiri/nokogiri". It basically means that a ruby gem that is required by wpscan is not installed. This probably happened after an update. [email protected]:~# wpscan --help [ERROR] cannot load such file -- nokogiri/nokogiri Anyway, the fix is quite simple.
Mansoor A
Mansoor A
1 min read
HomePage, Ops

[SSHUTTLE] SSH tunneling made simple

Why SSH Tunnel? Consider the situation you are in a network you don't trust, like a coffee house. You never know who is snooping around the network for any kind of information they can collect. Or you are in a corporate network where the service you need is disabled in the network level, like spotify, or even steam. To make it worse, you do not have access to a VPN either. What do you do? Well, if you have an SSH account in a remote server, that could serve you well in this situation What is an
Mansoor A
Mansoor A
2 min read

Crashing systemd in one command by any user in the system

This post is in no way aimed at bashing systemd. It simply demonstrates a simple but crazy bug in systemd that could cause so much trouble for the sysadmins. NOTIFY_SOCKET=/run/systemd/notify systemd-notify "" Run the above command on a systemd machine, by any user and you will cause a DOS on that machine. Without getting much into the technical aspects of the bug, I'll demonstrate what actually happens if someone run the above command. Check this out: I'm running the command on a Linux Min
Mansoor A
Mansoor A
1 min read

Top Five VPNs for 2016

When it comes to anonymity on the web, there is no such thing as a simple an ultimate solution, and any who makes such a claim is simply lying. Nevertheless, VPN services are highly versatile and tools that can greatly increase your security and privacy when using the Internet. Here is a list of 5 VPNs that seems to do the job. Please note that I have not used them personally. 1. BufferedVPN The small Hungarian company keeps everything simple, but nevertheless focused – it keeps no usage logs
Mansoor A
Mansoor A
3 min read

OSX, iTerm2, ZSH and the tab title

TL;DR Add the following to your ~/.zshrc and use the command tt <tab name> to rename your tab DISABLE_AUTO_TITLE="true" tt () { echo -e "\033];[email protected]\007" } -------------------------------------------------------------------------------- iTerm2 is the best terminal emulator out there for OS X. No questions there. ( Or is there a better one I haven't tried yet? ) And ZSH is my favourite shell. Well, it's the favourite shell of a lot of people. If you're the kind of person who will have a ton
Mansoor A
Mansoor A
1 min read
HomePage

Setting up Arduino IDE

If you're here, you probably have a very good idea about what Arduino is and you just want to setup your local machine (Mac OS X, Ubuntu or any other Linux Distro, or Windows ). Let's jump right into it, rather than blabbing about other stuff you actually don't care about at this moment. Installing the IDE First of all, you have to download and install the software bundle. Ubuntu and other Debian based systems Open up a terminal and issue the following command to install the Arduino IDE and ot
Mansoor A
Mansoor A
2 min read

FFmpeg installation script for CentOS

Installing FFmpeg can be a PIA. It became a lot easier recently. But, still some people face issues when trying to get FFmpeg working on their system. Well, here is one script I made when I had to install FFmpeg on several servers a while back. It works. Thought I'd share it with you. #!/bin/bash # ffmpeg installation script for centos # __author__ : Mansoor (digitz.org) function banner { echo -en " +++++++++++++++++++++++++++++++++++++++++ + FFmpeg Installer for CentOS + +++++
Mansoor A
Mansoor A
4 min read

Best Markdown editor for Mac

I started using Markdown very recently - when I moved my blog from Wordpress to Jekyll. At first it seemed difficult, but once I got used to it, there was no going back. At first, I used Sublime Text to write Markdown. It was kind of OK, but there was something missing. I eventually used Atom and Visual Studio Code too. They both worked pretty good, as far as features are concerned. Then I saw this beautiful little app called MacDown. And I knew it at the first look itself that this is the one
Mansoor A
Mansoor A
1 min read

Perl CGI scripts and PATH env variable

If you are trying to invoke system commands from a Perl CGI script, chances are it won't work all the time. For example, if your CGI script has something like system('uptime'); And if the location of the binary "uptime" is not in the "PATH", it will not work. The solution is pretty simple, set the value of the environment variable whenever the script is being executed. In perl, all environment variables are stored in a special has %ENV You can easily see the value of the PATH variable by inc
Mansoor A
Mansoor A
1 min read