Winexe - Winexe remotely executes commands on WindowsNT/2000/XP/2003 systems from GNU/Linux

Winexe remotely executes commands on WindowsNT/2000/XP/2003 systems from GNU/Linux (probably also other Unices capable to compile Samba4).


apt-get install winexe



SED examples

sed '/^$/d' $file # remove empty lines
sed 's/replace/perpleaxed/g' # replace text
var=`echo "Hello\,World" | sed 's/\\\,/,/'`; echo $var --> "Hello,World" # remove backslash
sed -n 'H; /^CHECK/h; ${g;p;}' f1.txt # sed print from last occurrence match until the end of file
sed -n '/<pattern>/,$ p' <file> # from pattern to end of file
sed -n '/<pattern1>/,/<pattern2>/ p' <file> # from pattern1 to pattern2
sed -n '1,/<pattern>/ p' <file> # print from the first line until pattern is matched

Linux Proxy settings


edit /etc/apt/apt.conf or /etc/apt/apt.conf.d/41proxy

Acquire::http::proxy "http://<proxy>:<port>/";

In terminal:

export http_proxy=


echo "http_proxy=" >> ~/.bashrc

Samba share - hidden directory


  comment = Share Folder
  path = /media/data/share
  public = yes
  browseable = No
  writable = yes
  create mask = 0777
  directory mask = 0777
  force user = user
  force group = user

service smbd restart


DU disk usage without details for the subdirectories

 du --max-depth=1 | sort -n -k 1

LAMP server

If you alter your httpd.conf file to include the following two lines the presence, and version, of the PHP module will be hidden - as will the version of Apache you're using:
ServerSignature Off
ServerTokens production

/etc/init.d/apache2 reload

PHP is a fantastic language and is perfect for you dynamic mySQL driven site, but the flexibility of it at the same time makes it vulnerable for external expoits. Here are a few tips of how to secure your php.ini !

Edit our php.ini by logging into shell with root :
vim /usr/lib/php.ini

IPTables - masquerade

1. Nastavte v klikátku pevnou IP karty,která je připojená k ostatním počítačům v DOMACÍ SÍTI - například a masku podsítě 2. Nějaký dodatečný nastavení NAT - ethX je karta připojená k internetu Kód: {syntaxhighlighter brush: php}sudo iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE{/syntaxhighlighter} 3. Povolení IP forwardingu (potřebujete terminál superuživatele, ne příkaz sudo!) Kód: sudo gnome-terminal (resp. konsole) echo 1 > /proc/sys/net/ipv4/ip_forward 4. Nainstalujeme dnsmasq a ipmasq (to je na sdílení připojení nejdůležitější...

IPTables - QOS


# NOTE!! - This script assumes your kernel has been patched with the
# appropriate HTB queue and IMQ patches available here:
# (subnote: future kernels may not require patching)

opts="start stop status"

depend() {
need net





Subscribe to Linux