ntoaOaton

IP-Adressen in  Nummer umwandeln

$y=shift @ARGV||170171027;

if($y =~ /([0-9]{5,12})/) 
{
$x1 =$y & 255;
$y = $y >> 8;
$x2 =$y & 255;
$y = $y >> 8;
$x3 =$y & 255;
$y = $y >> 8;
$x4 =$y & 255;
print "ntoa $x4.$x3.$x2.$x1 \n";
}
# $y="10.36.154.147";
if($y =~ /([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/) 
{
$x=$1; 
$x = $x <<8;
$x+=$2; 
$x = $x <<8;
$x+=$3; 
$x = $x <<8;
$x+=$4; 
# print "if $1 $2 $3 $4 richtig 170171027";
print "aton $x\n";
}

mail send mit ssmtp

root@wehner-Aspire-V3-771:~# ssmtp -v hans-peter.wehner@t-online.de
test
sds
sd
.
[<-] 220 smtp.gmail.com ESMTP 17sm5576506wmy.15 - gsmtp
[->] EHLO wehner.hp@gmail.com
[<-] 250 SMTPUTF8
[->] STARTTLS
[<-] 220 2.0.0 Ready to start TLS
[->] EHLO wehner.hp@gmail.com
[<-] 250 SMTPUTF8
[->] AUTH LOGIN
[<-] 334 VXNlcm5hbWU6
[->] d2VobmVyLmhw
[<-] 334 UGFzc3dvcmQ6
[<-] 235 2.7.0 Accepted
[->] MAIL FROM:<wehner.hp@gmail.com>
[<-] 250 2.1.0 OK 17sm5576506wmy.15 - gsmtp
[->] RCPT TO:<hans-peter.wehner@t-online.de>
[<-] 250 2.1.5 OK 17sm5576506wmy.15 - gsmtp
[->] DATA
[<-] 354  Go ahead 17sm5576506wmy.15 - gsmtp
[->] Received: by wehner.hp@gmail.com (sSMTP sendmail emulation); Tue, 05 Jan 2016 23:20:07 +0100
[->] From: "root" <wehner.hp@gmail.com>
[->] Date: Tue, 05 Jan 2016 23:20:07 +0100
[->] test
[->] sds
[->] sd
[->] .
[->] 
[->] .
[<-] 250 2.0.0 OK 1452032418 17sm5576506wmy.15 - gsmtp
[->] QUIT
[<-] 502 5.5.1 Unrecognized command. 17sm5576506wmy.15 - gsmtp
root@wehner-Aspire-V3-771:~#

Python search dir

from datetime import datetime, date, time

dt = datetime.now()

print dt.strftime(„%A, %d. %B %Y %I:%M%p“)

import fnmatch

import os

for file in os.listdir(‚.‘):

    if fnmatch.fnmatch(file, ‚*py‘):

        print file