original work

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

35 replies · 1,947 views · started 16 years ago · 1 min read

14 participants
metulj Super moderator Principal · 1,726 posts #21

ksg91 wrote: wtf guys! are you discussion to protect css! how stupid it is to save our css from others! css isnt a big deal. ok well, if discussion is going so let me suggest something. you may disable right click on the page using javascript so an ordinary user wont be able to see your html/css source.

even if you disable right click... still very very simple to get css properties...

as said many times... it is a total waste of time securing css files/s... if someone copy your style, means you did solid one, or at least someone is trying to learn some basics... either way.. really nothing to worry about😳8)

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

djlee Developer · 224 posts #22

ksg91 wrote: wtf guys! are you discussion to protect css! how stupid it is to save our css from others! css isnt a big deal.

ok well, if discussion is going so let me suggest something. you may disable right click on the page using javascript so an ordinary user wont be able to see your html/css source.

Your wondering how stupid a thread is dicussing how to protect css (basically), then u suggest the one solution that NEVER has worked. Theres 100's of plugins that disable javascript on pages unless you allow them, and the source view is still available via the browser menu. So my comment still remains the only decent way to protect a piece of code that must be available in standard form to the browser and therefore the user is via obfuscation

subzero Super moderator Fellow · 3,954 posts #23
<Files *.css>
Order deny,allow
deny from all
Allow from localhost
Allow from Your Domain
</Files>

RewriteEngine on
RewriteRule coreset.css coreset.php

session_start();
$_SESSION['csskey'] = "hello";

<?php
session_start();
header("Content-type: text/css");

if ($_SESSION["csskey"] != "hello") {
    die("Protected");
}

$_SESSION["csskey"] = "somethingelse";
?>

<?php
require_once("2pac.css");
?>

Easy

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

carebear Developer · 68 posts #24

ozziemale31 wrote: nobody can steal my new style css for mobilezonez lol care to try ?????

Mobilezonez

I figured out how to protect css lol go me roflmao

Hey Andy Bro what u main no one can get ur css? hahaha look... http://mobilezonez.net/andy/style.css body { background-color : #000000; color : #000000; font-family : arial; font-size : medium; margin : 0; padding : 0; margin : 3px auto; max-width : 750px; margin-bottom : 3px; border : 1px solid #000000; } img.logo { margin-top : 1px; } a { color : #ffffff; } a.cat { color : #ffffff; } a.pro { color : #ffffff; } a.nav { color : #ffffff; } a:active, a:hover { color : #0000ff; text-decoration : underline; } .text { color : #ffffff; } .textbox { color : #ffffff; text-align : center; } .text_black { color : #000000; } .text_small { color : #ffffff; font-size : small; } .title { background-color : #8a9296; } .mainteaser { background-color : #000044; border : 2px groove blue; font-family : arial, verdana, ms sans serif; font-weight : bold; font-size : 8pt; margin : 0; border-top : 2px solid #0000aa; border-bottom : 2px solid #0000aa; } .mainteaser_text { background-color : #000044; color : #ecf0f1; text-align : center; padding : 2px; margin : 0; font-size : medium; font-weight : bold; } #inputText { background-color : #ffffff; color : #000000; border : 1px; } .alt2 { color : #ffffff; font-size : small; } p.c4 { text-align : center; } hr.c3 { color : blue; background-color : blue; height : 2px; border : none; } div.c2 { text-align : center; } p.c1 { text-align : right; } p.c3 { text-align : right; } input { background-color : black; border : 2px groove blue; color : green; font-family : arial, verdana, ms sans serif; font-weight : bold; font-size : 8pt; } input:hover { background-color : blue; color : red; border : 2px groove blue; font-family : arial, verdana, ms sans serif; font-weight : bold; font-size : 8pt; } button { border : 1px solid blue; background : #ccf; } button:hover { border : 1px solid blue; background : blue; } label { display : block; width : 150px; float : left; margin : 2px 4px 6px 4px; text-align : right; } br { clear : left; } inputtext { border : 2px groove blue; color : black; font-family : arial, verdana, ms sans serif; font-weight : bold; font-size : 8pt; } its not that hard to get some ones css...

DiL Developer · 142 posts #25

Here is mobilezonez style.css

 

body {
background-color : #000000;
color : #000000;
font-family : arial;
font-size : medium;
margin : 0;
padding : 0;
margin : 3px auto;
max-width : 750px;
margin-bottom : 3px;
border : 1px solid #000000;
}
img.logo {
margin-top : 1px;
}
a {
color : #ffffff;
}
a.cat {
color : #ffffff;
}
a.pro {
color : #ffffff;
}
a.nav {
color : #ffffff;
}
a:active, a:hover {
color : #0000ff;
text-decoration : underline;
}
.text {
color : #ffffff;
}
.textbox {
color : #ffffff;
text-align : center;
}
.text_black {
color : #000000;
}
.text_small {
color : #ffffff;
font-size : small;
}
.title {
background-color : #8a9296;
}
.mainteaser {
background-color : #000044;
border : 2px groove blue;
font-family : arial, verdana, ms sans serif;
font-weight : bold;
font-size : 8pt;
margin : 0;
border-top : 2px solid #0000aa;
border-bottom : 2px solid #0000aa;
}
.mainteaser_text {
background-color : #000044;
color : #ecf0f1;
text-align : center;
padding : 2px;
margin : 0;
font-size : medium;
font-weight : bold;
}
#inputText {
background-color : #ffffff;
color : #000000;
border : 1px;
}
.alt2 {
color : #ffffff;
font-size : small;
}
p.c4 {
text-align : center;
}
hr.c3 {
color : blue;
background-color : blue;
height : 2px;
border : none;
}
div.c2 {
text-align : center;
}
p.c1 {
text-align : right;
}
p.c3 {
text-align : right;
}
input {
background-color : black;
border : 2px groove blue;
color : green;
font-family : arial, verdana, ms sans serif;
font-weight : bold;
font-size : 8pt;
}
input:hover {
background-color : blue;
color : red;
border : 2px groove blue;
font-family : arial, verdana, ms sans serif;
font-weight : bold;
font-size : 8pt;
}
button {
border : 1px solid blue;
background : #ccf;
}
button:hover {
border : 1px solid blue;
background : blue;
}
label {
display : block;
width : 150px;
float : left;
margin : 2px 4px 6px 4px;
text-align : right;
}
br {
clear : left;
}
inputtext {
border : 2px groove blue;
color : black;
font-family : arial, verdana, ms sans serif;
font-weight : bold;
font-size : 8pt;
}
djlee Developer · 224 posts #26

not a bad idea for protecting the css sub, but i doubt its worth it really. You would still very easily be able to copy and paste the css from the source, and if anything your hurting the site as the css wont be cached which means more bandwidth used (only affects high traffic sites i guess), longer page load times (as your sending more data) and generally not worth its salt.

But its given me an idea how we can protect css using a css filtering system. It wouldnt be easy for people to implement as they would have to change the display of their entire code but what im thinking is

  1. create a translation table for the css
  2. instead of using echo on each output line, concat all the output to a variable
  3. pass the variable through the translation script to input the css inline with elements
  4. echo the translated variable

while it would still not be cached, it would provide a hell of a lot more protection. Id go as far to say that someone would REALLY want to have you design as it would take ages to strip it all out. Maybe i'll throw up some example code for it when im not so busy, but i still say obfuscation is mostly sufficient enough to put 99% of people off.

ksg91 Developer · 162 posts #27

metulj wrote: even if you disable right click... still very very simple to get css properties...

as said many times... it is a total waste of time securing css files/s... if someone copy your style, means you did solid one, or at least someone is trying to learn some basics... either way.. really nothing to worry about😳8)

djlee wrote: Your wondering how stupid a thread is dicussing how to protect css (basically), then u suggest the one solution that NEVER has worked. Theres 100's of plugins that disable javascript on pages unless you allow them, and the source view is still available via the browser menu. So my comment still remains the only decent way to protect a piece of code that must be available in standard form to the browser and therefore the user is via obfuscation

lol guys that what i said. it can help protect users who have not much knowledge. and who really cares about css? thank god someone didnt said he want to protect his html source!

djlee wrote: not a bad idea for protecting the css sub, but i doubt its worth it really. You would still very easily be able to copy and paste the css from the source, and if anything your hurting the site as the css wont be cached which means more bandwidth used (only affects high traffic sites i guess), longer page load times (as your sending more data) and generally not worth its salt.

But its given me an idea how we can protect css using a css filtering system. It wouldnt be easy for people to implement as they would have to change the display of their entire code but what im thinking is

  1. create a translation table for the css
  2. instead of using echo on each output line, concat all the output to a variable
  3. pass the variable through the translation script to input the css inline with elements
  4. echo the translated variable

while it would still not be cached, it would provide a hell of a lot more protection. Id go as far to say that someone would REALLY want to have you design as it would take ages to strip it all out. Maybe i'll throw up some example code for it when im not so busy, but i still say obfuscation is mostly sufficient enough to put 99% of people off.

if someone really wants your css then he may also gather it from inline css.

i would say that who cares so much for his/her css really dont worth to be a coder.

Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

djlee Developer · 224 posts #28
  1. no ones saying css or html is 100% protectable, ive never said it was and i never would. no client side language can be protected
  2. inline css is a **** load harder to steal, on one of my project sites i have a main css file consisting of >100 id's and classes, add on top of that 12 per page stylesheets with around 25 each and thats a lot of inline css to root through, i very much doubt anyone would attempt to steal the full design from the source view.
  3. You cant say anyone who wants to protect their works isn't worthy to be a coder, on that statement id argue your one of the worst coders here since you dont have the ability to realise that a site can be made or broke on its chosen design and layout and once that is cloned you no longer are a unique site, users dont care who come first with the design, if your a decent site then you will be forced to change your design (unless ofcourse your design is so basic that it was never originally considered unique... like facebook)
  4. anyone that has an avatar containing the words "alt" and "f4" doesnt deserve posting privileges and really needs to find some more up to date computer funnies.
arnage Lead · 811 posts #29

Block the FireBug and the css file is protected...

In the browsers cahs will no one look, who trying to take css file.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
metulj Super moderator Principal · 1,726 posts #30

arnages wrote: Block the FireBug and the css file is protected... In the browsers cahs will no one look, who trying to take css file.

do you have some live example, where firebug is blocked ?

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

arnage Lead · 811 posts #31

No, no, I dont know how to block it and I think that it is only tool wich can see the css code without viewing the css file.

All other trics by calling it in url are ok. 😉

Just leaves the FireBug...

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
metulj Super moderator Principal · 1,726 posts #32

arnages wrote: No, no, I dont know how to block it and I think that it is only tool wich can see the css code without viewing the css file. All other trics by calling it in url are ok. 😉 Just leaves the FireBug...

well... i never ever used firebug... and since i can pick up basicly any css... i'd dare to say that firebug can't be really the only tool🤨

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

arnage Lead · 811 posts #33

So am I... 😉

Forgot that pls, I didnt understand u.

I cant find the topic about css protection where I have leaved the basics...

Most trics, in a word, are to write css file in php with seacret name, place it in the folder, at the top goes if(strpos($_SERVER['PHP_SELF'],'css.php')) exit(' FALSE CSS CODES'), change it with htaccess, and put the false css codes to be displayed via url in second attempt. First is forbbiden page.

I havent it anywere to try some things now...

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
Mysterio Lead · 630 posts #34

I have 3 things to say:

  1. Facebook Mobile has the entire css code in one line, without no spaces, and much unused classes, but I am still using it in a Facebook Clone Theme in my site.
  2. Is DjMatrix here? I catched him copying my css 😛
  3. Riderz is Mafia!

mysterio.al - programming is a functional art

centi Developer · 159 posts #36

thats how the world goes man... dont cry!!!!

😳 .................................... http://photomag.lk/ .................................... 🤨

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close