euglug.org

[작성자:] admin

  • Resolved: [Eug-lug] Source Code Processing



    larry priceThu May 5 14:16:09 PDT 2005

    you can use sed to whack dos style line ends
    sed -i.old -e 's/^M//g' $files
                             ^^
    the tricky part is that to make it happen you have to enter it as a
    control character
    in a commandline environment ctrl-v ctrl-$CHAR should do it,
    in emacs it's ctrl-q ctrl-$CHAR (vi gurus?)
    
    the one thing that sed does well is edit streams of text, it does not
    do so well at guessing what you want, you have to tell it if you want
    it to change line-endings etc.
    
    
    On 5/5/05, Jason Van Cleve <jason at vancleve.com> wrote:
    > Quoth Jason Van Cleve, on Wed, 4 May 2005 20:46:40 -0700:
    > 
    > >   sed -r -i s/[\ \      ]*$//g $files
    > 
    > Addendum:  I found some source files with DOS newlines in them, and this
    > sed command doesn't work on those.  Evidently sed is stupid with regard
    > to newlines, so now it's:
    > 
    >   dos2unix -k -q -o $files
    >   sed -r -i s/[\ \      ]*$//g $files
    > 
    > Sure, sed is speedy, but does it do one thing well? . . .
    > 
    > --Jason
    > 
    > --
    > I'd give my right arm to be ambidextrous!
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
    
    -- 
    http://Zoneverte.org -- information explained
    Do you know what your IT infrastructure does?
    
  • Resolved: [Eug-lug] Source Code Processing



    Jason Van CleveThu May 5 14:03:18 PDT 2005

    Quoth Jason Van Cleve, on Wed, 4 May 2005 20:46:40 -0700:
    
    >   sed -r -i s/[\ \      ]*$//g $files
    
    Addendum:  I found some source files with DOS newlines in them, and this
    sed command doesn't work on those.  Evidently sed is stupid with regard
    to newlines, so now it's:
    
      dos2unix -k -q -o $files
      sed -r -i s/[\ \      ]*$//g $files
    
    Sure, sed is speedy, but does it do one thing well? . . .
    
    --Jason
    
    --
    I'd give my right arm to be ambidextrous!
    
  • [Eug-lug] security software for Linux?



    Max LemieuxThu May 5 13:03:49 PDT 2005

    I believe the meeting is in Springfield at the old Masonic temple.
    
    -Max
    
    Jeff Newton wrote:
    > It sounds like that I have both the Synaptic Package Manager and the 
    > KPackage Manager as well here. Btw I did see on the KDE site that the 
    > newer version 3.4 was released. I will check for this stuff later, since 
    > my eyelids are calling for inspection time.
    > 
    > Btw, no one said if it was here in Eugene or if it was in Springfield 
    > tonight for the meeting?
    > 
    > Jeff
    > 
    > Max Lemieux wrote:
    > 
    >> It sure does. We're getting very warm now.
    >>
    >> Check your K menu > System > [Synaptic Package Manager] or [KPackage 
    >> Package Manager]. Those apps are front ends for apt-get, the nifty 
    >> Debian automagical package distribution/configuration system.
    >>
    >> Use Synaptic or KPackage to search for "firewall", or even "Guarddog", 
    >> and see what you get. Install the package that looks most like what 
    >> you want, and start tweaking it....
    >>
    >> By the way... KDE 3.2 is about a year old now, KDE 3.4 was just 
    >> released. Again depending on what you are trying to do with this box, 
    >> you may want to install a more modern distro to get the new 
    >> features/speed of the new KDE.
    >>
    >> -Max
    > 
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] encryption decryption



    Bob MillerThu May 5 12:42:09 PDT 2005

    Fred James wrote:
    
    > Right now, our backups tapes are written with ...
    > tar -cvf /dev/st0 ./$Path >> $TOC
    > ... and I am thinking of adding some kind of encryption to the routine.
    > Is there anything simple, or am I looking at writing something to use
    > the likes of blowfish?  Thank you in advance for any help you may be
    > able to offer.
    
    If you just want to encrypt a tar file, you can do this.
    
        tar cvf - ./$Path | openssl bf -e -pass pass:xyzzy > /dev/st0 >> $TOC
    
    To decrypt, do this.
    
        openssl bf -d < /dev/st0 | tar xf - $files
        enter bf-cbc decryption password: xyzzy    
    
    Look at the openssl and bf man pages for details.
    
    But think carefully about password management.  The scheme above
    uses a fixed password.  A regularly changing one would be better.
    A password that isn't stored in a script would be better yet.
    
    -- 
    Bob Miller                              K<bob>
    kbobsoft software consulting
    http://kbobsoft.com                     kbob at jogger-egg.com
    
  • [Eug-lug] security software for Linux?



    Max LemieuxThu May 5 12:18:24 PDT 2005

    It sure does. We're getting very warm now.
    
    Check your K menu > System > [Synaptic Package Manager] or [KPackage 
    Package Manager]. Those apps are front ends for apt-get, the nifty 
    Debian automagical package distribution/configuration system.
    
    Use Synaptic or KPackage to search for "firewall", or even "Guarddog", 
    and see what you get. Install the package that looks most like what you 
    want, and start tweaking it....
    
    By the way... KDE 3.2 is about a year old now, KDE 3.4 was just 
    released. Again depending on what you are trying to do with this box, 
    you may want to install a more modern distro to get the new 
    features/speed of the new KDE.
    
    -Max
    
    Jeff Newton wrote:
    > Max, does KDE 3.2 ring any bells?
    > 
    > Jeff
    > 
    > 
    > Max Lemieux wrote:
    > 
    >> OK. It actually looks like Guarddog is a KDE-specific package. If you 
    >> already are running the KDE desktop, you can do this to get Guarddog 
    >> as root:
    >>
    >> # apt-get install guarddog
    >>
    >> Do you have a GUI desktop installed already? Let me put it a different 
    >> way, what is the purpose of this Debian box and what are your security 
    >> needs?
    >>
    >> -Max
    > 
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] Source Code Processing



    Bob MillerThu May 5 12:07:37 PDT 2005

    Jason Van Cleve wrote:
    
    > I'd like to process a whole bunch of source files uniformly, stripping
    > off any whitespace at the ends of lines and also making sure there is
    > exactly one newline before the EOF.  That last part may be tricky, but
    > is there a speedy *nix utility for getting rid of trailing whitespace,
    > or maybe for general source code processing?
    
    You got several good scripts to strip whitespace from the ends of
    lines, but I didn't see any code to strip trailing blank lines.
    
    How about this?
    
        $ python -c 'import sys; print sys.stdin.read().rstrip()' < in > out
    
    That doesn't trim EOL whitespace, just EOF whitespace.  Combine
    it with one of the other scripts for EOL trimming.
    
    -- 
    Bob Miller                              K<bob>
    kbobsoft software consulting
    http://kbobsoft.com                     kbob at jogger-egg.com
    
  • [Eug-lug] security software for Linux?



    Max LemieuxThu May 5 11:32:26 PDT 2005

    OK. It actually looks like Guarddog is a KDE-specific package. If you 
    already are running the KDE desktop, you can do this to get Guarddog as 
    root:
    
    # apt-get install guarddog
    
    Do you have a GUI desktop installed already? Let me put it a different 
    way, what is the purpose of this Debian box and what are your security 
    needs?
    
    -Max
    
    Jeff Newton wrote:
    > I know, I'm running debain on the box, but distro, I'm not familier with 
    > Max.
    > 
    > - J
    > 
    > Max Lemieux wrote:
    > 
    >> How to get it depends on what distro you're running. Guarddog happened 
    >> to come with SimplyMepis 3.3, so I used it as an example. Its website 
    >> is http://www.simonzone.com/software/guarddog/.
    >>
    >> Which distro are you running?
    >>
    >> -Max
    > 
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] security software for Linux?



    Max LemieuxThu May 5 11:11:12 PDT 2005

    How to get it depends on what distro you're running. Guarddog happened 
    to come with SimplyMepis 3.3, so I used it as an example. Its website is 
    http://www.simonzone.com/software/guarddog/.
    
    Which distro are you running?
    
    -Max
    
    Jeff Newton wrote:
    > Thanks Max, what's exactly what I thought! Where can I find this file 
    > and where?? Btw, I suppose the meeting is in Springfield tonight, right??
    > 
    > Jeff
    > 
    > Max Lemieux wrote:
    > 
    >> Most of the virii/worms tie into specific known MS vulnerabilities. 
    >> You are beautifully immune on Linux. Security concerns are more to do 
    >> with unauthorized access than the bot/worm/virus stuff.
    >>
    >> To that end, most Linux distros do come with a software firewall, 
    >> based on the iptables package. Look for Guarddog, or the like.
    >>
    >> If you're already running Linux tell us what distro you have, and we 
    >> can be more specific.
    >>
    >> Cheers,
    >> Max
    > 
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] security software for Linux?



    Max LemieuxThu May 5 10:41:55 PDT 2005

    Most of the virii/worms tie into specific known MS vulnerabilities. You 
    are beautifully immune on Linux. Security concerns are more to do with 
    unauthorized access than the bot/worm/virus stuff.
    
    To that end, most Linux distros do come with a software firewall, based 
    on the iptables package. Look for Guarddog, or the like.
    
    If you're already running Linux tell us what distro you have, and we can 
    be more specific.
    
    Cheers,
    Max
    
    Jeff Newton wrote:
    > Hey guys,
    > 
    > I was wondering is there any software out there for linux that will snag 
    > those nasty worms and supposedly virus's?? Since, most are written for 
    > Microsoft products was kinda wondering if Linux is game to virus hacks 
    > or not??
    > 
    > Jeff
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] encryption decryption



    larry priceThu May 5 10:38:42 PDT 2005

    On 5/5/05, Fred James <fredjame at fredjame.cnc.net> wrote:
    > All
    > Right now, our backups tapes are written with ...
    > tar -cvf /dev/st0 ./$Path >> $TOC
    > ... and I am thinking of adding some kind of encryption to the routine.
    > Is there anything simple, or am I looking at writing something to use
    > the likes of blowfish?  Thank you in advance for any help you may be
    > able to offer.
    
    Actually encryption should come before you start tar'ing up the files to tape 
    since if it's worth encrypting the backup it's worth encrypting the original.
    
    that said there are quite a few HOWTOs focusing on using the loopback
    device to mount encrypted filesystems on linux
    
    the man page for enc(1) is fairly clear on what options are available
    for using the openssl crypto libraries to solve that problem.
    
    
    -- 
    http://Zoneverte.org -- information explained
    Do you know what your IT infrastructure does?