Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

(tye)Re: use PerlScript && die;

by tye (Sage)
on Sep 04, 2001 at 22:38 UTC ( #110119=note: print w/replies, xml ) Need Help??

in reply to use PerlScript && die;

Disabling PerlScript isn't as easy as it should be... until now.

<html><head><title>PerlScript deactivator</title></head><body> <p>You probably don't have PerlScript installed.</p><p> <script language="PerlScript"> use strict; BEGIN { $^W= 1; } use vars qw( $window ); sub Output { $window->document->write( join "", @_ ); } my $Reg; use Win32::TieRegistry( TiedRef=>\$Reg, Delimiter=>"/", ArrayValues=>1, ":REG_" ); my $key= $Reg->{"LMachine/Software/ActiveState/"}; if( ! $key ) { Output "You don't have ActiveState software installed?? ($^E)"; } else { for my $prod ( $key->SubKeyNames() ) { Output "Found ActiveState/$prod/...<br>\n"; my $regProd= $key->{"$prod/"}; if( ! $regProd ) { Output "<p>Can't open ActiveState/$prod/: $^E</p>"; next; } for my $ver ( $regProd->SubKeyNames() ) { Output( ("&nbsp"x4)."Found version $ver...<br>\n" ); my $regVer= $regProd->{"$ver/"}; if( ! $regVer ) { Output "<p>Can't open ". "ActiveState/$prod/$ver/: $^E</p>"; next; } my $zones= $regVer->{"/EnabledZones"}; if( ! $zones ) { Output( ("&nbsp"x8)."Can't open ". ".../$ver//EnabledZones: $^E<br>" ); next; } Output( ("&nbsp"x8). "Enabled for zones: $zones->[0]<br>\n" ); if( $regVer->{"/EnabledZones"}= [ "0x0000", REG_DWORD ] ) { Output( ("&nbsp"x8)."Now disabled!<br>\n" ); } else { Output "<p>Can't disable ". "ActiveState/$prod/$ver: $^E</p>"; } } } } </script> <p>Done checking.</p> <!-- Typical output: You probably don't have PerlScript installed. Found ActiveState/ActivePerl/... Found version 616... Can't open .../616//EnabledZones: The system cannot find the f +ile specified Found ActiveState/PerlScript/... Found version 1.0... Enabled for zones: 0x00000000 Now disabled! Done checking. --> </body></html>

Simply hit the "d/l code" link below, save that to a file called something like "PerlScript.htm", verify your browser didn't mess it up too much, then view the saved file in IE and you should get an indication that PerlScript has been disabled. You can verify that it worked by reloading the page and seeing that only the first and last lines of text appear.

        - tye (but my friends call me "Tye")

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://110119]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2022-08-08 01:52 GMT
Find Nodes?
    Voting Booth?

    No recent polls found