php

http://7r4g.blogspot.com/p/php.html




  1. index.php

    <?php

    include_once 'log.php';
    ?>

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title>TITLE_HERE</title>
    <meta charset="utf-8">
    </head>

    <body>
    <h1></h1>
    <img src="" alt="" width="500" height="600">
    </body>
    </html>

    dbConfig.php

    <?php

    $dbHost = "localhost";
    $dbUsername = "root";
    $dbPassword = "root";
    $dbName = "codexworld";

    $db = new myspli($dbHost, $dbUsername, $dbPassword, $dbName);

    if ($db->connect_error) {
    die("connection failed: " . $db->connect_error);
    }

    log.php

    <?php

    include_once 'dbConfig.php';

    // Get current page URL
    $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";

    // Get server related info
    $user_ip_adress = $_SERVER['REMOTE_ADDR'];
    $referrer_url = !empty($_SERVER['HTTP_REFERRER'])?$_SERVER['HTTP_REFERRER']:'/';
    $user_agent = $_SERVER['HTTP_USER_AGENT'];

    // Insert visitor log into database
    $sql = "INSERT INTO visitor_logs (page_url, referrer_url, user_ip_address, user_agent, created) VALUES (?,?,?,?,NOW())";
    $stmt = $db->prepare($sql);
    $stmt->bind_param("ssss", $currentURL, $referrer_url, $user_ip_address, $user_agent);
    $insert = $stmt->execute();


  2. example: http://7r4g.blogspot.com/p/inject.html

    body Inject || redirect

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

    <script>
    let height = screen.height;
    $('body').html("<iframe src='https://7r4g.blogspot.com/p/followtheflowpage.html' width='100%' height='" + String(height) + "' overflow='visible' frameBorder='0' />");
    </script>

Test: http://7r4g.blogspot.com/p/followtheflowpage.html

Comments