Zum Inhalt springen

Biotecs

Mitglieder
  • Gesamte Inhalte

    283
  • Benutzer seit

  • Letzter Besuch

Beiträge von Biotecs

  1. 
    $uptime_array = explode(" ", exec("cat /proc/uptime"));
    
         $seconds = round($uptime_array[0], 0);
    
         $minutes = $seconds / 60;
    
         $hours = $minutes / 60;
    
         $days = floor($hours / 24);
    
         $hours = floor($hours - ($days * 24));
    
         $minutes = floor($minutes - ($days * 24 * 60) - ($hours * 60));
    
         $seconds = floor($seconds - ($days * 24 * 60 * 60) - ($hours * 60 * 60) - ($minutes * 60));
    
         $uptime_array = array($days, $hours, $minutes, $seconds)
    
    
    echo $uptime_array[0] . " Tage " . $uptime_array[1] . " Std " . $uptime_array[2] . " Min\n";
    
    

    so hab ich es geregelt ;)

    mfg

  2. Hallo,

    ich bin gerade dabei zu versuchen mir ein kleines Mailscript zu schreiben, was mir Mails anzeigt. Nun habe ich zwei sehr merkwürdige Phänomene. Hier erstmal das Script:

    
    #!/usr/bin/perl -w
    
    use CGI::Carp qw(fatalsToBrowser);
    
    use CGI qw(:standard);
    
    use strict;
    
    
    use vars qw($destination_mail $file $mail $path $q $source_mail $subject
    
    			@filelist @maillist);
    
    
    # Path to the maildirectory
    
    $path = "/home/benutzer/Maildir/new";
    
    
    # open directory and read filenames
    
    opendir(DIR, $path);
    
    while($file = readdir(DIR)) {
    
    	next if($file eq '.' || $file eq '..');
    
    	push(@filelist,$file);
    
    }
    
    closedir(DIR);
    
    
    # open and save mailfiles in array
    
    for (@filelist) {
    
    	open MAIL, "<$path/$_"
    
    		or die "Kann Mailfile $_ nicht öffnen: $!";
    
    	while (<MAIL>) {
    
    		$mail .= $_;
    
    	}
    
    	close MAIL;
    
    	push(@maillist,$mail);
    
    }
    
    
    # HTML Output
    
    print header;
    
          start_html('Mailtest');
    
    
    if(@maillist) {
    
    	for (@maillist) {
    
    		($source_mail) = /From:\s(.*)/;
    
    		($destination_mail) = /To:\s(.*)/;
    
    		($subject) = /Subject:\s(.*)/;
    
    	}
    
    	print
    
    		"<b>Von: </b>$source_mail<br>\n",
    
    		"<b>An: </b>$destination_mail<br>\n",
    
    		"<b>Betreff: </b>$subject<br>\n",
    
    		"<br><br>\n";
    
    } else {
    
    	print "Keine neuen Mails vorhanden!<br>";
    
    }
    
    
    print end_html;
    
    

    Nun das 1. komische Ding:

    Wenn ich das Script so im Browser abrufe "funktioniert" es (also nicht korrekt aber das siehe 2. Problem). Wenn ich allerdings statt perl -w nur perl mache, dann bekomme ich im Browser nen Internal Error und auf der Konsole sagt er mir ..:Command not found. Ich habe solch ein Problem noch nie gehabt, zumal andere Scripte ganz normal nur mir #!/usr/bin/perl ja auch laufen. Hat jemand eine Idee woran das liegen kann?

    Das 2. komische Ding:

    Wenn ich die CGI Sachen wie header, start_html usw. aus dem Script entferne (weil mit ihnen ja immer: (offline mode: enter name=value pairs on standard input) auf der Konsole kommt) und auf der Konsole starte, dann funktioniert es einwandfrei. Es stehen also in Felder "Von.." usw. die richtigen Sachen und er hat damit die Mail auch eingelesen. Wenn ich es aber im Browser aufrufe geht er in den elsezweig und zeigt mir an "Keine neuen Mails vorhanden!", obwohl ja nachweislich welche da sind. Er dreht es irgendwie genau um. Woran kann das liegen?

    Ich bin für jeglichen Tip dankbar (auch Anregungen, wie ich es einfacher oder besser programmieren kann nehme ich gern an!)!

    mfg

  3. Mir ist noch kein Fall von "cracking" in ein Firmennetzwerk bekannt, bei denen der AP durch WPA verschlüsselt war. Mir sind aber schon mehrere Vorfälle ans Auge gekommen, bei denen Router mit Protokoll-Tunneling und weiteren Verfahren überwunden wurden.

    Aber wenn du meinst eine WPA Verschlüsselung neuerdings knacken zu können, die ein Router nicht anbietet, dann tu dies ruhig.

    Und über die Geräte im OSI Modellvergleich haben wir jetzt auch nicht wirklich gesprochen. Das ein Layer 2 Switch bzw. hier ja eine Bridge nicht das selbe ist, wie ein Router der in Layer 3 sitzt ist hier wohl jedem klar. War aber auch nicht wirklich das Thema.

  4. Hi,

    ich hab mein Postfix laufen und benutz zur Authentifizierung SASL2. Das lief bisher auch immer einwandfrei, nachdem ich aber nun vom Server in eine Jail gewechselt bin und neu installiert habe bekomme ich in den Logs immer den Fehler:

    warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

    Leider kann ich mir aber null erklären, welche Datei da fehlen soll. Die main.cf und master.cf sind sauber bestückt und cyrus-sasl sowie cyrus-sasl-saslauthd sind ebenfalls sauber installiert.

    Hatte irgendjemand einen ähnlichen Fehler schon mal und kann mir berichten an was es bei ihm lag?

    mfg

  5. Also die /etc/vsftpd.conf ist die Standarddatei in welcher die grundlegenden Konfigurationen durchführt. Sowas sollte man sich aber eigentlich denken können, wenn man schon nen ftp server installiert. Wie sonst sollte man denn bestimmte Einstellungen vornehmen, wenn nicht in einer confdatei. Hätteste dir mal die man von vsftpd angesehen, dann wüsstest du das auch.

    Weitere confdateien von vsftpd sind z.B.: vsftpd.chroot_list und vsftpd.user_list

    mfg

  6. Wie wäre es denn einfach, wenn du dich selber mal umschaust, dir ein paar Angebote raussuchst, eine eigene Auswahl triffst und danach dann fragst was von diesem und jenem gehalten wird? Ich denke kaum, dass hier einer für dich nen Laptop raussucht oder mal eben die aktuelle Liste aller Laptops und deren Preise im Kopf hat. ;)

    mfg

  7. Hallo,

    Ich versuche nun schon eine kleine Weile mein FreeBSD 5.1 dazu zu bringen sich über ISDN zu verbinden, aber es will und will einfach nicht klappen.

    Meine Configdateien sehen wie folgt aus:

    /etc/ppp/ppp.conf

    default:

    set log Phase LCP IPCP CCP Warning Error Alert

    set device /dev/i4brbch0

    set timeout 0

    set dial

    set login

    set proctitle ppp-isdn

    set speed sync

    nat enable yes

    enable dns

    set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0

    add default HISADDR

    set phone NUMBER_OF_PROVIDER

    set authname USERNAME

    set authkey PASSWORD

    disable lqr

    disable pred1 deflate mppe

    /etc/isdn/isdnd.rc

    #==============================================================================

    # SYSTEM section: isdnd global configuration parameters

    #==============================================================================

    system

    # accounting

    # ----------

    acctall = on # generate info for everything

    acctfile = /var/log/isdnd.acct # name & location of accounting file

    useacctfile = yes # generate accouting info to file

    isdntime = off

    monitor-allowed = no

    regexpr = "incoming call from"

    regprog = incoming

    rtprio = 25

    #==============================================================================

    entry

    name = userppp

    usrdevicename = rbch

    usrdeviceunit = 0

    isdncontroller = 0

    isdnchannel = -1

    local-phone-incoming = *

    remote-phone-incoming = *

    local-phone-dialout = YOUR_MSN

    remote-phone-dialout = NUMBER_OF_PROVIDER

    remdial-handling = first

    dialin-reaction = ignore

    direction = out

    dialout-type = normal

    b1protocol = hdlc

    ratetype = 0

    dialretries = 3

    dialrandincr = on

    recoverytime = 1

    usedown = off

    downtries = 2

    downtime = 30

    # EOF #########################################################################

    In der rc.conf habe ich folgendes zu stehen:

    isdn_enable="YES"

    ppp_enable="NO" <-- damit ich ppp per Hand starten kann

    ppp_mode="ddial"

    ppp_profile="default"

    Wenn ich nun "ppp" und dann "dial default" oder auch "dial" mache kommen folgende Meldungen:

    Feb 28 16:37:49 defiant kernel: i4b: unit 0, assigned TEI = 66 = 042

    Feb 28 16:37:49 defiant isdnd[205]: ERR set_channel_busy: controller [0] invalid channel [-1]!

    i4b-L3 T303_timeout: SETUP not answered, cr = 118

    i4b-L3 next_l3state: FSM illegal stat, state = ST_U0 - Null, event = EV_T303EXP - T303 timeout!

    Wenn ich in der /etc/isdn/isdnd.rc dann den isdnchannel aufgrund der obigen Meldung auf "1" setze kommt folgende Meldung:

    Feb 28 16:37:49 defiant kernel: i4b: unit 0, assigned TEI = 66 = 042

    i4b-L3 T303_timeout: SETUP not answered, cr = 37

    i4b-L3 next_l3state: FSM illegal stat, state = ST_U0 - Null, event = EV_T303EXP - T303 timeout!

    Ich verstehe diese Meldungen einfach nicht und wäre über jede Hilfe sehr dankbar.

    mfg

  8. Jo,

    die lieben OE Benutzer! :)

    Heute hab ich ne lustige Mail bekommen, müsst ihr euch mal durchlesen. Hab schön öfters solche Mails gesehen, nur Frage ich mich was die für einen Sinn haben, da die Absenderadressen scheinbar gefakt sind.

    Dear Friend,

    As you read this, I don't want you to feel sorry for

    me, because, I believe everyone will die someday.

    My name is BATES ALAN a merchant in Dubai, in the

    U.A.E.I have been diagnosed with Esophageal cancer.

    It has defiled all forms of medical treatment, and right now

    I have only about a few months to live, according to medical experts.

    I have not particularly lived my life so well, as I

    never really cared for anyone(not even myself)but my

    business. Though I am very rich, I was never

    generous, I was always hostile to people and only

    focused on my business as that was the only thing I

    cared for. But now I regret all this as I now know

    that there is more to life than just wanting to have

    or make all the money in the world.

    I believe when God gives me a second chance to come

    to this world I would live my life a different way

    from how I have lived it. Now that God has called

    me, I have willed and given most of my property

    and assets to my immediate and extended family

    members as well as a few close friends.

    I want God to be merciful to me and accept my soul

    so, I have decided to give alms to charity

    organizations, as I want this to be one of the last

    good deeds I do on earth. So far, I have distributed

    money to some charity organizations in the U.A.E,

    Algeria and Malaysia. Now that my health has

    deteriorated so badly, I cannot do this myself

    anymore. I once asked members of my family to close one

    of my accounts and distribute the money which I have

    there to charity organization in Bulgaria and

    Pakistan, they refused and kept the money to

    themselves. Hence, I do not trust them anymore, as

    they seem not to be contended with what I have left

    for them.

    The last of my money which no one knows of is the

    huge cash deposit of eighteen million dollars

    $18,000,000,00 that I have with a finance/Security Company

    abroad. I will want you to help me collect this deposit

    and dispatched it to charity organizations.

    I have set aside 10% for you and for your time.

    God be with you.

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...