Any code to hide style.css link

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • metulj
    replied
    Originally posted by djlee View Post
    theres no way to do it SO FAR, and there NEVER will be. You cant hide client side language, the client needs to interpret what you send it to do what its gotta do. To that end if the client can get it then so can the user. even if someone brought out httpV2 that encrypted the source, browsers would need the decryption algorythm in order to use the data and therefore the user can extract that data (and that still wouldnt stop someone viewing the source unless browsers stopped that ability or only showed the encrypted stuff to make it harder for style thieves, which they wont ever do as theres no point).

    The best thing you can do is run things through obfuscation, that means use stupid css names (i.e. instead of div.header use .jh6fds6f67dshfjsdhkj) and then make it all one line, at least that way you;d be making the user work to steal the code, and in many cases they will give up.

    Another thing is that blocking browsers is also impossible, the only thing you can really use is the user agent string, anyone with an ounce of browser know-how can edit their UA string to reflect a mobiles UA string

    There is javascript code to help hide the html source too, but that relies on javascript browsers to even use the site (dont think thats too good of an idea for mobile sites just yet) and even then it only causes them hassle, thats still breakable pretty easily
    very well said
    as theres no need to say or add anything more,
    i believe this topic is ready to be locked

    Leave a comment:


  • djlee
    replied
    theres no way to do it SO FAR, and there NEVER will be. You cant hide client side language, the client needs to interpret what you send it to do what its gotta do. To that end if the client can get it then so can the user. even if someone brought out httpV2 that encrypted the source, browsers would need the decryption algorythm in order to use the data and therefore the user can extract that data (and that still wouldnt stop someone viewing the source unless browsers stopped that ability or only showed the encrypted stuff to make it harder for style thieves, which they wont ever do as theres no point).

    The best thing you can do is run things through obfuscation, that means use stupid css names (i.e. instead of div.header use .jh6fds6f67dshfjsdhkj) and then make it all one line, at least that way you;d be making the user work to steal the code, and in many cases they will give up.

    Another thing is that blocking browsers is also impossible, the only thing you can really use is the user agent string, anyone with an ounce of browser know-how can edit their UA string to reflect a mobiles UA string

    There is javascript code to help hide the html source too, but that relies on javascript browsers to even use the site (dont think thats too good of an idea for mobile sites just yet) and even then it only causes them hassle, thats still breakable pretty easily

    Leave a comment:


  • metulj
    replied
    Originally posted by firemax View Post
    yes gill. it works,

    but not possible for web browsers. only you can block access remotely.

    browse the page with Firefox, then view the source of page and click on the css file link.now you get the source of your css.

    for better results, you must block all web browsers.

    but you can't do it 100%. because if someone need a your css, he can access with them web browser using a 3rd party tool.

    in my idea, client side code hiding not possible.
    FYI... you CANT block all web browsers
    i browse all mobile sites(where WEB browsers are BLOCKED!) with my PC
    so... forget about that idea..
    as for hidding *.CSS file... forget about that aswell... theres NO way to do it so far

    Leave a comment:


  • amylee
    replied
    just face the facts there is no way to hide the css ffs...

    there is always going to be people with no artistic/graphical talent who want to copy other peoples sites
    if you want to be unique design your site more uniquely rather than protecting the ****ing css as that's a waste of time
    Last edited by amylee; 02.02.10, 15:17.

    Leave a comment:


  • firemax
    replied
    yes gill. it works,

    but not possible for web browsers. only you can block access remotely.

    browse the page with Firefox, then view the source of page and click on the css file link.now you get the source of your css.

    for better results, you must block all web browsers.

    but you can't do it 100%. because if someone need a your css, he can access with them web browser using a 3rd party tool.

    in my idea, client side code hiding not possible.
    Last edited by firemax; 02.02.10, 15:20.

    Leave a comment:


  • GiLL
    replied
    Originally posted by youngbobby View Post
    lol could you post a demo lets see exactly one @ work somewhere?

    Leave a comment:


  • youngbobby
    replied
    lol could you post a demo lets see exactly one @ work somewhere?

    Leave a comment:


  • GiLL
    replied
    Originally posted by sklbd View Post
    GiLL ,,,,,,,,, u r protected but tell ur way
    Note : its not fully protected but at last people cant get your css as link to your css file like we do as domain/style.css etc



    We're going to use .htaccess and PHP for this.

    This is what we are going to do:
    In the index file, before we include the CSS file, we're setting a key (using sessions) and in the CSS file, we check if the key is set and if it's not, we make it stop executing the code so it wont output any CSS. And if the key is set, we output the CSS code and change the key to something else.

    So basicly, the CSS file won't work without the index file, because that's where the key is set.

    Still don't get it?
    Don't worry, you'll understand when we're done coding it.

    Let's start by creating a file called index.php with this code inside


    PHP Code:
    <?php
    session_start
    ();
    $_SESSION['csskey'] = "hello";
    ?>

    <html>
        <head>
            <link rel="stylesheet" type="text/css" href="style.css" />
        </head>
        <body>
            Hello World
        </body>
    </html>

    It's very important that you don't use session_start(); before any output is sendt back to the visitor. So we're putting it at the top.
    $_SESSION['csskey'] = "hello"; -That's our key. We store the key in a session called csskey.

    Now it's time for the CSS file, but since we're going to check if the session is set, we need to use PHP, so we'll have to call the file style.php NOT style.css.

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

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

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

    body {
      background-color: #000;
      color: #fff;
    }
    We use session_start(); here too, and then we set the content-type to text/css so the browser will interpet it as a CSS file (not really necessary)
    Then we check if the csskey is NOT set to "Hello" and if it isn't we call die() wich stops the script and outputs "Protected".
    If the key is set and is correct, we set the csskey to "somethingelse" so that it can't be used again without beeing called from index.php

    And for the final step, create a file called .htaccess with this inside:

    PHP Code:
    RewriteEngine on
    RewriteRule style
    .css style.php 


    This will make style.php "look like" style.css.
    So when someone tries to open style.css they will get the contents of style.php.

    Try uploading these three files and run it.
    If it works, index.php will output "Hello World" with white text and black background.
    Also, try looking at style.css from your browser, all it should say is "Protected".

    This method is far from bulletproof but it's better then nothing if you want to protect your CSS from rippers.

    Leave a comment:


  • metulj
    replied
    Originally posted by ori View Post
    lol same goes with my site u cant directly download my css as its php but there are other ways to get the code but cos mine is php and css combined then u only see the generated css code

    http://wapdesire.com/style.php anyway see what you's can get from that link
    something like this
    PHP Code:
    body {background-color:#000000; color:#ffffff; font-family:Georgia; font-size:medium;}
    head {font-size:medium;}
    img {border:0;}
    .
    img {margin:10px;}
    smallbig{color:#4a4839;}
    aa:activea:visiteda:hover {color:#3366ff; text-decoration:none;}
    pdiv {text-align:centerwidth:100%;}
    .
    center text-align:center; }
    .
    bold font-weight:bold; }
    .
    adblock, .adblock2 background-image:url("/images/style/adblock_bg.png"); background-repeat:repeat-xcolor:#000; margin:2px 0px 2px 0px; padding:2px 0px 2px 0px; }
    .adblock a, .adblock2 a font-weight:boldcolor:#3366ff; }
    .adblock a:hover, .adblock2 a:hover font-weight:boldcolor#ff0000; }
    .adblock img, .adblock2 img height:20px; }
    .
    title color:#ffffff; padding:2px 0px 2px 0px; background-image:url("/images/style/3366ff_header_bg.png"); background-repeat:repeat-x; background-color:#000000; }
    .navi color:#ffffff; font-size:small; padding:2px 0px 2px 0px; background-image:url("/images/style/3366ff_footer_bg.png"); background-repeat:repeat-x; background-color:#000000; }
    .navi a, .navi a:active, .navi a:visited color:#000000; }
    .navi a:hover color:#ffffff; }
    .warn background-color:#ffe1bb; color:#000; font-size:small; padding:0px 20px 0px 20px; border-bottom:1px solid #ff9900; border-top:1px solid #ff9900; }
    .error background-color:#fda9a9; color:#000; font-size:small; padding:0px 20px 0px 20px; border-bottom:1px solid #ff0000; border-top:1px solid #ff9900; }
    .ok background-color:#c1ffc1; color:#000; font-size:small; padding:0px 20px 0px 20px; border-bottom:1px solid #00c000; border-top:1px solid #ff9900; } 
    ?

    Leave a comment:


  • ori
    replied
    lol same goes with my site u cant directly download my css as its php but there are other ways to get the code but cos mine is php and css combined then u only see the generated css code

    http://wapdesire.com/style.php anyway see what you's can get from that link

    Leave a comment:


  • sklbd
    replied
    GiLL ,,,,,,,,, u r protected but tell ur way

    Leave a comment:


  • sklbd
    replied
    yes u r protected but how

    Leave a comment:


  • CreativityKills
    replied
    tryin to hide css. wot a perfect way to kip an idiot busy. nw y dint i tink of dat. =/

    Leave a comment:


  • modfiles
    replied
    i got same result with amy.
    its one of the easiest site that posted in this topic to get the css. direct link from the source.

    Leave a comment:


  • amylee
    replied
    Originally posted by GiLL View Post
    you can try to see my css if you get success paste here
    link is here
    Downloads
    easy...

    Code:
    body {
    font-family : Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #000000;
    background-color: #ffffff
    }
    
    table {
      WIDTH: 100%
    }
    .nounderline {
      TEXT-DECORATION: none;
    }
    .oddrow {
      BACKGROUND-COLOR: #FFCCFF;
    }
    
    .mainrow {
      BACKGROUND-COLOR: #FF0099;
    }
     td.left{text-align: center; width:20px;}
     td.right{text-align: left;}
     a{color:#0000ff}
     div {margin: 1px 0px 0px 0px; padding: 2px;}
     div.pagetop {padding: 3px; text-align: center; background: #ffffff; border: 0px}
     div.header { padding: 5px; margin: 0px; font-weight: bold; text-align: center; background-color: #FFCCFF; border-bottom: 1px solid #b1cade}
     div.upban { padding: 3px; background-color: #EFF3F6; border-bottom: 1px dotted #AFCDDC}
    div.body {
    background-color : #ffffff;
    padding: 2px;
    border : 1px dotted #AFCDDC;
    }
     div.body1 { padding: 3px; background-color: #ffffff; border-bottom: 1px dotted #AFCDDC}
     div.downban { padding: 3px; background-color: #EFF3F6; border-bottom: 1px solid #FFFFFF}
     div.copyright { padding: 3px; background-color: #73A2C6; border: 0px}
    div.footer   { padding: 1px; background-color: #87CEFA;  border: 1px dotted #AFCDDC}
    div.wform{
            background-color: #6699FF;
            padding: 5px 2px 2px 2px;
            margin: 3px 0 0;
            border-width:1px 0;
            border-style:solid;
            border-color:#000;
    }
    hr {
            background-color: #000000;
            color: #000000;
            border: none;
            height: 1px;
    }
    a:active, a:visited, a:link, a.ads:active, a.ads:visited, a.ads:link {
    color : #0080c0;
    }
    a:hover {
    color : #004040;
    }
    a.add {
    color : #66cc00;
    }
    a.add:hover {
    color : #ff0000;
    }
    form > fieldset {
    border : 1px solid #cccccc;
    }
    form {
    margin : 2px;
    }
    input, textarea, select {
    margin : 2px;
    font-family : Verdana, arial;
    font-size : 11px;
    border : 1px solid #0080c0;
    }
    div.xxx {
    background-color : #F5F5F5;
    }
    img.image {
    margin: 0px 1px 1px 1px;
    padding: 2px 2px 2px 2px;
    border-style: solid;
    border-width:1px;
    border-color:#ff0080;
    }

    Leave a comment:

Working...
X