🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

HackSystem.Web.CookieStorage

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

HackSystem.Web.CookieStorage

Cookie storage component of Hack System. Should work together with blazor.cookie.js of Hack System.

1.0.0.5
Source
NuGet
Version published
Maintainers
1
Created
Source

HackSystem

Hack System

A Hack System based on ASP.NET Core and Blazor WebAssembly.

Design and implement your program and Execute it in Hack System!

Status

Nuget Packages

How to launch?

  • Install .Net 6.0 SDK.
  • Download source code and open in Visual Studio 2019 (16.8+).
  • Set HackSystem.WebHost and HackSystem.WebAPI as startup projects.
  • Press F5 to run.
  • Navigate to https://localhost:2473
  • Enjoy it.

How to deploy?

  • Edit hosting.json file of HackSystem.WebHost and HackSystem.WebAPI projects to config the port to listen.
  • Edit wwwroot/appsettings.json file of HackSystem.Web so that APIConfiguration.APIURL equals urls of HackSystem.WebHost to config the address of Web API.
  • Edit JwtConfiguration section of HackSystem.WebAPI project's appsettings.json, it is Important for security!
  • Publish HackSystem.WebHost and HackSystem.WebAPI projects.
    • HackSystem.WebHost is just a fake host of core project HackSystem.Web.
  • Navigate to Hack System:
    • Open browser and navigate to the address which you just configured for HackSystem.WebHost.
    • Or you can use the HackSystem.Host project to visit Hack System.
      • Before you launch HackSystem.Host, edit HostConfigs.json file so that RemoteURL equals the address which you just configured for HackSystem.WebHost.
      • Just run HackSystem.Host.exe.
  • Enjoy it.

How to develop customized programs

Something may change with platform developing.

  • Create a new Razor Class Library project.

  • Install above nuget pakcages to this project.

  • Add a new image file named as Index.png in root folder of this project, and copy to output directory if newer.

  • Create a new Razor Component as entry component, and inherits ProgramComponentBase class.

    • Design and Implement it.
  • Create a new static Launcher class and return the type of entry component from static Launch method.

    • public static class Launcher
      {
          // Launch Parameter is not mandatory.
          public static Type Launch(LaunchParameter parameter)
          {
              return typeof(TaskSchedulerComponent);
          }
      }
      

How to deploy customized programs

Something may change with platform developing.

  • Insert a new record in database of new program.

    • INSERT INTO ProgramDetails (Id,Name,Enabled,SingleInstance,EntryAssemblyName,EntryTypeName,EntryParameter,Mandatory)
      VALUES ('program0-icon-0828-hack-system000006','TaskServer',1,1,'HackSystem.Web.TaskSchedule','HackSystem.Web.TaskSchedule.Launcher','{ "Developer": "Leon" }',1);	
      
  • Edit ProgramAssetConfiguration section of HackSystem.WebAPI project's appsettings.json to config program asset folder path.

  • Create new filder named as new program ID in program asset folder.

  • Build program project and copy all files into above folder.

    • Post-build event to copy program files into WebAPI's out directory automatically.
      set assetFolder=$(SolutionDir)HackSystem.WebAPI\$(OutDir)ProgramAssets\
      MKDIR assetFolder
      set assetFolder=%assetFolder%program0-icon-0828-hack-system000006\
      MKDIR assetFolder
      XCOPY $(TargetDir)* %assetFolder% /Y /S /H
      
  • Insert a new record in database to map releationship between user and program.

    • INSERT INTO UserProgramMaps (UserId,ProgramId,PinToDesktop,PinToDock,PinToTop,"Rename")
      VALUES ('msaspnet-core-user-hack-system000001','program0-icon-0828-hack-system000006',1,0,0,NULL);
      
  • Launch Hack System and login above user, should see the new program launch and enjoy it.

Video

Click image below to watch video.

Main Desktop (2020-09-27)

Multiple Windows Scheduler (2021-10-24)

Screen

Start Up

Register

Login

Desktop Demo

Task Scheduler

Database Migration

Setup

  • Select HackSystem.WebAPI as Startup project;
  • Open Package Manager Console in Visual Studio;
  • Select HackSystem.WebAPI.Infrastructure as Default project in Package Manager Console;
  • Input commands and execute;

Commands

CommandDescription
Get-Help entityframeworkDisplays information about entity framework commands.
Add-MigrationCreates a migration by adding a migration snapshot.
Remove-MigrationRemoves the last migration snapshot.
Update-DatabaseUpdates the database schema based on the last migration snapshot.
Script-MigrationGenerates a SQL script using all the migration snapshots.
Scaffold-DbContextGenerates a DbContext and entity type classes for a specified database. This is called reverse engineering.
Get-DbContextGets information about a DbContext type.
Drop-DatabaseDrops the database.

Keywords

HackSystem

FAQs

Package last updated on 11 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts