[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [ANN] apt-sary-0.1

Jan 'jast' Krueger

12/28/2005 10:21:00 PM

Hi,

> Sary makes `apt-cache search' and `apt-file search' MUCH FASTER.

Brilliant idea, thanks!

> apt-sary-mksary

This fails here with the following message:

--- snip ---
head -100 | egrep -B100 '^FILE +LOCATION' > header.txt
rake aborted!
Command failed with status (): [head -100 | egrep -B100 '^FILE +LOCATION'...]
--- snip ---

Could you update apt-sary-mksary to skip generating a contents sary when
there are no contents files? I've written my own patch (don't actually do
anything in the rule if `cat' ends up being nil) but it looks fairly ugly to me.

--
# Best regards, Jan 'jast' Krueger <jast at ruby-co de>
print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
"('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
\W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i
5 Answers

Chad Perrin

12/28/2005 10:39:00 PM

0

On Thu, Dec 29, 2005 at 07:22:53AM +0900, Jan 'jast' Krueger wrote:
>
> --
> # Best regards, Jan 'jast' Krueger <jast at ruby-co de>
> print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
> "('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
> \W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i

I have a question:

What exactly does that bit of obfu do?

--
Chad Perrin [ CCD CopyWrite | http://ccd.ap... ]

unix virus: If you're using a unixlike OS, please forward
this to 20 others and erase your system partition.


rubikitch

12/29/2005 1:04:00 AM

0

Gyoung-Yoon Noh

12/29/2005 5:55:00 AM

0

On 12/29/05, Chad Perrin <perrin@apotheon.com> wrote:
> On Thu, Dec 29, 2005 at 07:22:53AM +0900, Jan 'jast' Krueger wrote:
> >
> > --
> > # Best regards, Jan 'jast' Krueger <jast at ruby-co de>
> > print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
> > "('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
> > \W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i
>
> I have a question:
>
> What exactly does that bit of obfu do?
>
> --
> Chad Perrin [ CCD CopyWrite | http://ccd.ap... ]
>
> unix virus: If you're using a unixlike OS, please forward
> this to 20 others and erase your system partition.
>
>

Something like obfuscator generator?

C:\Documents and Settings\Administrator>ruby
print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
"('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
\W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i
__END__
text: Just another Ruby hacker!
$><<[%q_,</-/+/,*(.).@.[/,.:.-/**(-*/-.*/;*(.:.).+.=.-/**)(<_.
gsub(/\s/,'').tr(%q,(-/:-@[,,%q,0-9a-f,)].pack('H*')
C:\Documents and Settings\Administrator>ruby
$><<[%q_,</-/+/,*(.).@.[/,.:.-/**(-*/-.*/;*(.:.).+.=.-/**)(<_.
gsub(/\s/,'').tr(%q,(-/:-@[,,%q,0-9a-f,)].pack('H*')
__END__
Just another Ruby hacker!

--
http://nohmad.su...


Jan 'jast' Krueger

12/29/2005 12:38:00 PM

0

Hi,

> Please try this patch.

that's about what I did myself, and it works fine. So as it seems you
wouldn't do it differently, I suggest you include it in the next release.

I'm still overjoyed by the speedup, by the way. Thanks again, I guess. ;)

(By the way, I just tried downloading and saryfying the contents database.
Takes its sweet time, doesn't it?)

--
# Best regards, Jan 'jast' Krueger <jast at ruby-co de>
print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
"('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
\W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i

Jan 'jast' Krueger

12/29/2005 12:41:00 PM

0

Hi,

>># Best regards, Jan 'jast' Krueger <jast at ruby-co de>
>>print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
>>"('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
>>\W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i
>
> I have a question:
> What exactly does that bit of obfu do?

As suggested, it generates obfuscated code that outputs a given string,
formatted to make it suitable for e-mail signatures. I'm way too lazy to
write my obfuscated signatures myself. ;)

--
# Best regards, Jan 'jast' Krueger <jast at ruby-co de>
print'text: ';l=gets;I=['%q,0-9a-f,',',','%q,(-/:-@[,'];i="pack"+
"('H*')";l=eval("l.un#{i}[0].tr #{I}"); $><<"$><<[%q_#{l.gsub /(^
\W{64}|\W{72})/x,"\\1\n"}_.\ngsub(/\\s/,'').tr(#{I.reverse})]."+i