Skip to content

Instantly share code, notes, and snippets.

@sapran
Last active April 6, 2018 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapran/b6db2aa8bdb10f4d39fa7df95da80b0e to your computer and use it in GitHub Desktop.
Save sapran/b6db2aa8bdb10f4d39fa7df95da80b0e to your computer and use it in GitHub Desktop.
Code fragment from @ethicalhack3r's DVWA: github.com/ethicalhack3r/DVWA
<?php
$html = "";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (!isset ($_SESSION['last_session_id'])) {
$_SESSION['last_session_id'] = 0;
}
$_SESSION['last_session_id']++;
$cookie_value = $_SESSION['last_session_id'];
setcookie("dvwaSession", $cookie_value);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment