GithubHelp home page GithubHelp logo

ndum / laravel-seb Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 20 KB

Laravel Package for generating encrypted SEB (Safe Exam Browser) exam configurations

License: MIT License

PHP 100.00%
encryption exams laravel pbkdf2 php80 safeexambrowser seb

laravel-seb's Introduction

ndum github statsTop Langs

laravel-seb's People

Contributors

ndum avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

e-emad

laravel-seb's Issues

Best practice for .seb routes

Thank you for this package, I am curious how you implement the .seb files. The examples provided dd( the encryptedSebConfig. Any recommendations on how to generate the .seb file? Any specific header (e.g. X-SafeExamBrowser-RequestHash) used?

Value for key examKeySalt is NULL or doesn't have the correct class!

I've the following code in a controller, but when invoking the URL and SEB opens, it throws an error:

I've managed to store SEB logs and the error I've found in the los is the following:

2023/11/10 13:45:52:174 -[SEBConfigFileManager checkClassOfSettings:error:] Value for key examKeySalt is NULL or doesn't have the correct class!

public function sebConfig(Request $request, $attempt_id)
    {
        
        $path = storage_path('app/seb_config.json');
        $attempt = Attempt::findOrFail($attempt_id);
        $config = Storage::disk('local')->get('/seb_config.json'); // just as example...
        $startPassword = 'test';
        $quitPassword = 'test';
        $adminPassword = 'test';

        $sebConfig = json_decode($config, true);
        $sebConfig['startURL'] = url('/attempt/'.$attempt_id);
        
        //dd($sebConfig);
        $encryptedSebConfig = SebConfigGenerator::createSebConfig($sebConfig, $startPassword, $quitPassword, $adminPassword);
        //dd($encryptedSebConfig);
        // Enviar la configuración como respuesta 
        return response($encryptedSebConfig)->withHeaders([
            'Content-Type' => 'application/octet-stream',
            'Content-disposition' => 'attachment; filename=seb_config.seb'
          ]);
           
    }

The json template content is the same from the repo:
https://github.com/ndum/laravel-seb/blob/master/examples/example_seb_config.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.