News for hackers. Stuff that matters.
Re:Hardcoded Password Found in Cisco Software by yorwba on Friday March 09, 2018 @10:52AM (#16552548)
s/^S/s
Re:Hardcoded Password Found in Cisco Software by CiPHPerCoder on Friday March 09, 2018 @11:05AM (#16552660)
s/$/\//
Re:Hardcoded Password Found in Cisco Software by BenjiWiebe on Friday March 09, 2018 @11:09AM (#16552696)
You'd think no one actually uses sed any more...
Re:Hardcoded Password Found in Cisco Software by saghm on Friday March 09, 2018 @12:02PM (#16553080)
Lots of people use vim, which all of these examples would also work in

EDIT: except for the missing trailing "/"

Re:Hardcoded Password Found in Cisco Software by yorwba on Friday March 09, 2018 @11:19AM (#16552768)
I use ed occasionally, just for fun. It's perfectly happy with s commands not being terminated by the separator.
Re:Hardcoded Password Found in Cisco Software by GlitchMr on Friday March 09, 2018 @01:03PM (#16553550)
It can also be Perl, as Perl supports `s///` syntax.
Re:Hardcoded Password Found in Cisco Software by laumars on Friday March 09, 2018 @04:57PM (#16555388)
Doesn't need to be forward slashes (in either Perl or sed).

In fact that last example I might write as either of the two following ways:

    s,$,/,
    s{$}{/}    # this is supported in Perl but not sed
to avoid having to escape the replacing character.
Re:Hardcoded Password Found in Cisco Software by magnetic on Friday March 09, 2018 @11:21AM (#16552783)
What are the alternatives?
Re:Hardcoded Password Found in Cisco Software by wglb on Friday March 09, 2018 @12:13PM (#16553154)
I've seen folks use awk for some of those tasks, and another four letter programming language that i won't name.
Re:Hardcoded Password Found in Cisco Software by kubbity on Friday March 09, 2018 @12:34PM (#16553330)
I don't know if it's what you want, but it's what you get. [0]

It' all magic! [1]

[0]https://groups.google.com/forum/m/?hl=en#!msg/comp.lang.perl... [1]https://groups.google.com/forum/m/?hl=en#!msg/comp.lang.perl...

Re:Hardcoded Password Found in Cisco Software by wglb on Friday March 09, 2018 @12:41PM (#16553390)
I'm going to release the safety on my browning.
Re:Hardcoded Password Found in Cisco Software by zwp on Friday March 09, 2018 @12:35PM (#16553347)
Ruby isn't that bad.
Re:Hardcoded Password Found in Cisco Software by wglb on Friday March 09, 2018 @12:40PM (#16553384)
Ruby is great, and is not what I was thinking of. But I should have included it as well as AWK.