mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-08-17 16:07:18 +02:00
Initial open source release
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
package data
|
||||
|
||||
const ASSET_GLOBAL_FOLDER = "shared"
|
||||
const ATTACHMENT_GLOBAL_FOLDER = "shared"
|
||||
@@ -0,0 +1,36 @@
|
||||
package data
|
||||
|
||||
const (
|
||||
EVENT_CAMPAIGN_SCHEDULED = "campaign_scheduled"
|
||||
EVENT_CAMPAIGN_ACTIVE = "campaign_active"
|
||||
EVENT_CAMPAIGN_SELF_MANAGED = "campaign_self_managed"
|
||||
EVENT_CAMPAIGN_CLOSED = "campaign_closed"
|
||||
|
||||
EVENT_CAMPAIGN_RECIPIENT_SCHEDULED = "campaign_recipient_scheduled"
|
||||
EVENT_CAMPAIGN_RECIPIENT_MESSAGE_SENT = "campaign_recipient_message_sent"
|
||||
EVENT_CAMPAIGN_RECIPIENT_MESSAGE_FAILED = "campaign_recipient_message_failed"
|
||||
EVENT_CAMPAIGN_RECIPIENT_MESSAGE_READ = "campaign_recipient_message_read"
|
||||
EVENT_CAMPAIGN_RECIPIENT_BEFORE_PAGE_VISITED = "campaign_recipient_before_page_visited"
|
||||
EVENT_CAMPAIGN_RECIPIENT_PAGE_VISITED = "campaign_recipient_page_visited"
|
||||
EVENT_CAMPAIGN_RECIPIENT_AFTER_PAGE_VISITED = "campaign_recipient_after_page_visited"
|
||||
EVENT_CAMPAIGN_RECIPIENT_SUBMITTED_DATA = "campaign_recipient_submitted_data"
|
||||
EVENT_CAMPAIGN_RECIPIENT_CANCELLED = "campaign_recipient_cancelled"
|
||||
)
|
||||
|
||||
var Events = []string{
|
||||
// campaign events
|
||||
EVENT_CAMPAIGN_SCHEDULED,
|
||||
EVENT_CAMPAIGN_ACTIVE,
|
||||
EVENT_CAMPAIGN_SELF_MANAGED,
|
||||
EVENT_CAMPAIGN_CLOSED,
|
||||
// campaign recipient events
|
||||
EVENT_CAMPAIGN_RECIPIENT_SCHEDULED,
|
||||
EVENT_CAMPAIGN_RECIPIENT_MESSAGE_SENT,
|
||||
EVENT_CAMPAIGN_RECIPIENT_MESSAGE_FAILED,
|
||||
EVENT_CAMPAIGN_RECIPIENT_MESSAGE_READ,
|
||||
EVENT_CAMPAIGN_RECIPIENT_BEFORE_PAGE_VISITED,
|
||||
EVENT_CAMPAIGN_RECIPIENT_PAGE_VISITED,
|
||||
EVENT_CAMPAIGN_RECIPIENT_AFTER_PAGE_VISITED,
|
||||
EVENT_CAMPAIGN_RECIPIENT_SUBMITTED_DATA,
|
||||
EVENT_CAMPAIGN_RECIPIENT_CANCELLED,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package data
|
||||
|
||||
const (
|
||||
DefaultAdminCertDir = "certs/admin"
|
||||
DefaultAdminPublicCertFileName = "public.pem"
|
||||
DefaultAdminPrivateCertFileName = "private.pem"
|
||||
)
|
||||
|
||||
const (
|
||||
// default admin user
|
||||
DefaultSacrificalAccountUsername = "admin"
|
||||
DefaultSacrificalAccountName = "admin"
|
||||
DefaultSacrificalAccountEmail = "admin@localhost.invalid" // RFC 2606
|
||||
DefaultSacrificalCompanyName = "company"
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
package data
|
||||
|
||||
const (
|
||||
MESSAGE_TYPE_EMAIL = "email"
|
||||
MESSAGE_TYPE_SMS = "sms"
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
package data
|
||||
|
||||
const (
|
||||
OptionKeyIsInstalled = "is_installed"
|
||||
OptionValueIsInstalled = "true"
|
||||
OptionValueIsNotInstalled = "false"
|
||||
// KeyIsInstalled is the key for the is_installed option
|
||||
OptionKeyInstanceID = "instance_id"
|
||||
|
||||
OptionKeyLogLevel = "log_level"
|
||||
OptionKeyDBLogLevel = "db_log_level"
|
||||
|
||||
OptionKeyUsingSystemd = "systemd_install"
|
||||
OptionValueUsingSystemdYes = "true"
|
||||
OptionValueUsingSystemdNo = "false"
|
||||
|
||||
OptionKeyDevelopmentSeeded = "development_seeded"
|
||||
OptionValueSeeded = "true"
|
||||
|
||||
OptionKeyMaxFileUploadSizeMB = "max_file_upload_size_mb"
|
||||
OptionValueKeyMaxFileUploadSizeMBDefault = "100"
|
||||
|
||||
OptionKeyRepeatOffenderMonths = "repeat_offender_months"
|
||||
|
||||
OptionKeyAdminSSOLogin = "sso_login"
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
package data
|
||||
|
||||
const (
|
||||
PAGE_TYPE_BEFORE = "before"
|
||||
PAGE_TYPE_LANDING = "landing"
|
||||
PAGE_TYPE_AFTER = "after"
|
||||
PAGE_TYPE_DONE = "done"
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
package data
|
||||
|
||||
const (
|
||||
// PERMISSION_ALLOW_GLOBAL allows all permissions, it is the god mode of permissions
|
||||
PERMISSION_ALLOW_GLOBAL = "*"
|
||||
)
|
||||
@@ -0,0 +1,26 @@
|
||||
package data
|
||||
|
||||
// This is name key for the different roles
|
||||
const (
|
||||
// RoleSystem is the system role
|
||||
// is is reserved for system actions only
|
||||
RoleSystem = "system"
|
||||
// RoleSuperAdministrator is the super administrator role
|
||||
// this role has access to everything a user can do
|
||||
RoleSuperAdministrator = "superadministrator"
|
||||
// RoleCompanyAdministrator is the company role
|
||||
// this role had read access to their associated company
|
||||
RoleCompanyUser = "companyuser"
|
||||
)
|
||||
|
||||
// RolePermissions is a map of roles to their permissions
|
||||
// these are the roles and their permissions
|
||||
var RolePermissions = map[string][]string{
|
||||
RoleSystem: {
|
||||
PERMISSION_ALLOW_GLOBAL,
|
||||
},
|
||||
RoleSuperAdministrator: {
|
||||
PERMISSION_ALLOW_GLOBAL,
|
||||
},
|
||||
RoleCompanyUser: {},
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package data
|
||||
|
||||
const SessionCookieKey = "session"
|
||||
const APIHeaderKey = "x-API"
|
||||
const RequestAPISessionKey = "apiSession"
|
||||
|
||||
const SystemSessionID = "00000000-0000-0111-0777-000000000000"
|
||||
const APISessionID = "00000000-0000-0100-0000-000000000000"
|
||||
@@ -0,0 +1,11 @@
|
||||
package data
|
||||
|
||||
import "github.com/phishingclub/phishingclub/build"
|
||||
|
||||
// GetCrmURL returns the URL for the CRM system depending on the environment
|
||||
func GetCrmURL() string {
|
||||
if build.Flags.Production {
|
||||
return "https://user.phishing.club"
|
||||
}
|
||||
return "https://crm:8009"
|
||||
}
|
||||
Reference in New Issue
Block a user