-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,14 @@ <h1>Configuration Profile Generator</h1> | |
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script> | ||
<script> | ||
// Function to generate a random UUID | ||
function generateUUID() { | ||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | ||
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); | ||
return v.toString(16); | ||
}); | ||
} | ||
|
||
document.getElementById('config-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
|
||
|
@@ -90,7 +98,7 @@ <h1>Configuration Profile Generator</h1> | |
PayloadDisplayName: "Cellular", | ||
PayloadIdentifier: "com.apple.cellular", | ||
PayloadType: "com.apple.cellular", | ||
PayloadUUID: "A1B2C3D4-E5F6-1234-5678-90ABCDEF0123", | ||
PayloadUUID: generateUUID(), // Generate a unique UUID | ||
PayloadVersion: 1, | ||
APNs: [ | ||
{ | ||
|
@@ -103,15 +111,15 @@ <h1>Configuration Profile Generator</h1> | |
VPN: { | ||
Enabled: true, | ||
PayloadType: "com.apple.vpn", | ||
PayloadUUID: "A1B2C3D4-E5F6-1234-5678-90ABCDEF0124", | ||
PayloadUUID: generateUUID(), // Generate a unique UUID | ||
PayloadVersion: 1, | ||
OnDemandEnabled: true, | ||
PayloadContent: [ | ||
{ | ||
PayloadDisplayName: "VPN Configuration", | ||
PayloadIdentifier: "com.apple.vpn.managed", | ||
PayloadType: "com.apple.vpn.managed", | ||
PayloadUUID: "A1B2C3D4-E5F6-1234-5678-90ABCDEF0125", | ||
PayloadUUID: generateUUID(), // Generate a unique UUID | ||
PayloadVersion: 1, | ||
AuthenticationMethod: "Certificate", | ||
DisconnectOnLogout: true, | ||
|
@@ -128,7 +136,7 @@ <h1>Configuration Profile Generator</h1> | |
Proxy: { | ||
Enabled: true, | ||
PayloadType: "com.apple.proxy", | ||
PayloadUUID: "A1B2C3D4-E5F6-1234-5678-90ABCDEF0126", | ||
PayloadUUID: generateUUID(), // Generate a unique UUID | ||
PayloadVersion: 1, | ||
HTTPEnable: true, | ||
HTTPPort: parseInt(formData.get('http_port')), 10), | ||
|
@@ -144,7 +152,7 @@ <h1>Configuration Profile Generator</h1> | |
Firewall: { | ||
Enabled: true, | ||
PayloadType: "com.apple.firewall", | ||
PayloadUUID: "A1B2C3D4-E5F6-1234-5678-90ABCDEF0127", | ||
PayloadUUID: generateUUID(), // Generate a unique UUID | ||
PayloadVersion: 1, | ||
AllowedApplications: formData.get('allowed_applications').split(','), | ||
AllowedServices: formData.get('allowed_services').split(','), | ||
|
@@ -157,7 +165,7 @@ <h1>Configuration Profile Generator</h1> | |
PayloadOrganization: "Example Inc.", | ||
PayloadRemovalDisallowed: false, | ||
PayloadType: "Configuration", | ||
PayloadUUID: "A1B2C3D4-E5F6-1234-5678-90ABCDEF0128", | ||
PayloadUUID: generateUUID(), // Generate a unique UUID | ||
PayloadVersion: 1 | ||
}; | ||
|
||
|