pete1234 has asked for the wisdom of the Perl Monks concerning the following question:

I'm getting this error: "Unrecognized character \x05 at ./rsa line 2." from this script:
#!/usr/bin/perl print pack"C*",split/\D+/,Echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*", +<> )]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"| +dc[

There is a website about this script, but I could find nothing about my specific error. I'll give the site here just in case it might help someone help me out. http://www.cypherspace.org/adam/rsa/story.html Any help is greatly appreciated.

Replies are listed 'Best First'.
Re: Perl RSA script error
by gaal (Parson) on Dec 21, 2005 at 09:25 UTC
    The original has a backtick that somehow turned into a capital for you.

    print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<> )]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`

    Note that this works by feeding all the computational stuff to dc (in fact, that's why there must be backticks or similar there!). If you don't have dc, try a different version of the, er, munition.

Re: Perl RSA script error
by blazar (Canon) on Dec 21, 2005 at 10:29 UTC
    Following gaal's good remark and comment, you may also search CPAN for a dedicated RSA module.
      Thank you very much can't believe I didn't notice the two backticks. Sorry for the lack of comments, but it's not my code.