Jump to content

egzozcu

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by egzozcu

  1. this is the complete script : <?php $file = $_POST['file']; $exploded = explode('.', basename($file)); $log_type = $exploded[0]; chdir('/tmp'); exec('cp /var/imzali_kayitlar/' . $file . ' ./'); exec('tar zxvf ' . basename($file)); // Doğrulama komutu exec('openssl ts -verify -data /tmp/' . $log_type . '.log -in /tmp/' . $log_type . '.log.der -token_in -CAfile /CA/cacert.pem -untrusted /CA/tsacert.pem', $result); if ($result[0] == 'Verification: OK') { $imza = file_get_contents($log_type . '.log.imza'); echo '<p class="success">Doğrulama başarılı!</p>'; echo '<div>' . nl2br($imza) . '</div>'; } else { echo '<p class="error">Doğrulama başarısız!</p>'; } exec('rm ' . $log_type . '.l*'); exit; I have the .log and .leases files inside a folder, and to run the script I have a webpage that I go there where there is a button beside every file then I click on the button then it runs the above script in the backgroud and shows the result if the verification is ok or not. here is some pics of the files and the webpage: when I change .log to .leases then the above will be opposite. .* or .l* doesnt work.
  2. Hello there, Like the title says. is there a thing that does the same job like in Windows? I have a folder that contains a file with .log extention and another one with .leases extention. And I have this command line: exec('openssl ts -verify -data /tmp/' . $log_type . '.log -in /tmp/' . $log_type . '.l*.der -token_in -CAfile /CA/cacert.pem -untrusted /CA/tsacert.pem', $result); when I run the above command line it starts varification process only on the file that has .log extention. And if I change the bold marked .log in the above command line with .leases then re run the command line then it start the same varification process but this time only on the file that has .leases extention. What I want here is that whenever I run the command line it detects both the files in the folder and start the verification process, no matter it is .log or .leases extention. So what is the thing I should write in the place of the bold marked .log to make it detect any extention? I have tried *.* or '.' or * or .l* but non of these worked Any help would be much appreciated. Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.