1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team-Mitglieder
    4. Trophäen
    5. Mitgliedersuche
  4. Tutorial Bereich
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Seiten
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. Informatik Forum
  2. Mitglieder
  3. davewood

Beiträge von davewood

  • Sicheres PHP Forum

    • davewood
    • 28. November 2006 um 16:07

    Ich such ein möglichst sicheres Forum um es in ein bestehendes CMS einzubinden.

    • Sicherheit ist sehr wichtig, will nicht alle paar Wochen "gehackt" werden
    • Nicht überladen, muss meine Mikrowelle nicht fernsteuern können damit. Es soll eher simpel und funktioniell sein.
    • leicht updatebar
    • login über bestehende DB soll möglich sein, also irgendwie den login vom Forum auf bestehende tables umlenken. auch die profile sollen auf bereits bestehende profile verlinkt werden.
    • BBcode oder FUDCode Unterstützung (also des [b], [img, [url] graffl) sowie attachments. evt Polls

    bisher gefunden hab ich http://www.punbb.org/ aber evt hat ja jemand Erfahrung mit anderen Boards.

    mitgruss

    david

  • config variable für perl UND php an einer stelle definieren

    • davewood
    • 27. November 2006 um 17:44

    Hallo & Danke

    Können vermutlich schon, aber für die PHP Applikation gibts nunmal ein config file wo alles drinsteht und dort will ich den Kram auch noch hineinschreiben.

    Werd mal schaun wie sich das mit Parsen erledigen lässt. womit parst es sich denn am besten? :)

    david

    ps:

    Zitat von http://www.linuxforums.org/programming/learn_perl_in_10_easy_lessons__lesson_4.html


    Parsing files

    There are many ways to parse a text file. In Perl, if the file has its data organized line by line with delimiters, it is very easy to parse it.

    Let's study a simple example. We have a set of employees in a file called employees.txt. In this file, each line represents an employee. The information relative to each employee is delimited with tabs, the first column is the name of the employee, the second column indicates his department and the third one his salary. Here is an overview of the file:

    Mr John Doe R&D 21000
    Miss Gloria Dunne HR 23000
    Mr Jack Stevens HR 45000
    Mrs Julie Fay R&D 30000
    Mr Patrick Reed R&D 33000

    In order to obtain some statistics, the HR department wants to establish a list of all male employees who work in the R&D department and which salary is more than 25000.

    To obtain this list, we design a simple Perl script, which:

    1.

    opens the employees.txt file
    2.

    loops through each line
    3.

    identifies the name, department and salary of the employee
    4.

    ignores and goes to the next line if the employee is female (the name does not start with Mr)
    5.

    ignores and goes to the next line if the salary is less or equal to 25000.
    6.

    ignores and goes to the next line if the department is not “R&D”.
    7.

    prints the name and the salary of the employee on the screen.

    To do this, we'll introduce two Perl functions:

    *

    “chomp” is used to remove the carriage return found in the end of the line. For instance chomp $variable removes all carriage returns in the variable.
    *

    “split” is used to cut the line in different parts where it finds a delimiter. For instance split /o/, “hello world” returns an array containing “hell”, “ w” and “rld”. In our example we'll split the lines with the tab delimiter, which in Perl is written “\t”.

    Here is the script which establishes the list of male employees from the R&D department with a salary greater than 25000. To make things a bit clearer, comments were introduced within the scripts (comments in Perl start with a # sign):

    #open the employees file
    open (EMPLOYEES, "employees.txt");

    #for each line
    while ($line = <EMPLOYEES>) {

    #remove the carriage return
    chomp $line;

    #split the line between tabs
    #and get the different elements
    ($name, $department, $salary) = split /\t/, $line;

    #go to the next line unless the name starts with "Mr "
    next unless $name =~ /^Mr /;

    #go to the next line unless the salary is more than 25000.
    next unless $salary > 25000;

    #go to the next line unless the department is R&D.
    next unless $department eq "R&D";

    #since all employees here are male,
    #remove the particle in front of their name
    $name =~ s/Mr //;

    print "$name\n";
    }
    close (EMPLOYEES);

    Alles anzeigen

    Ich hoff mal des is okay wenn ich das hier so poste, evt hilfts ja mal wem anderen. :)

    david

  • VPN im WLAN

    • davewood
    • 27. November 2006 um 13:15

    :) 123

  • config variable für perl UND php an einer stelle definieren

    • davewood
    • 27. November 2006 um 13:12

    Ich hab zwei Skripte, ein PERL und ein PHP Skript die beide die gleiche Variable verwenden sollen.

    Es handelt sich um ein file upload script und dafür muss ich einen Pfad sowie eine maximale Filegröße definieren.

    momentan sind diese Werte doppelt (einmal fuer php im php file einmal fuer perl im perl file) definiert und somit ist die Wartung kompliziert und fehleranfällig.

    Am liebsten hätte ich einfach eine Zeile in meinem eigenen php config file.

    Vielen Dank im Vorraus

    david

  • VPN im WLAN

    • davewood
    • 27. November 2006 um 13:06

    es geziehmt sich die Lösung dann auch zu posten.

    mfg

    david

  • Vorschläge für Servernamen

    • davewood
    • 24. November 2006 um 10:19
    Zitat von Homer

    nukular... ich bin für nu-ku-lar!

    I second that

  • Centrino permanent runtertakten

    • davewood
    • 20. November 2006 um 17:57

    ich verwendes auch seit nem knappen Jahr ohne probs

    600MHz und 0.7V

    david

  • CUPS druckt manche PDFs nicht

    • davewood
    • 20. November 2006 um 12:11

    und ich könnte Beistand bei der Fehlersuche gebrauchen.

    Folgende CUPS Pakete sind installiert auf einem:
    Linux version 2.6.14-1-k7-smp (Debian 2.6.14-2) (Debian 4.0.2-3)

    Zitat


    airbus /var/log/cups> dpkg -l | grep cups
    ii cups-pdf 1.7.3-7 PDF printer for CUPS
    ii cupsys 1.2.5-1 Common UNIX Printing System(tm) - server
    ii cupsys-bsd 1.1.23-12 Common UNIX Printing System(tm) - BSD commands
    ii cupsys-client 1.1.23-12 Common UNIX Printing System(tm) - client programs (SysV)
    ii cupsys-common 1.2.5-1 Common UNIX Printing System(tm) - common files
    ii cupsys-pt 1.2.4-3 Tool for viewing/managing print jobs under CUPS
    ii libcupsimage2 1.2.5-1 Common UNIX Printing System(tm) - image libs
    ii libcupsys2 1.2.5-1 Common UNIX Printing System(tm) - libs
    ii libcupsys2-gnutls10 1.1.23-12 Common UNIX Printing System(tm) - dummy libs for transition

    Alles anzeigen

    Manche PDFs lassen sich nicht drucken, die bleiben in der queue hängen und der Drucker ist fortan blockiert.
    Erst nachdem der Auftrag mit lprm gelöscht und der Drucker aus- und wieder eingeschalten wurde gehts wieder.

    Es liegt sehr sicher an PDF Seiten die Bilder beinhalten, denn andere werden gedruckt.
    Und scheinbar nur an bestimmten Bildern, denn ich hab grad mit OpenOffice ein PDF mit Bild erstellt und problemlos drucken können.


    Ich poste gleich /var/log/cups/error.log muss nur mal das Fehlerszenario durchspielen.

    Zuerst schickt er scheinbar das file in ~8kB Teilen an den Drucker

    Zitat


    ...
    D [20/Nov/2006:12:19:25 +0100] [Job 42828] Read 8192 bytes of print data...
    D [20/Nov/2006:12:19:25 +0100] [Job 42828] Wrote 8192 bytes of print data...
    D [20/Nov/2006:12:19:25 +0100] [Job 42828] Read 8192 bytes of print data...
    D [20/Nov/2006:12:19:25 +0100] [Job 42828] Wrote 8192 bytes of print data...
    D [20/Nov/2006:12:19:25 +0100] [Job 42828] Read 8192 bytes of print data...
    D [20/Nov/2006:12:19:25 +0100] [Job 42828] Wrote 8192 bytes of print data...
    ...

    Alles anzeigen

    und dann kommt folgendes

    Zitat


    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Classes
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Default
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Default client-error-not-found: No default printer
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=406 (client-error-not-found)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Classes
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Printers
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Printers
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] CUPS-Get-Printers
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] Get-Jobs ipp://localhost/printers/DaVinci
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:25 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:25 +0100] Get-Jobs ipp://localhost/jobs/
    D [20/Nov/2006:12:19:25 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:25 +0100] cupsdCloseClient: 8
    D [20/Nov/2006:12:19:26 +0100] cupsdAcceptClient: 8 from localhost:631 (IPv4)
    D [20/Nov/2006:12:19:26 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:26 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:26 +0100] CUPS-Get-Printers
    D [20/Nov/2006:12:19:26 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:26 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:26 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:26 +0100] CUPS-Get-Classes
    D [20/Nov/2006:12:19:26 +0100] cupsdProcessIPPRequest: 8 status_code=0 (successful-ok)
    D [20/Nov/2006:12:19:26 +0100] cupsdReadClient: 8 POST / HTTP/1.1
    D [20/Nov/2006:12:19:26 +0100] cupsdAuthorize: No authentication data provided.
    D [20/Nov/2006:12:19:26 +0100] CUPS-Get-Default
    D [20/Nov/2006:12:19:26 +0100] CUPS-Get-Default client-error-not-found: No default printer
    D [20/Nov/2006:12:19:26 +0100] cupsdProcessIPPRequest: 8 status_code=406 (client-error-not-found)

    Alles anzeigen

    das wiederholt sich dann ewig.

    david

  • qmail absichern gegen mailbombs

    • davewood
    • 20. November 2006 um 12:04

    dankesehr für die tipps :)

    david

  • Centrino permanent runtertakten

    • davewood
    • 20. November 2006 um 11:07

    glaub des verwendet man :)

    Notebook Hardware Control

  • PC System

    • davewood
    • 16. November 2006 um 09:34

    sind das zwei getrennte RAM Riegel?

    Wenn nicht kannst du kein Dual Channel fahren was ja ne Einbuße ist. Angabe ohne Gewähr.

    david

    http://de.wikipedia.org/wiki/Dual_Channel

  • qmail absichern gegen mailbombs

    • davewood
    • 14. November 2006 um 16:21

    Hallo gelberBeutel

    danke mal fuer die flotte antwort

    skript is klar bis auf

    $? -eq 0

    $? muss ja fast der return wert von grep sein der dann mit 0 verglichen wird, aber wieso packst du das in eckige klammern.

    und wie sperrt man am besten die senderip? iptables?

    david

  • qmail absichern gegen mailbombs

    • davewood
    • 14. November 2006 um 15:51

    Bin ja jetzt Zivi und hier is ein Linux System am rennen, als mailserver wird qmail verwendet.

    Seit heut morgen bekommen wir Unmengen an emails von einer adresse adk1818@yahoo.com und als Empfänger geht er einfach alle alphanumerischen kombinationen durch.

    Blöderweise schickt der qmail an den Absender Fehlermeldungen retour.

    Zwei Dinge bei denen ich nicht weiterkomm.

    1.)
    Wie sichere ich das System am besten gegen sowas ab? badmailfrom haben wird schon aber damit kann man nur ganze domains sperren was ja nicht sehr sinnvoll ist. Kann/Soll ich einfach den mailserver rausblocken der die mails schickt?

    2.)
    Ich hab nun 1000de mails in der queue und würd die gern löschen, aber dazu muss ich in einem ordner rekursiv alle unterordner nach files durchsuchen die als inhalt die mailadresse bla@yahoo.com haben. is vermutlich ein einzeiler aber ich bin noch am üben beim shell skripten :)

    david

  • Eine einzelne Partition neu mit Windows versehen... Wie?

    • davewood
    • 9. November 2006 um 09:21

    knoppix CD rein, booten, ssh dämon starten, mit anderem rechner einloggen, daten rübersaugen, neu aufsetzen

  • [CGI] Perl script ausführen

    • davewood
    • 7. November 2006 um 19:35

    hab was ähnliches im httpd.conf gefunden, entspricht das der apache.config von der du sprichst?

    werds morgen sowieso weiterverfolgen wenn ich in der arbeit bin :)

    danke

    david

    ps: wo kann/muss/soll denn das cgi-bin liegen? will das risiko gering halten dass jemand böse dinge damit tun kann..

    wenn /var/www/ das root für den apache is, kann cgi-bin dann ausserhalb davon liegen? zB in /var/cgi-bin/

  • [CGI] Perl script ausführen

    • davewood
    • 7. November 2006 um 15:52

    Hab ein file upload.php in /var/www/upload/ drinnen

    upload.cgi ist in /usr/lib/cgi-bin/

    upload.php schickt ein <form> an den client mit der action="../../../usr/lib/cgi-bin/upload.cgi"

    Fehlermeldung von Firefox ->

    Code
    Not Found
    The requested URL /usr/lib/cgi-bin/upload.cgi was not found on this server.

    Würde die erstellung eines /var/www/cgi-bin kombiniert mit einer änderung in der apache-config dass eben dort cgi scripts ausgeführt werden dürfen was bringen?

    mfg

    david

  • Halloween

    • davewood
    • 1. November 2006 um 14:51

    Jep, bin ja eher negativ behaftet was dich oder deine Arbeit (naja eher nur zweiteres, kennen uns ja nicht) betrifft, aber das Bild gefällt. Gibt keine rationellen Gründe für diese von mir gehegte Antipathie also nicht zu Herzen nehmen. :)

  • [Windows XP] Hardware-Komponenten => Human Readable name ausgeben?

    • davewood
    • 29. Oktober 2006 um 18:53

    Everest

    http://www.zdnet.de/downloads/prg/1/x/de011X-wc.html

    dann einfach einen bericht damit erstellen, ergibt netten html output

  • neues notebook gesucht - tipps?

    • davewood
    • 23. Oktober 2006 um 09:29

    du hast es gerade eben gekauft und kannst somit kaum eine sinnvolle empfehlung abgeben was qualität und langlebigkeit betrifft

  • neues notebook gesucht - tipps?

    • davewood
    • 21. Oktober 2006 um 11:41

    Ich bin mit meinem Benq Joybook sehr happy, vor allem weils superleicht is und die Wärmeentwicklung sehr gering is. Hab den Vorgänger vom S72 der sich 7000 nennt.

    http://geizhals.at/a219811.html
    http://geizhals.at/a205162.html
    http://geizhals.at/a150784.html

Rechtliches

Impressum

Datenschutzerklärung