403Webshell
Server IP : 104.26.4.103  /  Your IP : 216.73.216.4
Web Server : nginx/1.27.1
System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
User : arabianexpress ( 1872)
PHP Version : 8.0.30
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v9321/rimskannur/public_html/wp-content/plugins/site-reviews/plugin/Modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v9321/rimskannur/public_html/wp-content/plugins/site-reviews/plugin/Modules/Honeypot.php
<?php

namespace GeminiLabs\SiteReviews\Modules;

use GeminiLabs\SiteReviews\Helpers\Cast;
use GeminiLabs\SiteReviews\Helpers\Str;
use GeminiLabs\SiteReviews\Modules\Html\Field;

class Honeypot
{
    public function build(string $formId): string
    {
        $field = new Field([
            'class' => 'glsr-input glsr-input-text',
            'label' => esc_html__('Your review', 'site-reviews'),
            'name' => $this->hash($formId),
            'type' => 'text',
        ]);
        $field->id = "{$field->id}-{$formId}";
        return $field->builder()->div([
            'class' => glsr(Style::class)->classes('field'),
            'style' => 'display:none;',
            'text' => $field->buildFieldLabel().$field->buildFieldElement(),
        ]);
    }

    public function hash(string $formId): string
    {
        if (is_array($formId)) { // @phpstan-ignore-line
            glsr_log()
                ->warning('Honeypot expects the submitted form ID to be a string, an array was passed instead.')
                ->debug($formId);
            glsr_trace(10);
            $formId = array_shift($formId);
        }
        $formId = Cast::toString($formId);
        return Str::hash($formId, 8);
    }

    public function verify(string $hash, string $formId): bool
    {
        return hash_equals($this->hash($formId), $hash);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit