mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-08-23 19:02:34 +02:00
Added options for campaign obfuscation
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
+76
-74
@@ -499,6 +499,7 @@ export class API {
|
||||
* @param {boolean} [campaign.saveSubmittedData]
|
||||
* @param {boolean} [campaign.isAnonymous]
|
||||
* @param {boolean} [campaign.isTest]
|
||||
* @param {boolean} [campaign.obfuscate]
|
||||
* @param {string} campaign.sortField
|
||||
* @param {string} campaign.sortOrder
|
||||
* @param {string} campaign.sendStartAt
|
||||
@@ -522,6 +523,7 @@ export class API {
|
||||
saveSubmittedData,
|
||||
isAnonymous,
|
||||
isTest,
|
||||
obfuscate,
|
||||
sortField,
|
||||
sortOrder,
|
||||
sendStartAt,
|
||||
@@ -543,6 +545,7 @@ export class API {
|
||||
name,
|
||||
isAnonymous,
|
||||
isTest,
|
||||
obfuscate,
|
||||
saveSubmittedData,
|
||||
sortField,
|
||||
sortOrder,
|
||||
@@ -561,6 +564,79 @@ export class API {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object} campaign
|
||||
* @param {string} campaign.id
|
||||
* @param {string} campaign.name
|
||||
* @param {boolean} [campaign.saveSubmittedData]
|
||||
* @param {boolean} [campaign.isAnonymous]
|
||||
* @param {boolean} [campaign.isTest]
|
||||
* @param {boolean} [campaign.obfuscate]
|
||||
* @param {string} campaign.sortField
|
||||
* @param {string} campaign.sortOrder
|
||||
* @param {string} campaign.sendStartAt
|
||||
* @param {string} campaign.sendEndAt
|
||||
* @param {string} [campaign.closeAt]
|
||||
* @param {string} [campaign.anonymizeAt]
|
||||
* @param {string} campaign.templateID uuid
|
||||
* @param {string[]} campaign.recipientGroupIDs []uuid
|
||||
* @param {string[]} campaign.allowDenyIDs []uuid
|
||||
* @param {string} campaign.denyPageID uuid
|
||||
* @param {string} campaign.evasionPageID uuid
|
||||
* @param {string} campaign.webhookID uuid
|
||||
* @param {Array} [campaign.constraintWeekDays]
|
||||
* @param {string} [campaign.constraintStartTime]
|
||||
* @param {string} [campaign.constraintEndTime]
|
||||
* @returns {Promise<ApiResponse>}
|
||||
*/
|
||||
update: async ({
|
||||
id,
|
||||
name,
|
||||
saveSubmittedData,
|
||||
isAnonymous,
|
||||
isTest,
|
||||
obfuscate,
|
||||
sortField,
|
||||
sortOrder,
|
||||
sendStartAt,
|
||||
sendEndAt,
|
||||
closeAt,
|
||||
anonymizeAt,
|
||||
templateID,
|
||||
recipientGroupIDs,
|
||||
allowDenyIDs,
|
||||
denyPageID,
|
||||
evasionPageID,
|
||||
webhookID,
|
||||
constraintWeekDays,
|
||||
constraintStartTime,
|
||||
constraintEndTime
|
||||
}) => {
|
||||
return await postJSON(this.getPath(`/campaign/${id}`), {
|
||||
name,
|
||||
isAnonymous,
|
||||
isTest,
|
||||
obfuscate,
|
||||
saveSubmittedData,
|
||||
sortField,
|
||||
sortOrder,
|
||||
sendStartAt,
|
||||
sendEndAt,
|
||||
closeAt,
|
||||
anonymizeAt,
|
||||
templateID,
|
||||
recipientGroupIDs,
|
||||
allowDenyIDs,
|
||||
denyPageID,
|
||||
evasionPageID,
|
||||
webhookID,
|
||||
constraintWeekDays,
|
||||
constraintStartTime,
|
||||
constraintEndTime
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Get a campaign by ID.
|
||||
*
|
||||
@@ -767,80 +843,6 @@ export class API {
|
||||
return await getJSON(this.getPath(`/campaign/recipient/${campaignRecipientID}/url`));
|
||||
},
|
||||
|
||||
/**
|
||||
* Update a campaign.
|
||||
*
|
||||
* @param {object} campaign
|
||||
* @param {string} campaign.id
|
||||
* @param {string} [campaign.companyID] uuid
|
||||
* @param {string} [campaign.templateID] uuid
|
||||
* @param {string} [campaign.name]
|
||||
* @param {boolean} [campaign.saveSubmittedData]
|
||||
* @param {boolean} [campaign.isAnonymous]
|
||||
* @param {boolean} [campaign.isTest]
|
||||
* @param {string} [campaign.sortField]
|
||||
* @param {string} [campaign.sortOrder]
|
||||
* @param {string} [campaign.sendStartAt]
|
||||
* @param {string} [campaign.sendEndAt]
|
||||
* @param {array} [campaign.constraintWeekDays]
|
||||
* @param {string} [campaign.constraintStartTime]
|
||||
* @param {string} [campaign.constraintEndTime]
|
||||
* @param {string} [campaign.closeAt]
|
||||
* @param {string} [campaign.anonymizeAt]
|
||||
* @param {string[]} [campaign.recipientGroupIDs] []uuid
|
||||
* @param {string[]} campaign.allowDenyIDs []uuid
|
||||
* @param {string} campaign.denyPageID uuid
|
||||
* @param {string} campaign.evasionPageID uuid
|
||||
* @param {string} campaign.webhookID uuid
|
||||
* @returns {Promise<ApiResponse>}
|
||||
*/
|
||||
update: async ({
|
||||
id,
|
||||
companyID,
|
||||
templateID,
|
||||
name,
|
||||
saveSubmittedData,
|
||||
isAnonymous,
|
||||
isTest,
|
||||
sortField,
|
||||
sortOrder,
|
||||
sendStartAt,
|
||||
sendEndAt,
|
||||
constraintWeekDays,
|
||||
constraintStartTime,
|
||||
constraintEndTime,
|
||||
closeAt,
|
||||
anonymizeAt,
|
||||
recipientGroupIDs,
|
||||
allowDenyIDs,
|
||||
denyPageID,
|
||||
evasionPageID,
|
||||
webhookID
|
||||
}) => {
|
||||
return await postJSON(this.getPath(`/campaign/${id}`), {
|
||||
companyID,
|
||||
templateID,
|
||||
name,
|
||||
isAnonymous,
|
||||
isTest,
|
||||
saveSubmittedData,
|
||||
sortField,
|
||||
sortOrder,
|
||||
sendStartAt,
|
||||
sendEndAt,
|
||||
constraintWeekDays,
|
||||
constraintStartTime,
|
||||
constraintEndTime,
|
||||
closeAt,
|
||||
anonymizeAt,
|
||||
recipientGroupIDs,
|
||||
allowDenyIDs,
|
||||
denyPageID,
|
||||
evasionPageID,
|
||||
webhookID
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Delete a campaign.
|
||||
*
|
||||
|
||||
@@ -255,6 +255,7 @@
|
||||
saveSubmittedData: true,
|
||||
isAnonymous: null,
|
||||
isTest: false,
|
||||
obfuscate: false,
|
||||
selectedCount: 0,
|
||||
webhookValue: null
|
||||
};
|
||||
@@ -625,6 +626,7 @@
|
||||
saveSubmittedData: formValues.saveSubmittedData,
|
||||
isAnonymous: formValues.isAnonymous,
|
||||
isTest: formValues.isTest,
|
||||
obfuscate: formValues.obfuscate,
|
||||
recipientGroupIDs: recipientGroupIDs,
|
||||
allowDenyIDs: allowDenyIDs,
|
||||
denyPageID: denyPageMap.byValueOrNull(formValues.denyPageValue),
|
||||
@@ -683,6 +685,7 @@
|
||||
saveSubmittedData: formValues.saveSubmittedData,
|
||||
isAnonymous: formValues.isAnonymous,
|
||||
isTest: formValues.isTest,
|
||||
obfuscate: formValues.obfuscate,
|
||||
constraintWeekDays: weekDaysAvailableToBinary(formValues.constraintWeekDays),
|
||||
constraintStartTime: contraintStartTimeUTC,
|
||||
constraintEndTime: contraintEndTimeUTC,
|
||||
@@ -813,8 +816,9 @@
|
||||
contraintStartTime: null,
|
||||
contraintEndTime: null,
|
||||
saveSubmittedData: true,
|
||||
isAnonymous: false,
|
||||
isAnonymous: null,
|
||||
isTest: false,
|
||||
obfuscate: false,
|
||||
selectedCount: 0,
|
||||
webhookValue: null
|
||||
};
|
||||
@@ -918,6 +922,7 @@
|
||||
saveSubmittedData: campaign.saveSubmittedData,
|
||||
isAnonymous: campaign.isAnonymous,
|
||||
isTest: campaign.isTest,
|
||||
obfuscate: campaign.obfuscate || false,
|
||||
template: templateMap.byKey(campaign.templateID),
|
||||
webhookValue: webhookMap.byKey(campaign.webhookID)
|
||||
};
|
||||
@@ -965,7 +970,8 @@
|
||||
campaign.webhookID ||
|
||||
campaign.denyPage ||
|
||||
campaign.evasionPage ||
|
||||
campaign.allowDeny?.length
|
||||
campaign.allowDeny?.length ||
|
||||
campaign.obfuscate
|
||||
);
|
||||
|
||||
if (campaign.evasionPage) {
|
||||
@@ -1597,6 +1603,19 @@
|
||||
{/if}
|
||||
|
||||
{#if showAdvancedOptionsStep4 && showSecurityOptions}
|
||||
<div class="mb-6">
|
||||
<SelectSquare
|
||||
optional
|
||||
label="Obfuscation"
|
||||
toolTipText="Obfuscate html pages to avoid fingerprinting of static content."
|
||||
options={[
|
||||
{ value: false, label: 'Disabled' },
|
||||
{ value: true, label: 'Enabled' }
|
||||
]}
|
||||
bind:value={formValues.obfuscate}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<TextFieldSelect
|
||||
id="deny-page"
|
||||
|
||||
Reference in New Issue
Block a user