#!/usr/bin/perl
# DeCSS v 0.06 -- a utility for stripping Cascading Style Sheet (CSS)
# information from an HTML page
# Copyright 2000, Mr. Bad of Pigdog Journal (http://www.pigdog.org/).
# All Rights Reserved.
# This software is distributed under the Artistic License, which should have
# come with this file. Please distribute this software far and wide.
# The original version can always be found on the World Wide web at:
#
# http://www.pigdog.org/decss/
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
use Getopt::Std;
use strict; # Choosy software use's strict!
my($USAGE) = <DeCSS 0.06: a utility to strip Cascading Style Sheets (CSS) tags
from HTML documents
USAGE: DeCSS [-h] [-i input file] [-o output file]
options:
-h print this help message
-i input file input file to strip (default: standard input)
-o output file place to put the output (default: standard output)
END_OF_USAGE
my(%options);
local(*IN, *OUT);
getopts("hi:o:", %options);
if (exists $options{h}) {
print $USAGE;
exit(0);
}
if (exists $options{i}) {
open(IN, "ie "Can't open $options{i}: $!n";
} else {
open(IN, "}
if (exists $options{o}) {
open(OUT, ">$options{o}") or die "Can't open $options{o}: $!n";
} else {
open(OUT, ">&STDOUT") or die "Can't open STDOUT: $!n";
}
decssify(*IN, *OUT);
close(IN);
close(OUT);
sub decssify {
local(*IN, *OUT) = @_;
# Yeah, like -you- never slurp in entire files at a time.
select(IN); undef $/;
my($content) = ;
$content =~ s%%%mg; # Strip stylesheet links
$content =~ s%%%mg; # Strip
print OUT $content;
}
__END__
=head1 NAME
DeCSS - A utility to strip Cascading Style Sheet (CSS) information from a Web page.
=head1 SYNOPSIS
DeCSS -i my_file.html -o my_file_no_css.html
=head1 DESCRIPTION
DeCSS is a utility program to strip Cascading Style Sheet (CSS)
information from a Web page. For a given input HTML file, it removes
the following type of HTML code:
=over 4
=item EstyleE tags
=item ElinkE tags that are for CSS stylesheets
=item C attributes
=item C
=item C attributes
=back
That's all it does. It has no relationship whatsoever to encryption,
copy protection, movies, software freedom, oppressive industry
cartels, Web site witch hunts, or any other bad things that could get
you in trouble. Please feel free to redistribute it as much as possible,
preferably on your Web site.
=head1 AUTHOR
Mister Bad <Mailto:mr.bad@pigdog.org" rel="nofollow">mr.bad@pigdog.org>
=head1 SEE ALSO
=over 4
=item W3 Cascading Style Sheets (CSS) site
=back
=head1 VERSION HISTORY
=over 4
=item 0.06
Repackaged software, including mirroring utilities and a FAQ.
=item 0.05
Initial version.
=back
=cut
# Local Variables: #
# mode: perl #
# End: #
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-990202/,如需转载,请注明出处,否则将追究法律责任。
<%=items[i].content%>
<%if(items[i].items.items.length) { %><%=items[i].items.items[j].username%> 回复 <%=items[i].items.items[j].tousername%>: <%=items[i].items.items[j].content%>
最新文章
- 可怕的 C# (转)
- Unify the Role-Based Security Models for Enterprise and Application Domains with .NET (转)
- Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication (转)
- [Sample] Playing with music file (转)
- 中文web-app_2_3.dtd (转)
- 使用ASP.NET加密口令 (转)
- C++ Builder 高手进阶 (五)用BCB编写多线程应用程序 (转)
- 24点游戏探秘系列6:用概率统计的眼光看24点游戏 (转)
- Schema-oriented message destination (转)
- J2EE vs. Microsoft.NET (转)