Gå til innhold

Hva skjuler det seg bak din Ctrl+v?


Anbefalte innlegg

Videoannonse
Annonse

<?php session_start(); ob_start();header('content-type: text/html; charset=utf-8'); // eocms uses UTF-8!date_default_timezone_set('Europe/Paris'); // set timezone default// eocms core file$core_require = array('functions','variables');foreach($core_require as $foreach){ require_once 'core/'.$foreach.'.eocms.php';}require_once 'core/functions.eocms.php';// Secure user session$db = simplexml_load_file('core/db/cmsusers.xml');if(isset($_SESSION["eo"])){ foreach($db->user as $out){ if($out->username == $_SESSION["eo"]){ if($_COOKIE["eo_sha1pw"] == sha1($out->password)){ $sessiontrue = 1; }}} if(!$sessiontrue) { // if invalid user header('location:index.php?eomodule=log&out&toID=7'); }}// LICENSE CHECKif(!file_exists('core/db/license.dll')){die('EOCMS FATAL: No license file found');}$license = simplexml_load_file('core/db/license.dll');$check_validity = (crypt($license->key, $license->algorithm) == $license->algorithm);$check_expired = ($license->exp > time());// if it is invalidif(!$check_validity){if(isset($_SESSION["eo"])&&$_GET["eomodule"] !== "license"&&$_GET["eomodule"] !== "log"){header('location: ?eomodule=license');}}// if it has expiredif(!$check_expired){if(isset($_SESSION["eo"])&&$_GET["eomodule"] !== "license"&&$_GET["eomodule"] !== "log"){header('location: ?eomodule=license');}}// Expire login $time = 15*60; // fifteen minutes * 60 secondsif(isset($_SESSION["active"])&&(isset($_SESSION["eo"]))){$seconds = $_SESSION["active"] - time() + $time; if($seconds <= 0){ // expire session header('location:index.php?eomodule=log&out&toID=6'); } else { $_SESSION["active"] = time(); // comment away for evaluation }}else { $_SESSION["active"] = time();} /* if(isset($_SESSION["eo"])){ $seconds = $_SESSION["active"] - time() + $time; echo '<p style="font-size:80%;"> Evaluation version of eocms - You have '.$seconds.' seconds left before expiration</p>'; }*/?>

Lenke til kommentar

Dim SHA As New System.Security.Cryptography.SHA512Managed

SHA.ComputeHash(System.Text.Encoding.UTF8.GetBytes("password"))

For i As Integer = 0 To 500000 : SHA.ComputeHash(SHA.Hash) : Next

Dim SB() As Byte = SHA.Hash

 

Dim TD As New System.Security.Cryptography.TripleDESCryptoServiceProvider

TD.BlockSize = 64

 

ReDim Preserve SB(23)

TD.Key = SB

 

ReDim Preserve SB(7)

TD.IV = SB

 

Dim MemorySTR As New IO.MemoryStream

Dim CryptoSTR As New CryptoStream(MemorySTR, TD.CreateEncryptor, CryptoStreamMode.Write)

 

Dim b() As Byte = System.Text.Encoding.UTF8.GetBytes("12345678")

CryptoSTR.Write(b, 0, b.Length)

CryptoSTR.FlushFinalBlock()

 

MemorySTR.Position = 0

ReDim b(MemorySTR.Length - 1)

MemorySTR.Read(b, 0, MemorySTR.Length)

Dim s As String = System.Text.Encoding.UTF8.GetChars(b)

 

:p

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...