├── resources ├── css │ └── app.css ├── js │ ├── app.js │ └── bootstrap.js ├── views │ ├── vendor │ │ ├── mail │ │ │ ├── text │ │ │ │ ├── footer.blade.php │ │ │ │ ├── panel.blade.php │ │ │ │ ├── subcopy.blade.php │ │ │ │ ├── table.blade.php │ │ │ │ ├── button.blade.php │ │ │ │ ├── header.blade.php │ │ │ │ ├── layout.blade.php │ │ │ │ └── message.blade.php │ │ │ └── html │ │ │ │ ├── table.blade.php │ │ │ │ ├── subcopy.blade.php │ │ │ │ ├── header.blade.php │ │ │ │ ├── footer.blade.php │ │ │ │ ├── panel.blade.php │ │ │ │ ├── button.blade.php │ │ │ │ ├── message.blade.php │ │ │ │ └── layout.blade.php │ │ └── pagination │ │ │ ├── simple-default.blade.php │ │ │ ├── simple-bootstrap-4.blade.php │ │ │ ├── default.blade.php │ │ │ ├── simple-tailwind.blade.php │ │ │ ├── semantic-ui.blade.php │ │ │ └── bootstrap-4.blade.php │ ├── services │ │ └── list.blade.php │ ├── include │ │ ├── errors.blade.php │ │ └── footer.blade.php │ ├── templates │ │ └── list.blade.php │ ├── scopes │ │ └── new.blade.php │ ├── scanners │ │ ├── types.blade.php │ │ ├── list.blade.php │ │ ├── new.blade.php │ │ └── view.blade.php │ ├── errors │ │ ├── 401.blade.php │ │ ├── 403.blade.php │ │ ├── 404.blade.php │ │ ├── 419.blade.php │ │ ├── 429.blade.php │ │ ├── 500.blade.php │ │ ├── 503.blade.php │ │ └── layout.blade.php │ ├── login.blade.php │ ├── resources │ │ ├── get.blade.php │ │ └── list.blade.php │ ├── outputs │ │ └── list.blade.php │ ├── search │ │ ├── scope.blade.php │ │ └── scope_entry.blade.php │ ├── users │ │ └── index.blade.php │ ├── screenshots │ │ └── list.blade.php │ ├── queues │ │ └── list.blade.php │ └── schedule │ │ └── list.blade.php └── lang │ └── en │ ├── pagination.php │ ├── auth.php │ └── passwords.php ├── storage ├── logs │ └── laravel.log ├── app │ └── .gitignore └── framework │ ├── testing │ └── .gitignore │ ├── views │ └── .gitignore │ ├── cache │ ├── data │ │ └── .gitignore │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── database ├── .gitignore ├── seeders │ └── DatabaseSeeder.php └── factories │ └── UserFactory.php ├── bootstrap ├── cache │ └── .gitignore └── app.php ├── public ├── robots.txt ├── logo.png ├── favicon.ico ├── favicon.png ├── assets │ ├── images │ │ ├── amass.PNG │ │ ├── dashboard.PNG │ │ ├── shrewdeye-1.png │ │ ├── shrewdeye-4.png │ │ └── shrewdeye-avatar-2.jpg │ └── js │ │ └── main.js ├── .htaccess └── index.php ├── init.sh ├── routes ├── api.php ├── channels.php └── console.php ├── .gitattributes ├── tests ├── TestCase.php ├── Unit │ └── ExampleTest.php ├── Feature │ └── ExampleTest.php └── CreatesApplication.php ├── .styleci.yml ├── .gitignore ├── resource.log ├── app ├── Models │ ├── CommandQueue.php │ ├── Scanner.php │ ├── ScannerEntry.php │ ├── Template.php │ ├── ScopeTemplate.php │ ├── TemplateEntry.php │ ├── Schedule.php │ ├── Queue.php │ ├── Service.php │ ├── Output.php │ ├── Response.php │ ├── Resource.php │ └── User.php ├── Http │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrustHosts.php │ │ ├── TrimStrings.php │ │ ├── Authenticate.php │ │ ├── TrustProxies.php │ │ ├── RedirectIfAuthenticated.php │ │ └── APITokenValid.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── ServicesController.php │ │ ├── ResponseController.php │ │ ├── ScansController.php │ │ ├── ScopeEntryController.php │ │ ├── QueuesController.php │ │ ├── AuthController.php │ │ ├── SearchController.php │ │ ├── JobsController.php │ │ ├── ScheduleController.php │ │ ├── FindingsController.php │ │ ├── ResourceController.php │ │ └── ScannersController.php │ └── Kernel.php ├── Providers │ ├── BroadcastServiceProvider.php │ ├── AuthServiceProvider.php │ ├── AppServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Exceptions │ └── Handler.php ├── Events │ ├── NewJob.php │ ├── NewScopeEntry.php │ ├── NewService.php │ └── NewResource.php ├── Console │ ├── Commands │ │ ├── ClearDoneQueue.php │ │ ├── AddUser.php │ │ ├── Cacher.php │ │ ├── Export.php │ │ ├── Scheduler.php │ │ └── CleanStorage.php │ └── Kernel.php ├── Jobs │ ├── LaunchStopScanJob.php │ ├── IPParseJob.php │ ├── WipeQueueJob.php │ └── LaunchScanJob.php └── Listeners │ ├── ServiceNotification.php │ ├── ResourceNotification.php │ └── ScopeEntryNotification.php ├── .editorconfig ├── discovery.log ├── docker-compose ├── run.sh ├── nginx │ └── sheye.conf ├── docker-compose.yml └── Dockerfile ├── package.json ├── webpack.mix.js ├── server.php ├── config ├── cors.php ├── view.php ├── services.php ├── hashing.php ├── broadcasting.php ├── sanctum.php ├── filesystems.php ├── queue.php ├── cache.php └── mail.php ├── workers.sh ├── phpunit.xml ├── .env ├── .env.docker ├── README.md ├── artisan ├── composer.json ├── scanners └── screenshot │ └── pom.xml └── notify.log /resources/css/app.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/logs/laravel.log: -------------------------------------------------------------------------------- 1 | #log -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | require('./bootstrap'); 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/footer.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/panel.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/subcopy.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/table.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }} 2 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/button.blade.php: -------------------------------------------------------------------------------- 1 | {{ $slot }}: {{ $url }} 2 | -------------------------------------------------------------------------------- /public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/logo.png -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/header.blade.php: -------------------------------------------------------------------------------- 1 | [{{ $slot }}]({{ $url }}) 2 | -------------------------------------------------------------------------------- /init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | sh workers.sh & nginx & docker-php-entrypoint php-fpm -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/favicon.png -------------------------------------------------------------------------------- /public/assets/images/amass.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/assets/images/amass.PNG -------------------------------------------------------------------------------- /public/assets/images/dashboard.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/assets/images/dashboard.PNG -------------------------------------------------------------------------------- /public/assets/images/shrewdeye-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/assets/images/shrewdeye-1.png -------------------------------------------------------------------------------- /public/assets/images/shrewdeye-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/assets/images/shrewdeye-4.png -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | 2 | {{ Illuminate\Mail\Markdown::parse($slot) }} 3 | 4 | -------------------------------------------------------------------------------- /public/assets/images/shrewdeye-avatar-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zzzteph/sheye/HEAD/public/assets/images/shrewdeye-avatar-2.jpg -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ Illuminate\Mail\Markdown::parse($slot) }} 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/header.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.styleci.yml: -------------------------------------------------------------------------------- 1 | php: 2 | preset: laravel 3 | version: 8 4 | disabled: 5 | - no_unused_imports 6 | finder: 7 | not-name: 8 | - index.php 9 | - server.php 10 | js: 11 | finder: 12 | not-name: 13 | - webpack.mix.js 14 | css: true 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /public/hot 3 | /public/storage 4 | /storage/*.key 5 | /vendor 6 | .env.backup 7 | .phpunit.result.cache 8 | docker-compose.override.yml 9 | Homestead.json 10 | Homestead.yaml 11 | npm-debug.log 12 | yarn-error.log 13 | /.idea 14 | /.vscode 15 | -------------------------------------------------------------------------------- /resource.log: -------------------------------------------------------------------------------- 1 | 2 | INFO Processing jobs from the [resource] queue. 3 | 4 | 2022-10-18 20:44:00 App\Jobs\Resource\NucleiMediumSc . . .. 97,388.59ms FAIL 5 | 2022-10-18 20:45:19 App\Jobs\Resource\NmapResourceScan .... 69,798.44ms DONE 6 | 2022-10-18 20:43:53 App\Jobs\Resource\NucleiCriticalScan .. 84,891.43ms FAIL 7 | -------------------------------------------------------------------------------- /app/Models/CommandQueue.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /tests/Unit/ExampleTest.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/Scanner.php: -------------------------------------------------------------------------------- 1 | hasMany(ScannerEntry::class); 15 | } 16 | 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/ScannerEntry.php: -------------------------------------------------------------------------------- 1 | belongsTo(Scanner::class); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /database/seeders/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | create(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/Models/Template.php: -------------------------------------------------------------------------------- 1 | hasMany(TemplateEntry::class); 16 | } 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/panel.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'stripe/*', 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | get('/'); 18 | 19 | $response->assertStatus(200); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Models/ScopeTemplate.php: -------------------------------------------------------------------------------- 1 | belongsTo(Template::class); 15 | } 16 | 17 | public function scope() 18 | { 19 | return $this->belongsTo(Scope::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts() 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Models/TemplateEntry.php: -------------------------------------------------------------------------------- 1 | belongsTo(Template::class); 15 | } 16 | 17 | public function scanner_entry() 18 | { 19 | return $this->belongsTo(ScannerEntry::class); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | belongsTo(Scope::class); 17 | } 18 | 19 | public function template() 20 | { 21 | return $this->belongsTo(Template::class); 22 | } 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 18 | return route('login'); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/button.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /public/assets/js/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Dropdown menu 3 | */ 4 | document.addEventListener('DOMContentLoaded', function() { 5 | const menus = document.querySelectorAll('.navbar-burger'); 6 | const dropdowns = document.querySelectorAll('.navbar-menu'); 7 | 8 | if (menus.length && dropdowns.length) { 9 | for (var i = 0; i < menus.length; i++) { 10 | menus[i].addEventListener('click', function() { 11 | for (var j = 0; j < dropdowns.length; j++) { 12 | dropdowns[j].classList.toggle('is-active'); 13 | } 14 | }); 15 | } 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /webpack.mix.js: -------------------------------------------------------------------------------- 1 | const mix = require('laravel-mix'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Mix Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Mix provides a clean, fluent API for defining some Webpack build steps 9 | | for your Laravel applications. By default, we are compiling the CSS 10 | | file for the application as well as bundling up all the JS files. 11 | | 12 | */ 13 | 14 | mix.js('resources/js/app.js', 'public/js') 15 | .postCss('resources/css/app.css', 'public/css', [ 16 | // 17 | ]); 18 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/message.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::layout') 2 | {{-- Header --}} 3 | @slot('header') 4 | @component('mail::header', ['url' => config('app.url')]) 5 | {{ config('app.name') }} 6 | @endcomponent 7 | @endslot 8 | 9 | {{-- Body --}} 10 | {{ $slot }} 11 | 12 | {{-- Subcopy --}} 13 | @isset($subcopy) 14 | @slot('subcopy') 15 | @component('mail::subcopy') 16 | {{ $subcopy }} 17 | @endcomponent 18 | @endslot 19 | @endisset 20 | 21 | {{-- Footer --}} 22 | @slot('footer') 23 | @component('mail::footer') 24 | © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') 25 | @endcomponent 26 | @endslot 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? '' 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = [ 16 | // 'App\Models\Model' => 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'password' => 'The provided password is incorrect.', 18 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /resources/views/services/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 |

Services

4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | @foreach ($services as $key=>$value) 16 | 17 | 21 | 25 | 26 | 27 | 28 | 29 | @endforeach 30 | 31 |
PortCount
18 | {{$key}} 19 | 20 | 22 | {{$value}} 23 | 24 |
32 |
33 | 34 | 35 | @include('include.footer') -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/text/message.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::layout') 2 | {{-- Header --}} 3 | @slot('header') 4 | @component('mail::header', ['url' => config('app.url')]) 5 | {{ config('app.name') }} 6 | @endcomponent 7 | @endslot 8 | 9 | {{-- Body --}} 10 | {{ $slot }} 11 | 12 | {{-- Subcopy --}} 13 | @isset($subcopy) 14 | @slot('subcopy') 15 | @component('mail::subcopy') 16 | {{ $subcopy }} 17 | @endcomponent 18 | @endslot 19 | @endisset 20 | 21 | {{-- Footer --}} 22 | @slot('footer') 23 | @component('mail::footer') 24 | © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') 25 | @endcomponent 26 | @endslot 27 | @endcomponent 28 | -------------------------------------------------------------------------------- /docker-compose/nginx/sheye.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name _; 4 | root /var/www/html/public; 5 | large_client_header_buffers 4 16k; 6 | index index.php; 7 | 8 | client_max_body_size 100m; 9 | charset utf-8; 10 | 11 | location / { 12 | try_files $uri $uri/ /index.php?$query_string; 13 | gzip_static on; 14 | } 15 | 16 | location = /favicon.ico { access_log off; log_not_found off; } 17 | location = /robots.txt { access_log off; log_not_found off; } 18 | 19 | error_page 404 /index.php; 20 | 21 | location ~ \.php$ { 22 | fastcgi_pass 127.0.0.1:9000; 23 | fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; 24 | include fastcgi_params; 25 | } 26 | 27 | location ~ /\.(?!well-known).* { 28 | deny all; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'Your password has been reset!', 17 | 'sent' => 'We have emailed your password reset link!', 18 | 'throttled' => 'Please wait before retrying.', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that email address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 19 | @endif 20 | -------------------------------------------------------------------------------- /app/Models/Queue.php: -------------------------------------------------------------------------------- 1 | belongsTo(Scope::class); 18 | } 19 | 20 | 21 | public function resource() 22 | { 23 | return Resource::find($this->object_id); 24 | } 25 | 26 | public function scope_entry() 27 | { 28 | return ScopeEntry::find($this->object_id); 29 | } 30 | 31 | public function service() 32 | { 33 | return Service::find($this->object_id); 34 | } 35 | public function scanner_entry() 36 | { 37 | return $this->belongsTo(ScannerEntry::class); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /resources/views/include/errors.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | @if ($errors->any() || Session::has('success')) 5 | 6 |
7 | @if ($errors->any()) 8 |
9 |
10 |

Error

11 |
12 |
13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 |
20 | @endif 21 | @if (Session::has('success')) 22 | 23 |
24 |
25 | 26 |
27 |
28 |
    29 |
  • {{ Session::get('success') }}
  • 30 |
31 |
32 |
33 | 34 | 35 | 36 | @endif 37 | 38 | 39 |
40 | 41 | @endif -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /resources/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | window._ = require('lodash'); 2 | 3 | /** 4 | * We'll load the axios HTTP library which allows us to easily issue requests 5 | * to our Laravel back-end. This library automatically handles sending the 6 | * CSRF token as a header based on the value of the "XSRF" token cookie. 7 | */ 8 | 9 | window.axios = require('axios'); 10 | 11 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; 12 | 13 | /** 14 | * Echo exposes an expressive API for subscribing to channels and listening 15 | * for events that are broadcast by Laravel. Echo and event broadcasting 16 | * allows your team to easily build robust real-time web applications. 17 | */ 18 | 19 | // import Echo from 'laravel-echo'; 20 | 21 | // window.Pusher = require('pusher-js'); 22 | 23 | // window.Echo = new Echo({ 24 | // broadcaster: 'pusher', 25 | // key: process.env.MIX_PUSHER_APP_KEY, 26 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 27 | // forceTLS: true 28 | // }); 29 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | > 14 | */ 15 | protected $dontReport = [ 16 | // 17 | ]; 18 | 19 | /** 20 | * A list of the inputs that are never flashed for validation exceptions. 21 | * 22 | * @var array 23 | */ 24 | protected $dontFlash = [ 25 | 'current_password', 26 | 'password', 27 | 'password_confirmation', 28 | ]; 29 | 30 | /** 31 | * Register the exception handling callbacks for the application. 32 | * 33 | * @return void 34 | */ 35 | public function register() 36 | { 37 | $this->reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Events/NewJob.php: -------------------------------------------------------------------------------- 1 | job = $job; 26 | } 27 | 28 | /** 29 | * Get the channels the event should broadcast on. 30 | * 31 | * @return \Illuminate\Broadcasting\Channel|array 32 | */ 33 | public function broadcastOn() 34 | { 35 | return new PrivateChannel('channel-name'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /docker-compose/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | services: 3 | app: 4 | build: 5 | args: 6 | user: sheye 7 | uid: 1000 8 | context: ./.. 9 | dockerfile: ./docker-compose/Dockerfile 10 | image: sheye 11 | container_name: sheye-app 12 | restart: unless-stopped 13 | working_dir: /var/www/html 14 | ports: 15 | - 80:80 16 | volumes: 17 | - storage:/var/www/html/storage 18 | networks: 19 | - sheye-network 20 | depends_on: 21 | - db 22 | 23 | db: 24 | image: mariadb:10.2 25 | container_name: sheye-db 26 | restart: on-failure 27 | environment: 28 | MYSQL_DATABASE: scanner 29 | MYSQL_ROOT_PASSWORD: scanner 30 | MYSQL_PASSWORD: scanner 31 | MYSQL_USER: scanner 32 | volumes: 33 | - dbdata:/var/lib/mysql 34 | networks: 35 | - sheye-network 36 | 37 | networks: 38 | sheye-network: 39 | driver: bridge 40 | volumes: 41 | dbdata: 42 | driver: local 43 | storage: 44 | driver: local 45 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 26 | return redirect(RouteServiceProvider::HOME); 27 | } 28 | } 29 | 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /workers.sh: -------------------------------------------------------------------------------- 1 | while [ true ] 2 | do 3 | 4 | queues=$(ps aux| grep -v grep| grep "queue:work database --queue=listeners" | wc -l); 5 | if [ "$queues" -lt "1" ]; then 6 | 7 | php artisan queue:work database --queue=listeners --sleep=3 > notify.log & 8 | fi 9 | 10 | 11 | queues=$(ps aux| grep -v grep| grep "queue:work database --queue=discovery" | wc -l); 12 | if [ "$queues" -lt "3" ]; then 13 | 14 | php artisan queue:work database --queue=discovery --sleep=3 > discovery.log & 15 | fi 16 | queues=$(ps aux| grep -v grep| grep "queue:work database --queue=resource" | wc -l); 17 | if [ "$queues" -lt "5" ]; then 18 | 19 | php artisan queue:work database --queue=resource --sleep=3 > resource.log & 20 | fi 21 | 22 | queues=$(ps aux| grep -v grep| grep "queue:work database --queue=analyze" | wc -l); 23 | if [ "$queues" -lt "2" ]; then 24 | 25 | php artisan queue:work database --queue=analyze --sleep=3 > resource.log & 26 | fi 27 | 28 | 29 | 30 | 31 | php artisan schedule:run 32 | 33 | 34 | 35 | 36 | sleep 60 37 | done 38 | -------------------------------------------------------------------------------- /app/Events/NewScopeEntry.php: -------------------------------------------------------------------------------- 1 | entry = $entry; 26 | } 27 | /** 28 | * Get the channels the event should broadcast on. 29 | * 30 | * @return \Illuminate\Broadcasting\Channel|array 31 | */ 32 | public function broadcastOn() 33 | { 34 | return new PrivateChannel('channel-name'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Events/NewService.php: -------------------------------------------------------------------------------- 1 | service = $service; 26 | } 27 | 28 | /** 29 | * Get the channels the event should broadcast on. 30 | * 31 | * @return \Illuminate\Broadcasting\Channel|array 32 | */ 33 | public function broadcastOn() 34 | { 35 | return new PrivateChannel('channel-name'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Console/Commands/ClearDoneQueue.php: -------------------------------------------------------------------------------- 1 | get(); 43 | foreach($queues as $queue) 44 | { 45 | $queue->delete(); 46 | } 47 | 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/Http/Controllers/ServicesController.php: -------------------------------------------------------------------------------- 1 | where('id',$id)->firstOrFail(); 24 | $services=array(); 25 | foreach($scope->services as $service) 26 | { 27 | if(!isset($services[$service->port])) 28 | $services[$service->port]=0; 29 | $services[$service->port]++; 30 | 31 | } 32 | ksort($services); 33 | return view('services.list',['scope' => $scope,'services'=>$services]); 34 | } 35 | 36 | 37 | 38 | } -------------------------------------------------------------------------------- /app/Events/NewResource.php: -------------------------------------------------------------------------------- 1 | resource = $res; 29 | } 30 | 31 | /** 32 | * Get the channels the event should broadcast on. 33 | * 34 | * @return \Illuminate\Broadcasting\Channel|array 35 | */ 36 | public function broadcastOn() 37 | { 38 | return new PrivateChannel('channel-name'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Middleware/APITokenValid.php: -------------------------------------------------------------------------------- 1 | header('API-KEY')!=null) 21 | $key = $request->header('API-KEY'); 22 | if($request->input('api_key')!=null) 23 | $key = $request->input('api_key'); 24 | if ($key==null) { 25 | return response()->json(['error' => 'No api_key set']); 26 | } 27 | 28 | $user=User::where('api_key',$key)->first(); 29 | if($user==null) 30 | { 31 | return response()->json(['error' => 'No valid api_key']); 32 | } 33 | 34 | 35 | 36 | return $next($request); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/Console/Commands/AddUser.php: -------------------------------------------------------------------------------- 1 | name=$this->argument('user'); 45 | $user->password=Hash::make($this->argument('password')); 46 | $user->email="test@shrewdeye.app"; 47 | $user->save(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | $this->faker->name(), 19 | 'email' => $this->faker->unique()->safeEmail(), 20 | 'email_verified_at' => now(), 21 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 22 | 'remember_token' => Str::random(10), 23 | ]; 24 | } 25 | 26 | /** 27 | * Indicate that the model's email address should be unverified. 28 | * 29 | * @return \Illuminate\Database\Eloquent\Factories\Factory 30 | */ 31 | public function unverified() 32 | { 33 | return $this->state(function (array $attributes) { 34 | return [ 35 | 'email_verified_at' => null, 36 | ]; 37 | }); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Models/Service.php: -------------------------------------------------------------------------------- 1 | hasOne(Response::class); 19 | } 20 | 21 | public function screenshot() 22 | { 23 | return $this->hasOne(Response::class)->where('size','!=',0); 24 | } 25 | 26 | 27 | public function resource() 28 | { 29 | return $this->belongsTo(Resource::class); 30 | } 31 | 32 | 33 | public function scope_entry() 34 | { 35 | return $this->belongsTo(ScopeEntry::class); 36 | } 37 | public function scope() 38 | { 39 | return $this->belongsTo(Scope::class); 40 | } 41 | 42 | protected static function booted() 43 | { 44 | static::created(function ($tmp) { 45 | NewService::dispatch($tmp); 46 | }); 47 | } 48 | 49 | 50 | } 51 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | resource_path('views'), 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => env( 32 | 'VIEW_COMPILED_PATH', 33 | realpath(storage_path('framework/views')) 34 | ), 35 | 36 | ]; 37 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 27 | @endif 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/ResponseController.php: -------------------------------------------------------------------------------- 1 | where('id',$scope_id)->firstOrFail(); 19 | return view('screenshots.list',['screenshots' => $scope->screenshots()->orderBy('updated_at', 'desc')->paginate(50),'scope'=>$scope]); 20 | } 21 | 22 | public function scope_entry_screenshots($scope_id,$scope_entry_id) 23 | { 24 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 25 | $scope_entry=ScopeEntry::where('scope_id',$scope->id)->where('id',$scope_entry_id)->firstOrFail(); 26 | return view('screenshots.list',['screenshots' => $scope_entry->screenshots()->orderBy('updated_at', 'desc')->paginate(50),'scope'=>$scope,'scope_entry'=>$scope_entry]); 27 | } 28 | 29 | 30 | 31 | 32 | 33 | } -------------------------------------------------------------------------------- /app/Http/Controllers/ScansController.php: -------------------------------------------------------------------------------- 1 | where('id',$scope_id)->firstOrFail(); 30 | 31 | LaunchScanJob::dispatch($scope); 32 | return back(); 33 | } 34 | 35 | 36 | 37 | public function scope_scan_stop($scope_id) 38 | { 39 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 40 | LaunchStopScanJob::dispatch($scope); 41 | return back(); 42 | } 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | } -------------------------------------------------------------------------------- /app/Models/Output.php: -------------------------------------------------------------------------------- 1 | belongsTo(Resource::class); 16 | } 17 | 18 | public function getFineReportAttribute() 19 | { 20 | $result=""; 21 | 22 | if($this->type=='nuclei') 23 | { 24 | $lines=explode(PHP_EOL,$this->report); 25 | 26 | foreach($lines as $line) 27 | { 28 | $data=explode("\t",$line,2); 29 | if(count($data)!=2)continue; 30 | $result.="".$data[0]." ".htmlentities($data[1])."
"; 31 | } 32 | return $result; 33 | } 34 | if($this->type=='dirsearch') 35 | { 36 | 37 | $lines=explode(PHP_EOL,$this->report); 38 | for($i=2;$i10)break; 41 | $result.=$lines[$i].PHP_EOL; 42 | } 43 | return "

Count:".count($lines)."

".$result."
"; 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /resources/views/templates/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 |

Templates

4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | @foreach ($templates as $template) 16 | 17 | 22 | 34 | 35 | 36 | 37 | @endforeach 38 | 39 |
Name
18 | {{ $template->name }} 19 | 20 | 21 | 23 |
24 | @method('delete') 25 | @csrf 26 | 32 |
33 |
40 |
41 | 42 | 43 | @include('include.footer') -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.eu.mailgun.net'), 21 | ], 22 | 23 | 'postmark' => [ 24 | 'token' => env('POSTMARK_TOKEN'), 25 | ], 26 | 27 | 'ses' => [ 28 | 'key' => env('AWS_ACCESS_KEY_ID'), 29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 31 | ], 32 | 'google' => [ 33 | 'client_id' => env('GOOGLE_CLIENT_ID'), 34 | 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 35 | 'redirect' => env('GOOGLE_REDIRECT_URI') 36 | ], 37 | ]; 38 | -------------------------------------------------------------------------------- /resources/views/scopes/new.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 |

Create new project

4 |
5 | @csrf 6 |
7 | 8 |
9 | 10 |
11 |
12 |
13 | 14 |
15 | 16 |
17 |

Each domain should start from new line.

18 | 19 |
20 |
21 |
22 |
23 | 29 |
30 |
31 |

Default workflow.

32 |
33 | 34 | 35 |
36 |
37 | 38 |
39 |
40 | 41 |
42 | 43 | @include('include.footer') -------------------------------------------------------------------------------- /app/Console/Commands/Cacher.php: -------------------------------------------------------------------------------- 1 | debug('===============================DATA:CACHE======================================================='); 40 | if(env('ENABLE_DATA_CACHE',false)==true) 41 | { 42 | 43 | CacheJob::dispatch(false); 44 | Log::channel('data:cache')->debug('Cache dispatched'); 45 | } 46 | Log::channel('data:cache')->debug('================================================================================================='); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | ./tests/Unit 10 | 11 | 12 | ./tests/Feature 13 | 14 | 15 | 16 | 17 | ./app 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/Models/Response.php: -------------------------------------------------------------------------------- 1 | belongsTo(Service::class); 18 | } 19 | public function resource() 20 | { 21 | return $this->belongsTo(Resource::class); 22 | } 23 | 24 | 25 | public function scope_entry() 26 | { 27 | return $this->belongsTo(ScopeEntry::class); 28 | } 29 | public function scope() 30 | { 31 | return $this->belongsTo(Scope::class); 32 | } 33 | 34 | 35 | public function getScreenUrlAttribute() 36 | { 37 | return str_replace(storage_path()."/app/public","/storage",$this->path); 38 | 39 | } 40 | 41 | 42 | public function getPreviewUrlAttribute() 43 | { 44 | return str_replace(storage_path()."/app/public","/storage",$this->preview); 45 | 46 | } 47 | 48 | public function getTitleShortAttribute() 49 | { 50 | if (strlen($this->title) > 30) 51 | return substr($this->title, 0, 30) . '..'; 52 | return $this->title; 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /app/Jobs/LaunchStopScanJob.php: -------------------------------------------------------------------------------- 1 | scope=$scope; 33 | $this->onQueue('listeners'); 34 | } 35 | 36 | public function uniqueId() 37 | { 38 | return $this->scope->id; 39 | } 40 | 41 | public function handle() 42 | { 43 | 44 | 45 | foreach($this->scope->queues()->where('status','!=', 'done')->get() as $queue) 46 | { 47 | $queue->delete(); 48 | } 49 | 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('push:queue')->everyTwoMinutes(); 19 | $schedule->command('wipe:queue')->hourly(); 20 | $schedule->command('wipe:done')->hourly(); 21 | $schedule->command('wipe:storage')->hourly(); 22 | $schedule->command('scheduler:run daily')->daily(); 23 | $schedule->command('scheduler:run weekly')->weekly(); 24 | $schedule->command('scheduler:run monthly')->monthly(); 25 | $schedule->command('scheduler:run quarterly')->quarterly(); 26 | 27 | //rebuild cache 28 | $schedule->command('data:cache')->hourly(); 29 | $schedule->command('schedule:clear-cache')->daily(); 30 | 31 | 32 | } 33 | 34 | /** 35 | * Register the commands for the application. 36 | * 37 | * @return void 38 | */ 39 | protected function commands() 40 | { 41 | $this->load(__DIR__.'/Commands'); 42 | 43 | require base_path('routes/console.php'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | APP_NAME=ShrewdEye 2 | APP_ENV=local 3 | APP_KEY=base64:NnVIEDqK3H6V8ep2Qdk0Yc+Az2LFE1fBLEyRqv5xRVQ= 4 | APP_DEBUG=true 5 | APP_URL=https://shrewdeye.app 6 | 7 | LOG_CHANNEL=daily 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=127.0.0.1 13 | DB_PORT=3306 14 | DB_DATABASE=scanner 15 | DB_USERNAME=scanner 16 | DB_PASSWORD=scanner 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=database 20 | FILESYSTEM_DRIVER=local 21 | QUEUE_CONNECTION=database 22 | SESSION_DRIVER=database 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=mailgun 32 | MAIL_HOST=mailhog 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS=null 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | UPLOAD_TO_S3=false 41 | #SET TRUE TO UPLOAD TO CLOUD 42 | AWS_ACCESS_KEY_ID= 43 | AWS_SECRET_ACCESS_KEY= 44 | AWS_DEFAULT_REGION= 45 | AWS_BUCKET= 46 | AWS_USE_PATH_STYLE_ENDPOINT= 47 | AWS_URL= 48 | AWS_ENDPOINT= 49 | 50 | PUSHER_APP_ID= 51 | PUSHER_APP_KEY= 52 | PUSHER_APP_SECRET= 53 | PUSHER_APP_CLUSTER=mt1 54 | 55 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 56 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 57 | 58 | #MAX_TASKS 59 | MAX_TASKS=10 60 | #CACHE 61 | ENABLE_DATA_CACHE=false 62 | CACHE_TIMEOUT=3600 63 | 64 | -------------------------------------------------------------------------------- /.env.docker: -------------------------------------------------------------------------------- 1 | APP_NAME=ShrewdEye 2 | APP_ENV=local 3 | APP_KEY=base64:NnVIEDqK3H6V8ep2Qdk0Yc+Az2LFE1fBLEyRqv5xRVQ= 4 | APP_DEBUG=true 5 | APP_URL=https://shrewdeye.app 6 | 7 | LOG_CHANNEL=stack 8 | LOG_DEPRECATIONS_CHANNEL=null 9 | LOG_LEVEL=debug 10 | 11 | DB_CONNECTION=mysql 12 | DB_HOST=sheye-db 13 | DB_PORT=3306 14 | DB_DATABASE=scanner 15 | DB_USERNAME=scanner 16 | DB_PASSWORD=scanner 17 | 18 | BROADCAST_DRIVER=log 19 | CACHE_DRIVER=database 20 | FILESYSTEM_DRIVER=local 21 | QUEUE_CONNECTION=database 22 | SESSION_DRIVER=database 23 | SESSION_LIFETIME=120 24 | 25 | MEMCACHED_HOST=127.0.0.1 26 | 27 | REDIS_HOST=127.0.0.1 28 | REDIS_PASSWORD=null 29 | REDIS_PORT=6379 30 | 31 | MAIL_MAILER=mailgun 32 | MAIL_HOST=mailhog 33 | MAIL_PORT=1025 34 | MAIL_USERNAME=null 35 | MAIL_PASSWORD=null 36 | MAIL_ENCRYPTION=null 37 | MAIL_FROM_ADDRESS=null 38 | MAIL_FROM_NAME="${APP_NAME}" 39 | 40 | UPLOAD_TO_S3=false 41 | #SET TRUE TO UPLOAD TO CLOUD 42 | AWS_ACCESS_KEY_ID= 43 | AWS_SECRET_ACCESS_KEY= 44 | AWS_DEFAULT_REGION= 45 | AWS_BUCKET= 46 | AWS_USE_PATH_STYLE_ENDPOINT= 47 | AWS_URL= 48 | AWS_ENDPOINT= 49 | 50 | PUSHER_APP_ID= 51 | PUSHER_APP_KEY= 52 | PUSHER_APP_SECRET= 53 | PUSHER_APP_CLUSTER=mt1 54 | 55 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 56 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 57 | 58 | #MAX_TASKS 59 | MAX_TASKS=10 60 | #CACHE 61 | ENABLE_DATA_CACHE=true 62 | CACHE_TIMEOUT=3600 63 | -------------------------------------------------------------------------------- /resources/views/scanners/types.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 |

Available scanners types

4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @foreach ($scanners as $scanner) 19 | 20 | 24 | 27 | 40 | 43 | 46 | 47 | 48 | 49 | @endforeach 50 | 51 |
ClassTypeArgumentsDescriptionAvailable
21 | {{ $scanner->class }} 22 | 23 | 25 | {{ $scanner->type }} 26 | 28 | @if($scanner->has_arguments) 29 | 30 | 31 | 32 | 33 | @else 34 | 35 | 36 | 37 | 38 | @endif 39 | 41 | {{ $scanner->type }} 42 | 44 | {{ $scanner->type }} 45 |
52 |
53 | 54 | 55 | @include('include.footer') -------------------------------------------------------------------------------- /resources/views/errors/401.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 401 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 401 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /resources/views/errors/403.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 403 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 403 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /resources/views/errors/404.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 404 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 404 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /resources/views/errors/419.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 419 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 419 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /resources/views/errors/429.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 429 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 429 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /resources/views/errors/500.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 500 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 500 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 503 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 |
23 | Error 503 24 |

Page not found

25 |

Sorry! We are unable to find the page you are looking for

26 | 29 |
30 |
31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /app/Console/Commands/Export.php: -------------------------------------------------------------------------------- 1 | argument('scope_id'); 44 | $scope_entries=ScopeEntry::where('scope_id',$scope_id)->get(); 45 | 46 | foreach($scope_entries as $entry) 47 | { 48 | foreach($entry->resources as $resource) 49 | { 50 | 51 | if(strpos($resource->name, ".".$entry->source)===FALSE)continue; 52 | Storage::append("export/".$entry->source.".txt", $resource->name); 53 | } 54 | 55 | } 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | } 64 | } -------------------------------------------------------------------------------- /app/Http/Controllers/ScopeEntryController.php: -------------------------------------------------------------------------------- 1 | where('id',$scope_id)->firstOrFail(); 25 | $scope_entries=ScopeEntry::where('scope_id',$scope->id)->orderBy('updated_at','desc')->paginate(25); 26 | 27 | return view('scope_entries.list',['scope' => $scope,'scope_entries'=>$scope_entries,'templates' => Template::all()]); 28 | 29 | } 30 | 31 | public function delete($scope_id,$id) 32 | { 33 | //todo make delete normal 34 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 35 | $scope_entry=ScopeEntry::where('scope_id',$scope_id)->where('id',$id)->firstOrFail(); 36 | WipeQueueJob::dispatch("scope_entry",$scope_entry->id); 37 | $scope_entry->delete(); 38 | return redirect()->back(); 39 | } 40 | 41 | 42 | 43 | 44 | } -------------------------------------------------------------------------------- /app/Models/Resource.php: -------------------------------------------------------------------------------- 1 | hasMany(Service::class); 20 | } 21 | 22 | public function print_services() 23 | { 24 | $result=""; 25 | foreach($this->services() as $service) 26 | { 27 | $result.=$service->port." "; 28 | } 29 | return $result; 30 | } 31 | 32 | public function screenshots() 33 | { 34 | return $this->hasMany(Response::class)->where('size','!=',0); 35 | } 36 | 37 | public function outputs() 38 | { 39 | return $this->hasMany(Output::class); 40 | } 41 | 42 | public function responses() 43 | { 44 | return $this->hasMany(Response::class); 45 | } 46 | 47 | public function scope() 48 | { 49 | return $this->belongsTo(Scope::class); 50 | } 51 | 52 | 53 | 54 | 55 | public function scope_entry() 56 | { 57 | return $this->belongsTo(ScopeEntry::class); 58 | } 59 | 60 | 61 | protected static function booted() 62 | { 63 | static::created(function ($tmp) { 64 | NewResource::dispatch($tmp); 65 | }); 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /resources/views/vendor/mail/html/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 25 | 26 | 27 | 28 | 29 | 30 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /app/Jobs/IPParseJob.php: -------------------------------------------------------------------------------- 1 | onQueue('listeners'); 31 | $this->entry=$entry; 32 | 33 | } 34 | 35 | 36 | public function handle() 37 | { 38 | 39 | if($this->entry->type!=='ip_list') 40 | { 41 | return; 42 | } 43 | 44 | $range = array(); 45 | $cidr = explode('/', $this->entry->source); 46 | $start= (ip2long($cidr[0])) & ((-1 << (32 - (int)$cidr[1]))); 47 | $end = ($start) + pow(2, (32 - (int)$cidr[1])) - 1; 48 | 49 | for(;$start<$end;$start++) 50 | { 51 | 52 | 53 | $resource=new Resource; 54 | $resource->name= long2ip($start); 55 | $resource->type="ip"; 56 | $resource->scope_entry_id=$this->entry->id; 57 | $resource->scope_id=$this->entry->scope->id; 58 | $resource->save(); 59 | } 60 | 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /resources/views/scanners/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 |

Scanners

4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | @foreach ($scanners as $scanner) 19 | 20 | 25 | 28 | 31 | 34 | 46 | 47 | 48 | 49 | @endforeach 50 | 51 |
NameTypeArgumentsClass
21 | {{ $scanner->name }} 22 | 23 | 24 | 26 | {{ $scanner->scanner->type }} 27 | 29 | {{ $scanner->arguments }} 30 | 32 | {{ $scanner->scanner->class }} 33 | 35 |
36 | @method('delete') 37 | @csrf 38 | 44 |
45 |
52 |
53 | 54 | 55 | @include('include.footer') -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | > 28 | */ 29 | protected $listen = [ 30 | Registered::class => [ 31 | SendEmailVerificationNotification::class, 32 | ], 33 | NewResource::class => [ 34 | ResourceNotification::class, 35 | ], 36 | NewScopeEntry::class => [ 37 | ScopeEntryNotification::class, 38 | ], 39 | NewService::class => [ 40 | ServiceNotification::class, 41 | ], 42 | NewJob::class => [ 43 | MakeJobNotification::class, 44 | ], 45 | 46 | ]; 47 | 48 | /** 49 | * Register any events for your application. 50 | * 51 | * @return void 52 | */ 53 | public function boot() 54 | { 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/Http/Controllers/QueuesController.php: -------------------------------------------------------------------------------- 1 | $user->queues()->orderBy('status', 'asc')->orderBy('updated_at', 'desc')->paginate(50)]); 22 | } 23 | 24 | public function scope_queues_list($scope_id,$type=false) 25 | { 26 | $user = Auth::user(); 27 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 28 | switch($type) 29 | { 30 | case "running":$queues=$scope->queues()->where('status','running')->orWhere('status','queued')->orderBy('updated_at', 'asc')->paginate(50);break; 31 | case "done":$queues=$scope->queues()->where('status','done')->orderBy('updated_at', 'asc')->paginate(50);break; 32 | case "todo":$queues=$scope->queues()->where('status','todo')->orderBy('updated_at', 'asc')->paginate(50);break; 33 | default:$queues=$scope->queues()->orderBy('status', 'asc')->orderBy('updated_at', 'asc')->paginate(50); 34 | } 35 | 36 | return view('queues.list',['queues' =>$queues,'scope'=>$scope]); 37 | } 38 | 39 | public function delete($queue_id) 40 | { 41 | 42 | Queue::where('user_id', Auth::id())->where('id',$queue_id)->delete(); 43 | 44 | return back(); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /resources/views/errors/layout.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title') 8 | 9 | 10 | 43 | 44 | 45 |
46 |
47 |
48 | @yield('message') 49 |
50 |
51 |
52 | 53 | 54 | -------------------------------------------------------------------------------- /resources/views/login.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 |
3 |
4 |
5 |
6 |

Sign-in

7 | 8 | 9 | 10 | 11 |

Please login to proceed.

12 |
13 |
14 | @csrf 15 |
16 |
17 | 18 |
19 |
20 | 21 |
22 |
23 | 24 |
25 |
26 | 27 | 28 |
29 | 30 | 31 | 32 | 33 | 34 |
35 |
36 |
37 |
38 |
39 | @include('include.footer') 40 | 41 | 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | 5 |

6 | 7 | 8 | # ShrewdEye 9 | 10 | **ShrewdEye** (sheye) is a set of utilities bundled into a single automated workflow to improve, simplify, and speed up resource discovery and vulnerabilities finding. 11 | 12 | 13 | 14 | 15 | # Setup 16 | 17 | ## Docker 18 | 19 | First you need to install docker on your system. After that navigate ```docker-compose``` folder and run ```run.sh``` or type next commands 20 | 21 | ``` 22 | docker-compose up -d 23 | sleep 30 24 | docker-compose exec app php artisan key:generate 25 | docker-compose exec app php artisan migrate 26 | docker-compose exec app php artisan db:seed --class=ScannerSeeder 27 | docker-compose exec app php artisan db:seed --class=ScanEntrySeeder 28 | docker-compose exec app php artisan db:seed --class=TemplateSeeder 29 | docker-compose exec app php artisan add:user admin admin 30 | 31 | ``` 32 | 33 | 34 | ## Manual setup 35 | 36 | Please, take a look at [Wiki](https://github.com/zzzteph/sheye/wiki/Setup) for manual setup guide. 37 | 38 | 39 | 40 | # Scanners and tools 41 | 42 | - [amass](https://github.com/OWASP/Amass) 43 | - [subfinder](https://github.com/projectdiscovery/subfinder) 44 | - [assetfinder](https://github.com/tomnomnom/assetfinder) 45 | - [gau](https://github.com/lc/gau) 46 | - [dnsx](https://github.com/projectdiscovery/dnsx) 47 | - [nmap](https://nmap.org/) 48 | - [nuclei](https://github.com/projectdiscovery/nuclei) 49 | - [dirsearch](https://github.com/maurosoria/dirsearch) 50 | - [screenshot](https://github.com/zzzteph/screenshot) 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /app/Listeners/ServiceNotification.php: -------------------------------------------------------------------------------- 1 | service->id); 35 | if($service!==null && $service->resource!=null && $service->resource->scope_entry!=null && $service->resource->scope_entry->scope!=null) 36 | { 37 | 38 | $scope=$service->resource->scope_entry->scope; 39 | $template=$scope->scope_template->template; 40 | 41 | foreach($template->template_entries as $entry) 42 | { 43 | 44 | 45 | if($entry->scanner_entry->scanner->type!='service')continue; 46 | $tmp=new Queue; 47 | $tmp->object_type="service"; 48 | $tmp->object_id=$service->id; 49 | $tmp->user_id=$service->resource->scope_entry->scope->user_id; 50 | $tmp->scanner_entry_id=$entry->scanner_entry->id; 51 | $tmp->scope_id=$service->resource->scope_entry->scope->id; 52 | $tmp->type="chain"; 53 | $tmp->save(); 54 | } 55 | 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /app/Http/Controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | validate([ 21 | 'name' => 'required', 22 | 'password' => 'required', 23 | ]); 24 | $user = User::where('name', $request->input('name'))->first(); 25 | if(is_null($user)){ 26 | return back()->withErrors([ 27 | 'message' => 'User or password wrong', 28 | ]); 29 | } 30 | if (!Hash::check($request->input('password'), $user->password)) { 31 | return back()->withErrors([ 32 | 'message' => 'User or password wrong', 33 | ]); 34 | } 35 | 36 | Auth::loginUsingId($user->id); 37 | return redirect()->route('dashboard'); 38 | 39 | } 40 | 41 | 42 | 43 | 44 | 45 | 46 | public function login() 47 | { 48 | if(!Auth::check()) 49 | { 50 | return view('login'); 51 | } 52 | else 53 | return redirect()->route('dashboard'); 54 | } 55 | 56 | 57 | 58 | public function logout(Request $request) 59 | { 60 | Auth::logout(); 61 | $request->session()->invalidate(); 62 | $request->session()->regenerateToken(); 63 | return redirect()->route('main'); 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | } -------------------------------------------------------------------------------- /resources/views/include/footer.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 43 |
44 | 45 | 55 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/default.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 3 | 41 | 42 | 43 | 44 | @endif 45 | -------------------------------------------------------------------------------- /app/Listeners/ResourceNotification.php: -------------------------------------------------------------------------------- 1 | resource->id)->first(); 38 | if($resource!==null && $resource->scope_entry!=null && $resource->scope_entry->scope!=null) 39 | { 40 | 41 | $scope=$resource->scope_entry->scope; 42 | $template=$scope->scope_template->template; 43 | 44 | foreach($template->template_entries as $entry) 45 | { 46 | 47 | 48 | if($entry->scanner_entry->scanner->type!='resource')continue; 49 | $tmp=new Queue; 50 | $tmp->object_type="resource"; 51 | $tmp->object_id=$resource->id; 52 | $tmp->user_id=$resource->scope_entry->scope->user_id; 53 | $tmp->scanner_entry_id=$entry->scanner_entry->id; 54 | $tmp->scope_id=$resource->scope_entry->scope->id; 55 | $tmp->type="chain"; 56 | $tmp->save(); 57 | } 58 | 59 | } 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/Console/Commands/Scheduler.php: -------------------------------------------------------------------------------- 1 | debug('===============================RUN_SCHEDULE_TASKS======================================================='); 44 | 45 | $schedulers=Schedule::where('frequency',$this->argument('frequency'))->get(); 46 | foreach ($schedulers as $schedule) 47 | { 48 | if($schedule->scope!==null) 49 | { 50 | Log::channel('sheduler')->debug($this->argument('frequency').":".$schedule->scope->name." is run with template_id=".$schedule->template_id); 51 | 52 | 53 | 54 | LaunchScanJob::dispatch($schedule->scope,$schedule->template_id); 55 | } 56 | } 57 | 58 | Log::channel('sheduler')->debug('=================================================================================================='); 59 | 60 | 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /config/hashing.php: -------------------------------------------------------------------------------- 1 | 'bcrypt', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Bcrypt Options 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may specify the configuration options that should be used when 26 | | passwords are hashed using the Bcrypt algorithm. This will allow you 27 | | to control the amount of time it takes to hash the given password. 28 | | 29 | */ 30 | 31 | 'bcrypt' => [ 32 | 'rounds' => env('BCRYPT_ROUNDS', 10), 33 | ], 34 | 35 | /* 36 | |-------------------------------------------------------------------------- 37 | | Argon Options 38 | |-------------------------------------------------------------------------- 39 | | 40 | | Here you may specify the configuration options that should be used when 41 | | passwords are hashed using the Argon algorithm. These will allow you 42 | | to control the amount of time it takes to hash the given password. 43 | | 44 | */ 45 | 46 | 'argon' => [ 47 | 'memory' => 65536, 48 | 'threads' => 1, 49 | 'time' => 4, 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /app/Listeners/ScopeEntryNotification.php: -------------------------------------------------------------------------------- 1 | entry->type=="domain_list" || $event->entry->type=="domain") 37 | { 38 | 39 | $scope=$event->entry->scope; 40 | $template=$scope->scope_template->template; 41 | 42 | foreach($template->template_entries as $entry) 43 | { 44 | 45 | 46 | if($entry->scanner_entry->scanner->type!='discovery')continue; 47 | $tmp=new Queue; 48 | $tmp->object_type="scope_entry"; 49 | $tmp->object_id=$event->entry->id; 50 | $tmp->user_id=$event->entry->scope->user_id; 51 | $tmp->scanner_entry_id=$entry->scanner_entry->id; 52 | $tmp->scope_id=$event->entry->scope_id; 53 | $tmp->type="chain"; 54 | $tmp->save(); 55 | } 56 | 57 | 58 | } 59 | 60 | if($event->entry->type=="ip_list") 61 | { 62 | 63 | IPParseJob::dispatch($event->entry); 64 | 65 | 66 | } 67 | 68 | 69 | 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/simple-tailwind.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 25 | @endif 26 | -------------------------------------------------------------------------------- /app/Http/Controllers/SearchController.php: -------------------------------------------------------------------------------- 1 | validate([ 20 | 'term' => 'required|max:64|min:4' 21 | ]); 22 | 23 | 24 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 25 | $responses=$scope->responses() 26 | ->where(function($query) use ($request) { 27 | $query->whereFullText('responses.title',$request->input('term'))->orWhereFullText('responses.source', $request->input('term')); 28 | })->limit(50)->get(); 29 | 30 | return view('search.scope',['responses'=>$responses,'scope'=>$scope]); 31 | 32 | } 33 | 34 | 35 | public function resources_search(Request $request,$scope_entry_id) 36 | { 37 | $validated = $request->validate([ 38 | 'term' => 'required|max:64|min:4' 39 | ]); 40 | 41 | $scope_entry=ScopeEntry::where('id',$scope_entry_id)->firstOrFail(); 42 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_entry->scope_id)->firstOrFail(); 43 | $responses=$scope_entry->responses() 44 | ->where(function($query) use ($request) { 45 | $query->whereFullText('responses.title', $request->input('term'))->orWhereFullText('responses.source', $request->input('term')); 46 | })->limit(50)->get(); 47 | 48 | return view('search.scope_entry',['responses'=>$responses,'scope_entry'=>$scope_entry,'scope'=>$scope]); 49 | 50 | } 51 | 52 | 53 | } -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/semantic-ui.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 36 | @endif 37 | -------------------------------------------------------------------------------- /app/Http/Controllers/JobsController.php: -------------------------------------------------------------------------------- 1 | = 11 ) printf $i" "}; printf "\n" }\''); 39 | if($type=="nmap") 40 | $result=shell_exec('ps aux| grep "nmap --exclude"| grep -v grep|grep -v timeout| grep -v grep|grep -v timeout|awk \'{ for(i=1;i<=NF;i++) {if ( i >= 11 ) printf $i" "}; printf "\n" }\''); 41 | if($type=="nuclei") 42 | $result=shell_exec('ps aux| grep "nuclei -nc -ud"| grep -v grep|grep -v timeout| grep -v grep|grep -v timeout|awk \'{ for(i=1;i<=NF;i++) {if ( i >= 11 ) printf $i" "}; printf "\n" }\''); 43 | $result=explode(PHP_EOL,$result); 44 | return view('scans.monitor',['jobs' => $result]); 45 | } 46 | 47 | 48 | 49 | 50 | 51 | 52 | } -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 34 | 35 | $status = $kernel->handle( 36 | $input = new Symfony\Component\Console\Input\ArgvInput, 37 | new Symfony\Component\Console\Output\ConsoleOutput 38 | ); 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | Shutdown The Application 43 | |-------------------------------------------------------------------------- 44 | | 45 | | Once Artisan has finished running, we will fire off the shutdown events 46 | | so that any final work may be done by the application before we shut 47 | | down the process. This is the last thing to happen to the request. 48 | | 49 | */ 50 | 51 | $kernel->terminate($input, $status); 52 | 53 | exit($status); 54 | -------------------------------------------------------------------------------- /app/Http/Controllers/ScheduleController.php: -------------------------------------------------------------------------------- 1 | Template::all(),'schedulers'=>Schedule::where('user_id', Auth::id())->get(),'scopes'=>Scope::where('user_id', Auth::id())->get()]); 20 | } 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | public function insert(Request $request) 29 | { 30 | 31 | $validated = $request->validate([ 32 | 'frequency' => 'required', 33 | 'scope' => 'required', 34 | 'template' => 'required' 35 | 36 | ]); 37 | $scope=Scope::where('user_id', Auth::id())->where('id',$request->input('scope'))->firstOrFail(); 38 | $template=Template::where('id',$request->input('template'))->firstOrFail(); 39 | $scheduler=new Schedule; 40 | 41 | switch($request->input('frequency')) 42 | { 43 | case "daily":$scheduler->frequency="daily";break; 44 | case "weekly":$scheduler->frequency="weekly";break; 45 | case "monthly":$scheduler->frequency="monthly";break; 46 | case "quarterly":$scheduler->frequency="quarterly";break; 47 | default:$scheduler->frequency="daily"; 48 | } 49 | $scheduler->scope_id=$scope->id; 50 | $scheduler->user_id=Auth::id(); 51 | $scheduler->template_id=$template->id; 52 | $scheduler->save(); 53 | return redirect()->back(); 54 | } 55 | public function delete($schedule_id) 56 | { 57 | $scheduler=Schedule::where('user_id', Auth::id())->where('id',$schedule_id)->firstOrFail(); 58 | $scheduler->delete(); 59 | return redirect()->back(); 60 | 61 | } 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class); 50 | 51 | $response = $kernel->handle( 52 | $request = Request::capture() 53 | )->send(); 54 | 55 | $kernel->terminate($request, $response); 56 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | configureRateLimiting(); 39 | 40 | $this->routes(function () { 41 | Route::prefix('api') 42 | ->middleware('api') 43 | ->namespace($this->namespace) 44 | ->group(base_path('routes/api.php')); 45 | 46 | Route::middleware('web') 47 | ->namespace($this->namespace) 48 | ->group(base_path('routes/web.php')); 49 | }); 50 | } 51 | 52 | /** 53 | * Configure the rate limiters for the application. 54 | * 55 | * @return void 56 | */ 57 | protected function configureRateLimiting() 58 | { 59 | RateLimiter::for('api', function (Request $request) { 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); 61 | }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_APP_KEY'), 36 | 'secret' => env('PUSHER_APP_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | 'cluster' => env('PUSHER_APP_CLUSTER'), 40 | 'useTLS' => true, 41 | ], 42 | ], 43 | 44 | 'ably' => [ 45 | 'driver' => 'ably', 46 | 'key' => env('ABLY_KEY'), 47 | ], 48 | 49 | 'redis' => [ 50 | 'driver' => 'redis', 51 | 'connection' => 'default', 52 | ], 53 | 54 | 'log' => [ 55 | 'driver' => 'log', 56 | ], 57 | 58 | 'null' => [ 59 | 'driver' => 'null', 60 | ], 61 | 62 | ], 63 | 64 | ]; 65 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "type": "project", 4 | "description": "The Laravel Framework.", 5 | "keywords": ["framework", "laravel"], 6 | "license": "MIT", 7 | "require": { 8 | "php": "^7.3|^8.0", 9 | "doctrine/dbal": "^3.5", 10 | "fruitcake/laravel-cors": "^2.0", 11 | "guzzlehttp/guzzle": "^7.0.1", 12 | "jenssegers/agent": "^2.6", 13 | "laravel/framework": "^9.0", 14 | "laravel/sanctum": "^2.11", 15 | "laravel/tinker": "^2.5" 16 | }, 17 | "require-dev": { 18 | "spatie/laravel-ignition": "^1.0", 19 | "fakerphp/faker": "^1.9.1", 20 | "laravel/sail": "^1.0.1", 21 | "mockery/mockery": "^1.4.4", 22 | "nunomaduro/collision": "^6.1", 23 | "phpunit/phpunit": "^9.5.10" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "App\\": "app/", 28 | "Database\\Factories\\": "database/factories/", 29 | "Database\\Seeders\\": "database/seeders/" 30 | } 31 | }, 32 | "autoload-dev": { 33 | "psr-4": { 34 | "Tests\\": "tests/" 35 | } 36 | }, 37 | "scripts": { 38 | "post-autoload-dump": [ 39 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 40 | "@php artisan package:discover --ansi" 41 | ], 42 | "post-update-cmd": [ 43 | "@php artisan vendor:publish --tag=laravel-assets --ansi --force" 44 | ], 45 | "post-root-package-install": [ 46 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 47 | ], 48 | "post-create-project-cmd": [ 49 | "@php artisan key:generate --ansi" 50 | ] 51 | }, 52 | "extra": { 53 | "laravel": { 54 | "dont-discover": [] 55 | } 56 | }, 57 | "config": { 58 | "optimize-autoloader": true, 59 | "preferred-install": "dist", 60 | "sort-packages": true 61 | }, 62 | "minimum-stability": "dev", 63 | "prefer-stable": true 64 | } 65 | -------------------------------------------------------------------------------- /resources/views/resources/get.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 | 11 |
12 | 13 | 14 | 15 |

{{$resource->name}}

16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | @foreach ($resource->services as $service) 30 | 31 | 32 | 37 | 38 | 43 | 44 | @endforeach 45 | 46 |
PortService
33 | 34 | {{$service->port }} 35 | 36 | 39 | 40 | {{$service->service }} 41 | 42 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | @foreach ($resource->screenshots as $screenshot) 62 | 63 | 64 | 70 | 71 | 77 | 78 | 87 | 88 | 89 | @endforeach 90 | 91 |
NameImageInfo
65 | 66 | {{$screenshot->link }} 67 | 68 | 69 | 72 |

{{$screenshot->title }}

73 |
74 | 75 |
76 |
79 | 80 |

Code:{{$screenshot->code }}

81 |

IP:{{$screenshot->ip }}

82 |

ASN:{{$screenshot->asn }}

83 |

Host:{{$screenshot->server }}

84 |

{{$screenshot->created_at }}

85 | 86 |
92 | 93 | 94 | 95 | 96 | @include('include.footer') -------------------------------------------------------------------------------- /scanners/screenshot/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 4.0.0 6 | 7 | com.scanner.screenshot 8 | screenshot 9 | 1.0 10 | jar 11 | bot 12 | 13 | 14 | UTF-8 15 | 1.8 16 | 1.8 17 | 18 | 19 | 20 | 21 | org.seleniumhq.selenium 22 | selenium-java 23 | 3.13.0 24 | 25 | 26 | org.seleniumhq.selenium 27 | selenium-server 28 | 3.13.0 29 | 30 | 31 | org.seleniumhq.selenium 32 | selenium-chrome-driver 33 | 3.13.0 34 | 35 | 36 | com.googlecode.json-simple 37 | json-simple 38 | 1.1.1 39 | 40 | 41 | commons-cli 42 | commons-cli 43 | 1.4 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | org.springframework.boot 54 | spring-boot-maven-plugin 55 | 56 | 57 | 58 | repackage 59 | 60 | 61 | 62 | com.scanner.screenshot.App 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /app/Models/User.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | protected $fillable = [ 19 | 'name', 20 | 'email', 21 | 'password', 22 | ]; 23 | 24 | /** 25 | * The attributes that should be hidden for serialization. 26 | * 27 | * @var array 28 | */ 29 | protected $hidden = [ 30 | 'password', 31 | 'remember_token', 32 | ]; 33 | 34 | /** 35 | * The attributes that should be cast. 36 | * 37 | * @var array 38 | */ 39 | protected $casts = [ 40 | 'email_verified_at' => 'datetime', 41 | ]; 42 | 43 | public function queues() 44 | { 45 | return $this->hasMany(Queue::class); 46 | } 47 | 48 | public function command_queues() 49 | { 50 | return $this->hasMany(CommandQueue::class); 51 | } 52 | public function scopes() 53 | { 54 | return $this->hasMany(Scope::class); 55 | } 56 | 57 | public function getCountActiveTasksAttribute() 58 | { 59 | $result=0; 60 | $result+=$this->hasMany(Queue::class)->where('status','running')->count(); 61 | $result+=$this->hasMany(Queue::class)->where('status','queued')->count(); 62 | $result+=$this->hasMany(CommandQueue::class)->where('status','running')->count(); 63 | $result+=$this->hasMany(CommandQueue::class)->where('status','queued')->count(); 64 | return $result; 65 | } 66 | 67 | 68 | 69 | 70 | 71 | public function active_queues() 72 | { 73 | return $this->hasMany(Queue::class)->where('status','!=','done'); 74 | } 75 | 76 | public function active_commands() 77 | { 78 | return $this->hasMany(CommandQueue::class)->where('status','!=','done'); 79 | } 80 | 81 | 82 | 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /resources/views/vendor/pagination/bootstrap-4.blade.php: -------------------------------------------------------------------------------- 1 | @if ($paginator->hasPages()) 2 | 46 | @endif 47 | -------------------------------------------------------------------------------- /app/Jobs/WipeQueueJob.php: -------------------------------------------------------------------------------- 1 | type=$type; 33 | $this->id=$id; 34 | $this->onQueue('listeners'); 35 | } 36 | 37 | public function handle() 38 | { 39 | if($this->type=='resource') 40 | { 41 | $resource=Resource::withTrashed()->where('id',$this->id)->firstOrFail(); 42 | $queues=Queue::where('object_id',$resource->id)->where('object_type','resource')->get(); 43 | foreach($queues as $queue)$queue->delete(); 44 | foreach($resource->services as $service) 45 | { 46 | $queues=Queue::where('object_id',$service->id)->where('object_type','service')->get(); 47 | foreach($queues as $queue)$queue->delete(); 48 | } 49 | } 50 | 51 | if($this->type=='scope_entry') 52 | { 53 | $scope_entry=ScopeEntry::withTrashed()->where('id',$this->id)->firstOrFail(); 54 | $queues=Queue::where('object_id',$scope_entry->id)->where('object_type','scope_entry')->get(); 55 | foreach($queues as $queue)$queue->delete(); 56 | 57 | $resources=Resource::withTrashed()->where('scope_entry_id',$scope_entry->id)->get(); 58 | foreach($resources as $entry) 59 | { 60 | $queues=Queue::where('object_id',$entry->id)->where('object_type','resource')->get(); 61 | foreach($queues as $queue)$queue->delete(); 62 | foreach($entry->services as $service) 63 | { 64 | $queues=Queue::where('object_id',$service->id)->where('object_type','service')->get(); 65 | foreach($queues as $queue)$queue->delete(); 66 | } 67 | 68 | } 69 | 70 | 71 | } 72 | 73 | 74 | 75 | 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/Http/Controllers/FindingsController.php: -------------------------------------------------------------------------------- 1 | firstOrFail(); 25 | 26 | return response($finding->report, 200) 27 | ->header('Content-Type', 'text/plain'); 28 | 29 | 30 | } 31 | 32 | 33 | 34 | public function scope_list($scope_id,$severity="critical") 35 | { 36 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 37 | if($severity=='critical' || $severity=='high' || $severity=='medium') 38 | { 39 | return view('outputs.list',['scope' => $scope,'findings'=>$scope->outputs()->where('severity',$severity)->paginate(50)]); 40 | } 41 | else 42 | { 43 | return view('outputs.list',['scope' => $scope,'findings'=>$scope->outputs() 44 | ->where('severity','!=','critical')->where('severity','!=','high')->where('severity','!=','medium') 45 | 46 | ->paginate(50)]); 47 | } 48 | 49 | 50 | 51 | } 52 | 53 | public function scope_entry_list($scope_id,$scope_entry_id,$severity="critical") 54 | { 55 | 56 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 57 | $scope_entry=ScopeEntry::where('id',$scope_entry_id)->where('scope_id',$scope_id)->firstOrFail(); 58 | if($severity=='critical' || $severity=='high' || $severity=='medium') 59 | { 60 | return view('outputs.list',['scope' => $scope,'scope_entry' => $scope_entry,'findings'=>$scope->outputs()->where('severity',$severity)->paginate(50)]); 61 | } 62 | else 63 | { 64 | return view('outputs.list',['scope' => $scope,'scope_entry' => $scope_entry,'findings'=>$scope->outputs() 65 | ->where('severity','!=','critical')->where('severity','!=','high')->where('severity','!=','medium') 66 | ->paginate(50)]); 67 | } 68 | 69 | 70 | 71 | 72 | } 73 | } -------------------------------------------------------------------------------- /app/Http/Controllers/ResourceController.php: -------------------------------------------------------------------------------- 1 | where('id',$id)->firstOrFail(); 22 | return view('resources.list',['breadcrumb'=>'resources','resources' => $scope->resources()->orderBy('updated_at', 'desc')->paginate(50),'scope'=>$scope]); 23 | } 24 | 25 | public function scope_entries_resources_list($scope_id,$id) 26 | { 27 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 28 | $scope_entries=ScopeEntry::where('scope_id',$scope->id)->where('id',$id)->firstOrFail(); 29 | return view('resources.list',['resources' => $scope_entries->resources()->orderBy('updated_at', 'desc')->paginate(50),'scope'=>$scope,'scope_entry'=>$scope_entries]); 30 | } 31 | 32 | 33 | 34 | 35 | 36 | 37 | public function view($scope_id,$scope_entry_id,$resource_id) 38 | { 39 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 40 | $scope_entry=ScopeEntry::where('scope_id',$scope->id)->where('id',$scope_entry_id)->firstOrFail(); 41 | $resource=Resource::where('scope_id',$scope->id)->where('scope_entry_id',$scope_entry->id)->where('id',$resource_id)->firstOrFail(); 42 | return view('resources.get',['resource' => $resource,'scope'=>$scope,'scope_entry'=>$scope_entry]); 43 | } 44 | public function delete($scope_id,$scope_entry_id,$resource_id) 45 | { 46 | $scope=Scope::where('user_id', Auth::id())->where('id',$scope_id)->firstOrFail(); 47 | $scope_entry=ScopeEntry::where('scope_id',$scope->id)->where('id',$scope_entry_id)->firstOrFail(); 48 | $resource=Resource::where('scope_id',$scope->id)->where('scope_entry_id',$scope_entry->id)->where('id',$resource_id)->firstOrFail(); 49 | WipeQueueJob::dispatch("resource",$resource->id); 50 | $resource->delete(); 51 | return redirect()->back(); 52 | 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /resources/views/outputs/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 | 13 |
14 | 15 |

Findings

16 | 17 | 18 | 19 | @if(isset($scope_entry)) 20 |
21 | @else 22 | 23 | @endif 24 | @csrf 25 | 26 |
27 |
28 | 29 |
30 |
31 | 34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | 42 | {{ $findings->links() }} 43 | 44 |
45 | 46 | @foreach ($findings as $finding) 47 |
48 |
49 |
50 | 51 |

52 | 53 | {{$finding->resource->name }}

57 | {{$finding->created_at }} 58 |
59 |
60 |
61 |

View

63 | {!! $finding->fine_report !!} 64 | 65 | 66 |
67 |
68 | @endforeach 69 |
70 | 71 |
72 | 73 | 74 | 75 | {{ $findings->links() }} 76 | 77 | 78 | @include('include.footer') -------------------------------------------------------------------------------- /resources/views/search/scope.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 9 |
10 | 11 |

Search

12 | 13 |
14 | @csrf 15 | 16 |
17 |
18 | 19 |
20 |
21 | 24 |
25 |
26 |
27 | 28 | 29 | @if($responses->count()>0) 30 |
31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | @foreach ($responses as $response) 43 | 44 | 45 | 50 | 51 | 57 | 58 | 67 | 73 | 74 | 75 | @endforeach 76 | 77 |
LinkImageInfoOpen Resource
46 | {{$response->link }} 47 | 48 | 49 | 52 |

{{$response->title }}

53 |
54 | 55 |
56 |
59 | 60 |

Code: {{$response->code }}

61 |

IP: {{$response->ip }}

62 |

ASN: {{$response->asn }}

63 |

Host: {{$response->server }}

64 |

{{$response->created_at }}

65 | 66 |
68 | 69 | 70 | {{$response->resource->name}} 71 | 72 |
78 |
79 | @endif 80 | 81 | 82 | 83 | 84 | @include('include.footer') -------------------------------------------------------------------------------- /resources/views/users/index.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 |

Packages

5 |
6 | The project has always been and remains free. Each user gets one place in the queue to perform a particular task. Paid packages do not add or open any hidden additional functionality. You can get additional places in the queue by purchasing a paid package. This will allow you to run multiple tasks simultaneously and significantly speed up your scanning. 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
Fast lineDays leftAdd
1X{{$user->package_timeout(1)}}
24 | @csrf 25 | 33 |
34 |
3X{{$user->package_timeout(3)}}
44 | @csrf 45 | 53 |
54 |
5X{{$user->package_timeout(5)}}
64 | @csrf 65 | 73 |
74 |
82 | 83 | 84 | 85 | 86 | 87 | @include('include.footer') -------------------------------------------------------------------------------- /notify.log: -------------------------------------------------------------------------------- 1 | 2 | INFO Processing jobs from the [listeners] queue. 3 | 4 | 2022-10-18 20:41:42 App\Listeners\ScopeEntryNotification ..... 631.57ms DONE 5 | 2022-10-18 20:41:59 App\Listeners\ResourceNotification ....... 570.88ms DONE 6 | 2022-10-18 20:42:00 App\Listeners\ResourceNotification ....... 182.70ms DONE 7 | 2022-10-18 20:42:01 App\Listeners\ResourceNotification ....... 145.24ms DONE 8 | 2022-10-18 20:42:03 App\Listeners\ResourceNotification ....... 486.18ms DONE 9 | 2022-10-18 20:42:03 App\Listeners\ResourceNotification ....... 809.80ms DONE 10 | 2022-10-18 20:42:04 App\Listeners\ResourceNotification ....... 465.92ms DONE 11 | 2022-10-18 20:42:05 App\Listeners\ResourceNotification ....... 213.43ms DONE 12 | 2022-10-18 20:42:05 App\Listeners\ResourceNotification ....... 250.63ms DONE 13 | 2022-10-18 20:42:06 App\Listeners\ResourceNotification ....... 201.99ms DONE 14 | 2022-10-18 20:42:06 App\Listeners\ResourceNotification ....... 212.29ms DONE 15 | 2022-10-18 20:42:07 App\Listeners\ResourceNotification ....... 254.36ms DONE 16 | 2022-10-18 20:42:07 App\Listeners\ResourceNotification ....... 842.90ms DONE 17 | 2022-10-18 20:42:08 App\Listeners\ResourceNotification ....... 130.67ms DONE 18 | 2022-10-18 20:42:08 App\Listeners\ResourceNotification ....... 114.75ms DONE 19 | 2022-10-18 20:42:09 App\Listeners\ResourceNotification ....... 158.92ms DONE 20 | 2022-10-18 20:42:09 App\Listeners\ResourceNotification ....... 124.32ms DONE 21 | 2022-10-18 20:42:09 App\Listeners\ResourceNotification ....... 168.57ms DONE 22 | 2022-10-18 20:42:09 App\Listeners\ResourceNotification ....... 347.03ms DONE 23 | 2022-10-18 20:42:10 App\Listeners\ResourceNotification ........ 96.47ms DONE 24 | 2022-10-18 20:42:10 App\Listeners\ResourceNotification ....... 110.00ms DONE 25 | 2022-10-18 20:42:10 App\Listeners\ResourceNotification ....... 146.72ms DONE 26 | 2022-10-18 20:42:10 App\Listeners\ResourceNotification ....... 101.82ms DONE 27 | 2022-10-18 20:42:11 App\Listeners\ResourceNotification ....... 379.54ms DONE 28 | 2022-10-18 20:42:11 App\Listeners\ResourceNotification ....... 121.85ms DONE 29 | 2022-10-18 20:42:11 App\Listeners\ResourceNotification ....... 128.76ms DONE 30 | 2022-10-18 20:42:12 App\Listeners\ResourceNotification ....... 157.16ms DONE 31 | 2022-10-18 20:42:12 App\Listeners\ResourceNotification ....... 335.85ms DONE 32 | 2022-10-18 20:44:50 App\Listeners\ResourceNotification .... 28,357.67ms DONE 33 | 2022-10-18 20:45:19 App\Listeners\ResourceNotification ....... 374.56ms DONE 34 | -------------------------------------------------------------------------------- /config/sanctum.php: -------------------------------------------------------------------------------- 1 | explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf( 17 | '%s%s', 18 | 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1', 19 | env('APP_URL') ? ','.parse_url(env('APP_URL'), PHP_URL_HOST) : '' 20 | ))), 21 | 22 | /* 23 | |-------------------------------------------------------------------------- 24 | | Sanctum Guards 25 | |-------------------------------------------------------------------------- 26 | | 27 | | This array contains the authentication guards that will be checked when 28 | | Sanctum is trying to authenticate a request. If none of these guards 29 | | are able to authenticate the request, Sanctum will use the bearer 30 | | token that's present on an incoming request for authentication. 31 | | 32 | */ 33 | 34 | 'guard' => ['web'], 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Expiration Minutes 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This value controls the number of minutes until an issued token will be 42 | | considered expired. If this value is null, personal access tokens do 43 | | not expire. This won't tweak the lifetime of first-party sessions. 44 | | 45 | */ 46 | 47 | 'expiration' => null, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Sanctum Middleware 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When authenticating your first-party SPA with Sanctum you may need to 55 | | customize some of the middleware Sanctum uses while processing the 56 | | request. You may change the middleware listed below as required. 57 | | 58 | */ 59 | 60 | 'middleware' => [ 61 | 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class, 62 | 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class, 63 | ], 64 | 65 | ]; 66 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | env('FILESYSTEM_DRIVER', 'local'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Filesystem Disks 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure as many filesystem "disks" as you wish, and you 24 | | may even configure multiple disks of the same driver. Defaults have 25 | | been setup for each driver as an example of the required options. 26 | | 27 | | Supported Drivers: "local", "ftp", "sftp", "s3" 28 | | 29 | */ 30 | 31 | 'disks' => [ 32 | 33 | 'local' => [ 34 | 'driver' => 'local', 35 | 'root' => storage_path('app'), 36 | ], 37 | 38 | 'public' => [ 39 | 'driver' => 'local', 40 | 'root' => storage_path('app/public'), 41 | 'url' => env('APP_URL').'/storage', 42 | 'visibility' => 'public', 43 | ], 44 | 45 | 's3' => [ 46 | 'driver' => 's3', 47 | 'key' => env('AWS_ACCESS_KEY_ID'), 48 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 49 | 'region' => env('AWS_DEFAULT_REGION'), 50 | 'bucket' => env('AWS_BUCKET'), 51 | 'url' => env('AWS_URL'), 52 | 'endpoint' => env('AWS_ENDPOINT'), 53 | 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), 54 | 'throw'=>true 55 | ], 56 | 57 | ], 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | Symbolic Links 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may configure the symbolic links that will be created when the 65 | | `storage:link` Artisan command is executed. The array keys should be 66 | | the locations of the links and the values should be their targets. 67 | | 68 | */ 69 | 70 | 'links' => [ 71 | public_path('storage') => storage_path('app/public'), 72 | ], 73 | 74 | ]; 75 | -------------------------------------------------------------------------------- /app/Http/Controllers/ScannersController.php: -------------------------------------------------------------------------------- 1 | Scanner::all()]); 16 | } 17 | 18 | public function view($id) 19 | { 20 | 21 | return view('scanners.view',['scan_entry'=>ScannerEntry::where('id',$id)->firstOrFail(),'scanners'=>Scanner::all()]); 22 | } 23 | public function list() 24 | { 25 | return view('scanners.list',['scanners'=>ScannerEntry::all()]); 26 | } 27 | 28 | public function new() 29 | { 30 | return view('scanners.new',['scanners'=>Scanner::all()]); 31 | } 32 | 33 | public function update(Request $request,$id) 34 | { 35 | $scanner_entry=ScannerEntry::where('id',$id)->firstOrFail(); 36 | $validated = $request->validate([ 37 | 'name' => 'required|max:64|min:4', 38 | 'template_type' => 'required' 39 | ]); 40 | 41 | $scanner_entry->name=$request->input('name'); 42 | $scanner_entry->scanner_id=$request->input('template_type'); 43 | $scanner_entry->save(); 44 | if($scanner_entry->scanner->has_arguments==TRUE) 45 | { 46 | if($request->filled('arguments')) 47 | { 48 | $scanner_entry->arguments=$request->input('arguments'); 49 | $scanner_entry->save(); 50 | } 51 | } 52 | return back(); 53 | 54 | 55 | } 56 | 57 | 58 | 59 | 60 | 61 | public function delete($id) 62 | { 63 | 64 | 65 | ScannerEntry::findOrFail($id)->delete(); 66 | return back(); 67 | } 68 | 69 | 70 | 71 | public function create(Request $request) 72 | { 73 | 74 | $validated = $request->validate([ 75 | 'name' => 'required|max:64|min:4', 76 | 'template_type' => 'required' 77 | ]); 78 | 79 | if(($scanner=Scanner::find($request->input('template_type')))==null) 80 | { 81 | return back()->withErrors(['errors' => "Unknown template type"]); 82 | } 83 | 84 | 85 | $scan_entry=new ScannerEntry; 86 | $scan_entry->name=$request->input('name'); 87 | $scan_entry->scanner_id=$request->input('template_type'); 88 | $scan_entry->save(); 89 | if($scanner->has_arguments==TRUE) 90 | { 91 | if($request->filled('arguments')) 92 | { 93 | $scan_entry->arguments=$request->input('arguments'); 94 | $scan_entry->save(); 95 | } 96 | } 97 | return redirect()->route('scanners-list'); 98 | 99 | 100 | } 101 | 102 | 103 | } -------------------------------------------------------------------------------- /resources/views/screenshots/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 | 13 |
14 | 15 |

Screenshots

16 | 17 | 18 | 19 | @if(isset($scope_entry)) 20 |
21 | @else 22 | 23 | @endif 24 | @csrf 25 | 26 |
27 |
28 | 29 |
30 |
31 | 34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | 42 | {{ $screenshots->links() }} 43 | 44 |
45 | 46 | @foreach ($screenshots as $screenshot) 47 |
48 |
49 |
50 | 51 |

{{$screenshot->title }}

52 | {{$screenshot->created_at }} 53 |

54 | {{$screenshot->link }}
55 | @if(strlen($screenshot->code)>0)

Code: {{$screenshot->code }}

@endif 56 | @if(strlen($screenshot->ip)>0)

IP: {{$screenshot->ip }}

@endif 57 | @if(strlen($screenshot->asn)>0)

ASN: {{$screenshot->asn }}

@endif 58 | @if(strlen($screenshot->server)>0)

Host: {{$screenshot->server }}

@endif 59 |

60 |
61 |
62 |
63 | 64 | 65 | 66 |
67 |
68 | @endforeach 69 |
70 | 71 |
72 | 73 | 74 | 75 | {{ $screenshots->links() }} 76 | 77 | 78 | @include('include.footer') -------------------------------------------------------------------------------- /docker-compose/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.20.5-alpine AS build-go 2 | RUN apk add build-base 3 | RUN apk --no-cache add git 4 | # RUN go install -v github.com/OWASP/Amass/v3/...@master 5 | RUN go install -v github.com/owasp-amass/amass/v3/...@master 6 | RUN go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@v2.6.3 7 | RUN go install -v github.com/projectdiscovery/httpx/cmd/httpx@v1.3.5 8 | RUN go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@v2.9.15 9 | RUN go install -v github.com/projectdiscovery/dnsx/cmd/dnsx@v1.1.6 10 | RUN go install github.com/lc/gau/v2/cmd/gau@v2.1.2 11 | RUN go install github.com/tomnomnom/assetfinder@v0.1.1 12 | 13 | 14 | 15 | FROM php:8.1.12-fpm-alpine3.16 16 | 17 | 18 | #packages installing 19 | RUN apk -U upgrade --no-cache \ 20 | && apk add --no-cache autoconf bind-tools ca-certificates chromium chromium-chromedriver composer curl g++ gcc git imagemagick libffi-dev libgcc libpcap libpcap-dev libssl3 libstdc++ libtool linux-headers lua-dev make maven musl-dev mysql-client nginx nmap nmap-scripts openjdk17 openssl-dev php-bcmath php-calendar php-cli php-ctype php-curl php-dom php-exif php-ffi php-fileinfo php-fpm php-ftp php-gettext php-iconv php-mbstring php-mysqli php-opcache php-pdo php-phar php-posix php-shmop php-simplexml php-sockets php-sysvmsg php-sysvsem php-sysvshm php-tokenizer php-xml php-xmlreader php-xmlwriter php-xsl php-zip py3-pip python3-dev 21 | RUN docker-php-ext-install mysqli pdo_mysql exif pcntl bcmath 22 | 23 | 24 | COPY . /var/www/html/ 25 | RUN mkdir /var/www/html/scanners/amass_linux 26 | COPY --from=build-go /go/bin/amass /var/www/html/scanners/amass_linux/amass 27 | COPY --from=build-go /go/bin/subfinder /var/www/html/scanners/subfinder 28 | COPY --from=build-go /go/bin/httpx /var/www/html/scanners/httpx 29 | COPY --from=build-go /go/bin/nuclei /var/www/html/scanners/nuclei 30 | COPY --from=build-go /go/bin/dnsx /var/www/html/scanners/dnsx 31 | COPY --from=build-go /go/bin/gau /var/www/html/scanners/gau 32 | COPY --from=build-go /go/bin/assetfinder /var/www/html/scanners/assetfinder 33 | RUN git clone https://github.com/maurosoria/dirsearch /var/www/html/scanners/dirsearch 34 | RUN cd /var/www/html/scanners/dirsearch && pip3 install -r requirements.txt 35 | RUN cd /var/www/html/scanners/screenshot && mvn package 36 | RUN cd /var/www/html/ && composer install 37 | RUN cd /var/www/html/ && php artisan storage:link 38 | RUN cd /var/www/html/ && chmod 777 -R storage/ 39 | RUN cd /var/www/html/ && chmod 777 *.log 40 | RUN cp /var/www/html/.env.docker /var/www/html/.env 41 | RUN mv /var/www/html/docker-compose/nginx/sheye.conf /etc/nginx/http.d/default.conf 42 | 43 | EXPOSE 80 443 44 | RUN mv /var/www/html/init.sh /init.sh 45 | ENTRYPOINT ["sh", "/init.sh"] 46 | 47 | -------------------------------------------------------------------------------- /resources/views/search/scope_entry.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 16 |
17 | 18 |

Search

19 |
20 | @csrf 21 | 22 |
23 |
24 | 25 |
26 |
27 | 30 |
31 |
32 |
33 | 34 | 35 | @if($responses->count()>0) 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | @foreach ($responses as $response) 49 | 50 | 51 | 56 | 57 | 63 | 64 | 73 | 79 | 80 | 81 | @endforeach 82 | 83 |
LinkImageInfoOpen Resource
52 | {{$response->link }} 53 | 54 | 55 | 58 |

{{$response->title }}

59 |
60 | 61 |
62 |
65 | 66 |

Code: {{$response->code }}

67 |

IP: {{$response->ip }}

68 |

ASN: {{$response->asn }}

69 |

Host: {{$response->server }}

70 |

{{$response->created_at }}

71 | 72 |
74 | 75 | 76 | {{$response->resource->name}} 77 | 78 |
84 |
85 | @endif 86 | 87 | 88 | 89 | 90 | @include('include.footer') -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $middleware = [ 17 | // \App\Http\Middleware\TrustHosts::class, 18 | \App\Http\Middleware\TrustProxies::class, 19 | \Fruitcake\Cors\HandleCors::class, 20 | \App\Http\Middleware\PreventRequestsDuringMaintenance::class, 21 | \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, 22 | \App\Http\Middleware\TrimStrings::class, 23 | \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, 24 | ]; 25 | 26 | /** 27 | * The application's route middleware groups. 28 | * 29 | * @var array> 30 | */ 31 | protected $middlewareGroups = [ 32 | 'web' => [ 33 | \App\Http\Middleware\EncryptCookies::class, 34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 35 | \Illuminate\Session\Middleware\StartSession::class, 36 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 38 | \App\Http\Middleware\VerifyCsrfToken::class, 39 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 40 | ], 41 | 42 | 'api' => [ 43 | // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, 44 | 'throttle:api',\Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | \App\Http\Middleware\APITokenValid::class, 46 | ], 47 | ]; 48 | 49 | /** 50 | * The application's route middleware. 51 | * 52 | * These middleware may be assigned to groups or used individually. 53 | * 54 | * @var array 55 | */ 56 | protected $routeMiddleware = [ 57 | 'auth' => \App\Http\Middleware\Authenticate::class, 58 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class, 63 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, 64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, 66 | 67 | ]; 68 | } 69 | -------------------------------------------------------------------------------- /resources/views/scanners/new.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 |

New custom scanner

3 | 4 | 5 |
6 | 7 | 8 |
9 | @csrf 10 |
11 | 12 |
13 | 14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 | 31 |
32 |
33 |
34 | 54 | 63 | 64 | 65 |
66 |
67 | 68 |
69 |
70 | 71 | 72 |
73 |
74 | 75 | 76 | 108 | @include('include.footer') -------------------------------------------------------------------------------- /app/Console/Commands/CleanStorage.php: -------------------------------------------------------------------------------- 1 | debug('===============================WIPE:STORAGE======================================================='); 43 | $folders=Storage::directories(); 44 | foreach($folders as $folder) 45 | { 46 | if($folder=="public")continue; 47 | if(str_starts_with($folder,"amass")) 48 | { 49 | if(Carbon::now()->diffInDays(Carbon::parse(Storage::lastModified($folder)))>1) 50 | { 51 | Log::channel('wipe:storage')->debug("Deleting folder ".$folder); 52 | Storage::deleteDirectory($folder); 53 | } 54 | } 55 | } 56 | $files=Storage::files(); 57 | foreach($files as $file) 58 | { 59 | if(str_starts_with($file,"."))continue; 60 | 61 | try 62 | { 63 | if(Carbon::now()->diffInDays(Carbon::parse(Storage::lastModified($file)))>1) 64 | { 65 | Log::channel('wipe:storage')->debug("Deleting file ".$file); 66 | Storage::delete($file); 67 | } 68 | } 69 | catch(\League\Flysystem\UnableToRetrieveMetadata $e) 70 | { 71 | Log::channel('wipe:storage')->debug("Unable to delete file ".$file); 72 | echo "Unable to delete $file".PHP_EOL; 73 | } 74 | 75 | 76 | 77 | } 78 | 79 | $files=Storage::disk('public')->files(); 80 | foreach($files as $file) 81 | { 82 | 83 | if(str_starts_with($file,"."))continue; 84 | 85 | try 86 | { 87 | if(Carbon::now()->diffInDays(Carbon::parse(Storage::disk('public')->lastModified($file)))>1) 88 | { 89 | Log::channel('wipe:storage')->debug("Deleting public file ".$file); 90 | Storage::disk('public')->delete($file); 91 | } 92 | } 93 | catch(\League\Flysystem\UnableToRetrieveMetadata $e) 94 | { 95 | Log::channel('wipe:storage')->debug("Unable to delete public file ".$file); 96 | echo "Unable to delete $file".PHP_EOL; 97 | } 98 | 99 | } 100 | Log::channel('wipe:storage')->debug('=================================================================================================='); 101 | 102 | 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /resources/views/queues/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 | 13 |
14 | 15 | {{ $queues->links() }} 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | @foreach ($queues as $queue) 32 | 33 | 34 | 39 | 40 | 63 | 82 | 88 | 89 | 104 | 105 | 106 | 107 | @endforeach 108 | 109 |
TypeResourceStatusDate
35 | 36 | {{$queue->scanner_entry->name}} 37 | 38 | 41 | 42 | @if($queue->object_type=='scope_entry') 43 | 44 | 45 | {{$queue->scope_entry()->source}} 46 | 47 | 48 | @elseif($queue->object_type=='resource') 49 | 50 | 51 | {{$queue->resource()->name}} 52 | 53 | @elseif($queue->object_type=='service') 54 | 55 | 56 | {{$queue->service()->resource->name}} 57 | 58 | 59 | 60 | 61 | @endif 62 | 64 | 65 | 66 | @if($queue->status=='todo') 67 | 68 | todo 69 | @elseif($queue->status=='queued') 70 | 71 | queued 72 | @elseif($queue->status=='running') 73 | 74 | running 75 | @elseif($queue->status=='done') 76 | 77 | done 78 | @endif 79 | 80 | 81 | 83 | 84 | {{$queue->created_at}} 85 | 86 | 87 | 90 | 91 |
92 | @method('delete') 93 | @csrf 94 | 100 |
101 | 102 | 103 |
110 |
111 | {{ $queues->links() }} 112 | 113 | 114 | 115 | @include('include.footer') -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_CONNECTION', 'database'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Queue Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure the connection information for each server that 24 | | is used by your application. A default configuration has been added 25 | | for each back-end shipped with Laravel. You are free to add more. 26 | | 27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 3700, 42 | 'after_commit' => false, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 90, 50 | 'block_for' => 0, 51 | 'after_commit' => false, 52 | ], 53 | 54 | 'sqs' => [ 55 | 'driver' => 'sqs', 56 | 'key' => env('AWS_ACCESS_KEY_ID'), 57 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 58 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), 59 | 'queue' => env('SQS_QUEUE', 'default'), 60 | 'suffix' => env('SQS_SUFFIX'), 61 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 62 | 'after_commit' => false, 63 | ], 64 | 65 | 'redis' => [ 66 | 'driver' => 'redis', 67 | 'connection' => 'default', 68 | 'queue' => env('REDIS_QUEUE', 'default'), 69 | 'retry_after' => 90, 70 | 'block_for' => null, 71 | 'after_commit' => false, 72 | ], 73 | 74 | ], 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Failed Queue Jobs 79 | |-------------------------------------------------------------------------- 80 | | 81 | | These options configure the behavior of failed queue job logging so you 82 | | can control which database and table are used to store the jobs that 83 | | have failed. You may change them to any database / table you wish. 84 | | 85 | */ 86 | 87 | 'failed' => [ 88 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), 89 | 'database' => env('DB_CONNECTION', 'mysql'), 90 | 'table' => 'failed_jobs', 91 | ], 92 | 93 | ]; 94 | -------------------------------------------------------------------------------- /resources/views/scanners/view.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 |

Edit

3 | 4 |
5 | 6 | 7 |
8 | @csrf 9 | @method('put') 10 |
11 | 12 |
13 | 14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 | 34 |
35 |
36 |
37 | 57 | 66 | 67 | 68 |
69 |
70 | 71 |
72 |
73 | 74 | 75 |
76 |
77 | 78 | 117 | @include('include.footer') -------------------------------------------------------------------------------- /resources/views/schedule/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 |

New scheduler

5 |
6 | @csrf 7 | 8 | 9 |
10 |
11 |
12 | 21 |
22 |
23 |
24 |
25 |
26 |
27 | 36 |
37 |
38 |
39 | 40 | 41 |
42 |
43 |
44 | 54 |
55 |
56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 |
64 |
65 | 66 |
67 |
68 | 69 | 70 | 71 | 72 | 73 |
74 |
75 | 76 | 77 |
Tasks list
78 |
79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | @foreach ($schedulers as $schedule) 91 | @if($schedule->scope==null) 92 | @continue 93 | @endif 94 | 95 | 98 | 101 | 102 | 105 | 106 | 107 | 124 | 125 | @endforeach 126 | 127 |
ProjectsTimeTemplate
96 | {{ $schedule->scope->name }} 97 | 99 | {{ $schedule->frequency }} 100 | 103 | {{ $schedule->template->name }} 104 | 108 | 109 |
110 | @method('delete') 111 |
112 | 113 | @csrf 114 | 120 | 121 |
122 |
123 |
128 |
129 | @include('include.footer') -------------------------------------------------------------------------------- /resources/views/resources/list.blade.php: -------------------------------------------------------------------------------- 1 | @include('include.header') 2 | 3 | 4 | 17 |
18 | 19 |

Resources

20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | @if(isset($scope_entry)) 33 |
34 | @else 35 | 36 | @endif 37 | @csrf 38 | 39 |
40 |
41 | 42 |
43 |
44 | 47 |
48 |
49 |
50 |
51 | 52 | 53 | 54 | 55 | {{ $resources->links() }} 56 | 57 | 58 | 59 | @foreach ($resources as $resource) 60 |
61 | 62 | 63 |

64 | 65 |

{{$resource->name }}

66 | {{$resource->updated_at}} 67 | 68 |

69 |

70 | 71 | @foreach ($resource->services as $service) 72 | {{$service->port}} {{$service->service}}
73 | @endforeach 74 | 75 |

76 | 77 |
78 | @foreach ($resource->screenshots as $screenshot) 79 | @if($loop->count==4) 80 | @break 81 | @endif 82 |
83 |
84 |
85 | 86 | 87 | 88 |
89 | 90 |

{{$screenshot->title_short}}

91 | {{$screenshot->created_at}} 92 | 93 | @if(strlen($screenshot->ip)>0)

IP: {{$screenshot->ip }}

@endif 94 | 95 | @if(strlen($screenshot->server)>0)

Host: {{$screenshot->server }}

@endif 96 |
97 |
98 | @endforeach 99 | 100 | 101 | 102 | 103 |
104 | 105 |
106 |
107 | @endforeach 108 | 109 | 110 | 111 | 112 | 113 | {{ $resources->links() }} 114 | @include('include.footer') -------------------------------------------------------------------------------- /app/Jobs/LaunchScanJob.php: -------------------------------------------------------------------------------- 1 | scope=$scope; 35 | $this->onQueue('listeners'); 36 | $this->template_id=$template_id; 37 | } 38 | 39 | public function uniqueId() 40 | { 41 | return $this->scope->id; 42 | } 43 | 44 | public function handle() 45 | { 46 | 47 | if($this->template_id===FALSE) 48 | $template=$this->scope->scope_template->template; 49 | else 50 | $template=Template::where('id',$this->template_id)->first(); 51 | if($template==null)return 1; 52 | //scope_entries 53 | foreach($this->scope->scope_entries as $scope_entry) 54 | { 55 | foreach($template->template_entries as $entry) 56 | { 57 | if($entry->scanner_entry->scanner->type!='discovery')continue; 58 | $tmp=new Queue; 59 | $tmp->object_type="scope_entry"; 60 | $tmp->object_id=$scope_entry->id; 61 | $tmp->user_id=$this->scope->user_id; 62 | $tmp->scanner_entry_id=$entry->scanner_entry->id; 63 | $tmp->scope_id=$this->scope->id; 64 | $tmp->type="chain"; 65 | $tmp->save(); 66 | } 67 | 68 | } 69 | //resources 70 | foreach($this->scope->scope_entries as $scope_entry) 71 | { 72 | foreach($scope_entry->resources as $resource) 73 | { 74 | foreach($template->template_entries as $entry) 75 | { 76 | if($entry->scanner_entry->scanner->type!='resource')continue; 77 | $tmp=new Queue; 78 | $tmp->object_type="resource"; 79 | $tmp->object_id=$resource->id; 80 | $tmp->user_id=$this->scope->user_id; 81 | $tmp->scanner_entry_id=$entry->scanner_entry->id; 82 | $tmp->scope_id=$this->scope->id; 83 | $tmp->type="chain"; 84 | $tmp->save(); 85 | } 86 | } 87 | 88 | } 89 | //services 90 | foreach($this->scope->scope_entries as $scope_entry) 91 | { 92 | foreach($scope_entry->resources as $resource) 93 | { 94 | foreach($resource->services as $service) 95 | { 96 | foreach($template->template_entries as $entry) 97 | { 98 | if($entry->scanner_entry->scanner->type!='service')continue; 99 | $tmp=new Queue; 100 | $tmp->object_type="service"; 101 | $tmp->object_id=$service->id; 102 | $tmp->user_id=$this->scope->user_id; 103 | $tmp->scanner_entry_id=$entry->scanner_entry->id; 104 | $tmp->scope_id=$this->scope->id; 105 | $tmp->type="chain"; 106 | $tmp->save(); 107 | } 108 | } 109 | } 110 | 111 | } 112 | 113 | 114 | 115 | 116 | 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'none'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | | Supported drivers: "apc", "array", "database", "file", 30 | | "memcached", "redis", "dynamodb", "octane", "null" 31 | | 32 | */ 33 | 34 | 'stores' => [ 35 | 36 | 'apc' => [ 37 | 'driver' => 'apc', 38 | ], 39 | 40 | 'array' => [ 41 | 'driver' => 'array', 42 | 'serialize' => false, 43 | ], 44 | 45 | 'database' => [ 46 | 'driver' => 'database', 47 | 'table' => 'cache', 48 | 'connection' => null, 49 | 'lock_connection' => null, 50 | ], 51 | 'none' => [ 52 | 'driver' => 'null', 53 | ], 54 | 'file' => [ 55 | 'driver' => 'file', 56 | 'path' => storage_path('framework/cache/data'), 57 | ], 58 | 59 | 'memcached' => [ 60 | 'driver' => 'memcached', 61 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 62 | 'sasl' => [ 63 | env('MEMCACHED_USERNAME'), 64 | env('MEMCACHED_PASSWORD'), 65 | ], 66 | 'options' => [ 67 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 68 | ], 69 | 'servers' => [ 70 | [ 71 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 72 | 'port' => env('MEMCACHED_PORT', 11211), 73 | 'weight' => 100, 74 | ], 75 | ], 76 | ], 77 | 78 | 'redis' => [ 79 | 'driver' => 'redis', 80 | 'connection' => 'cache', 81 | 'lock_connection' => 'default', 82 | ], 83 | 84 | 'dynamodb' => [ 85 | 'driver' => 'dynamodb', 86 | 'key' => env('AWS_ACCESS_KEY_ID'), 87 | 'secret' => env('AWS_SECRET_ACCESS_KEY'), 88 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), 89 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), 90 | 'endpoint' => env('DYNAMODB_ENDPOINT'), 91 | ], 92 | 93 | 'octane' => [ 94 | 'driver' => 'octane', 95 | ], 96 | 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Cache Key Prefix 102 | |-------------------------------------------------------------------------- 103 | | 104 | | When utilizing a RAM based store such as APC or Memcached, there might 105 | | be other applications utilizing the same cache. So, we'll specify a 106 | | value to get prefixed to all our keys so we can avoid collisions. 107 | | 108 | */ 109 | 110 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_MAILER', 'smtp'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Mailer Configurations 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may configure all of the mailers used by your application plus 24 | | their respective settings. Several examples have been configured for 25 | | you and you are free to add your own as your application requires. 26 | | 27 | | Laravel supports a variety of mail "transport" drivers to be used while 28 | | sending an e-mail. You will specify which one you are using for your 29 | | mailers below. You are free to add additional mailers as required. 30 | | 31 | | Supported: "smtp", "sendmail", "mailgun", "ses", 32 | | "postmark", "log", "array", "failover" 33 | | 34 | */ 35 | 36 | 'mailers' => [ 37 | 'smtp' => [ 38 | 'transport' => 'smtp', 39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 40 | 'port' => env('MAIL_PORT', 587), 41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 42 | 'username' => env('MAIL_USERNAME'), 43 | 'password' => env('MAIL_PASSWORD'), 44 | 'timeout' => null, 45 | 'auth_mode' => null, 46 | ], 47 | 48 | 'ses' => [ 49 | 'transport' => 'ses', 50 | ], 51 | 52 | 'mailgun' => [ 53 | 'transport' => 'mailgun', 54 | ], 55 | 56 | 'postmark' => [ 57 | 'transport' => 'postmark', 58 | ], 59 | 60 | 'sendmail' => [ 61 | 'transport' => 'sendmail', 62 | 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'), 63 | ], 64 | 65 | 'log' => [ 66 | 'transport' => 'log', 67 | 'channel' => env('MAIL_LOG_CHANNEL'), 68 | ], 69 | 70 | 'array' => [ 71 | 'transport' => 'array', 72 | ], 73 | 74 | 'failover' => [ 75 | 'transport' => 'failover', 76 | 'mailers' => [ 77 | 'smtp', 78 | 'log', 79 | ], 80 | ], 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Global "From" Address 86 | |-------------------------------------------------------------------------- 87 | | 88 | | You may wish for all e-mails sent by your application to be sent from 89 | | the same address. Here, you may specify a name and address that is 90 | | used globally for all e-mails that are sent by your application. 91 | | 92 | */ 93 | 94 | 'from' => [ 95 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), 96 | 'name' => env('MAIL_FROM_NAME', 'Example'), 97 | ], 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Markdown Mail Settings 102 | |-------------------------------------------------------------------------- 103 | | 104 | | If you are using Markdown based email rendering, you may configure your 105 | | theme and component paths here, allowing you to customize the design 106 | | of the emails. Or, you may simply stick with the Laravel defaults! 107 | | 108 | */ 109 | 110 | 'markdown' => [ 111 | 'theme' => 'default', 112 | 113 | 'paths' => [ 114 | resource_path('views/vendor/mail'), 115 | ], 116 | ], 117 | 118 | ]; 119 | --------------------------------------------------------------------------------