Gossamer Forum
Home : General : Perl Programming :

Help with encoded / decode

Quote Reply
Help with encoded / decode
Hi, i'm new at this forum.

Crazy and think that the same is very good Wink

So I have a question.

I see a perl script encoded, and for run is use on it the module Filter::decrypt

And I have a script that decoded the same.

But I want to know how to encoded another script any1 can help me ??

=== Below the script that decoded this ===

use vars qw($XOR $BLOCKSIZE $CRYPT_MAGIC_1 $CRYPT_MAGIC_2 $Fingerprint
$file $line $size);

$XOR = 'Perl' ;
$BLOCKSIZE = length $XOR ;
$CRYPT_MAGIC_1 = 0xff ;
$CRYPT_MAGIC_2 = 0x00 ;

$Fingerprint = pack ("C*", $CRYPT_MAGIC_1, $CRYPT_MAGIC_2) ;

die "Usage: $0 file...\n" unless @ARGV ;
$file=shift(@ARGV);

open (F, "<$file") or die "Cannot open $file: $!\n" ;
open (O, ">${file}.decrypted") or die "Cannot open ${file}.decrypted: $!\n" ;

seek F, 0, 0;

while ($line !~ /^$Fingerprint/) {
die("$file does not appear to be crackable with this script.\n") unless $line=<F>;
print O $line if ( $line =~ /^#!/ ) ;
}

seek F,-length($line),1;
seek F,2,1;

$block = '';
while ($size = read(F, $block, $BLOCKSIZE) ) {
print O ($block ^ substr($XOR, 0, length $block)) ;
}

close F ;
close O ;

print "${file}.decrypted successfully written\n" if ( -f ${file}.decrypted );

USAGE: thenameofyourchoose.pl file_to_decoded.pl

==== An exemplo of encoded file ====

#!/usr/bin/perl
use Filter::decrypt ;
Z $ LrJ'J 9H>J>1 Nko9If

-----



Any 1 help me please Unsure
Quote Reply
Re: [NamedRisk] Help with encoded / decode In reply to
I'm not really sure what you are asking.

I'm not sure I like the sound of this:

>>
$file does not appear to be crackable with this script.
<<

Last edited by:

Paul: Apr 14, 2003, 1:45 AM
Quote Reply
Re: [Paul] Help with encoded / decode In reply to
I found this script at the net on google.

I thinkg that can help to make a code to encode perl script.

if you search on google for "Filter::Decrypt"

you will found too.

I want to encode a script my.

but don't know how. so I see this...
Quote Reply
Re: [NamedRisk] Help with encoded / decode In reply to
Yeah I've used Filter::descypt. You can read more about it at cpan.org.

http://search.cpan.org/...9/decrypt/decrypt.pm
Quote Reply
Re: [Paul] Help with encoded / decode In reply to
Already read... not found any thing to help.

if any1 know about this please help =]
Quote Reply
Re: [NamedRisk] Help with encoded / decode In reply to
Well that's the main documentation for the module - what information exactly are you looking for?

That page tells you how to use the module.
Quote Reply
Re: [Paul] Help with encoded / decode In reply to
I know how to use this module.

I don't know how to encode the file =/

so I post a decoder here to see if any1 know how to make the encode script.
Quote Reply
Re: [NamedRisk] Help with encoded / decode In reply to
Put:

use Filter::decrypt;

at the top of your perl script and run it =)
Quote Reply
Re: [Paul] Help with encoded / decode In reply to
Like i say i know how to use this module.

i want to learn how to encode a perl script.

on my 1 post i put an exemple of how it work.

Last edited by:

NamedRisk: Apr 14, 2003, 2:45 AM