Compare commits

..

16 Commits

Author SHA1 Message Date
1145b900e4 Merge pull request 'Virtualbox-Wrapper - Bugfix' (#8) from feature/Virtualbox-Wrapper-Fix into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #8
Reviewed-by: Aaron Hance <ah@aaronhance.me>
2025-03-23 19:01:28 +00:00
436cd86d8c Updated virtualbox wrapper as it was causing stale powershell processes to build up over time
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
- Updated `Virtualbox-Wrapper.ps1` to include `Get-Job | Stop-Job | Remove-Job -Force` at the end of execution, as the spawning of jobs was causing stale PowerShell processes to build up over time.
2025-03-23 17:54:55 +00:00
540444dfbf Merge pull request 'feature/drone-discord-webhooks' (#7) from feature/drone-discord-webhooks into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #7
2025-03-23 15:21:58 +00:00
2d7c51ed15 Further formatting cleanups
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
- Attempted to remove automatic discord embeds by surrounding any markdown links with `<` `>`.
- Corrected some spacing.
2025-03-23 01:14:28 +00:00
c842d9774f Formatting Fixed - Enchancing
All checks were successful
continuous-integration/drone/push Build is passing
- Formatting is now fixed & newlines are working correctly, shame the YAML looks w?*! 🤣
- Added sections to the message for links to Gitea & Drone.
2025-03-23 00:59:36 +00:00
5963504f6b More attempts at format fixes
All checks were successful
continuous-integration/drone/push Build is passing
Formatting still off, condensing to one line to see if the escaped newlines will work. YAML is wild.
2025-03-23 00:48:31 +00:00
e64a59714a Formatting Fixes
All checks were successful
continuous-integration/drone/push Build is passing
Formatting was off for the message posted to Discord, it also triggered at the start of the pipeline.
- Fixed formatting with an attempt to use newlines.
- Added a depends_on `compile`.
2025-03-23 00:41:22 +00:00
dd5d908e43 DroneCI config updated to push to discord webhook
All checks were successful
continuous-integration/drone/push Build is passing
- `.drone.yml` updated to push notifications to the discord webhook.
2025-03-23 00:31:20 +00:00
28846af43c Merge pull request 'feature/dynamic-lists' (#6) from feature/dynamic-lists into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #6
Reviewed-by: t3hn3rd <kjm@kieronmorris.me>
2025-03-22 19:24:52 +00:00
b1e3953960 Merge pull request 'Fixed a DHCP bug' (#5) from feature/DHCP-BugFix into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5
2025-03-22 19:13:25 +00:00
7e00e23801 Fixed and expanded dynamic lists, commented whole file 2025-03-22 19:02:43 +00:00
bd12bbe862 DevOps Workflow Improvements 2025-03-22 18:42:44 +00:00
48c203f028 Fixed a DHCP bug
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
- Fixed a bug within `dhcp.pas` - `processPacket_OFFER` in which the client was responding with the client IP value within the DHCP header was incorrectly being filled out with the IP being requested & this value was then being used within the REQUESTED_IP_ADDRESS option. Corrected this to fill out the client IP with the currently configured IP, which will be NULL (0.0.0.0) on boot, and whatever is issued thereafter.
- Cascaded the change to use the currently configured IP as opposed to a NULL IP to any other functions that were calling `copyIPv4(@NULL_IP[0], @packetCtx^.IP.Source[0])`.
- Allowed `processPacket_OFFER` to process packets addressed to the BROADCAST MAC (WHY COULDN'T IT DO THIS ALREADY?!).
2025-03-17 00:00:21 +00:00
d859e40e4a Added mail map
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-15 10:52:08 +00:00
dbc5105b9b Dynamic lists fixes and additions 2022-02-08 21:28:47 +00:00
a61289a318 Dynamic list/array inital commit.- 2022-02-07 21:37:36 +00:00
5 changed files with 1153 additions and 246 deletions

View File

@ -50,3 +50,16 @@ steps:
- |
curl -X PUT https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso \
-H "Authorization: token $GITEA_TOKEN" --upload-file "Asuro-$(git rev-parse --short HEAD).iso"
- name: msg status
image: appleboy/drone-discord
depends_on:
- compile
when:
status: [success, failure, changed]
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: "**Asuro Build**\n\n{{#success build.status}}✅ Build successful!\n\n{{else}}❌ Build failed!\n\n{{/success}}Repository: `{{repo.namespace}}/{{repo.name}}`\nBranch: `{{commit.branch}}`\nCommit: `{{commit.sha}}`\nAuthor: `{{commit.author}} <{{commit.email}}>`\n\nGitea Diff: [Link](<{{commit.link}}>)\nDrone Build: [Link](<{{build.link}}>)\n\nMessage: {{commit.message}}"

13
.mailmap Normal file
View File

@ -0,0 +1,13 @@
# Map all Aaron identities to a single preferred identity
Aaron Hance <ah@aaronhance.me> aaron <aaron@6dbc8c32-bb84-406f-8558-d1cf31a0ab0c>
Aaron Hance <ah@aaronhance.me> aaronhance <ah@aaronhance.me>
Aaron Hance <ah@aaronhance.me> aaron hance <ah@aaronhance.me>
Aaron Hance <ah@aaronhance.me> Aaron <ah@aaronhance.me>
# Map all Kieron identities to a single preferred identity
Kieron Morris <kjm@kieronmorris.me> kieron <kieron@6dbc8c32-bb84-406f-8558-d1cf31a0ab0c>
Kieron Morris <kjm@kieronmorris.me> Kieron <kjm@kieronmorris.me>
Kieron Morris <kjm@kieronmorris.me> t3hn3rd <kjm@kieronmorris.me>
# Map goose's multiple identities
goose <goose@6dbc8c32-bb84-406f-8558-d1cf31a0ab0c> goose <angus@actm.uk>

View File

@ -491,22 +491,26 @@ begin
{ Create a new header to the use in our DHCP REQUEST packet }
SendHeader:= createHeader();
CopyIPv4(puint8(@Header^.Your_IP[0]), puint8(@SendHeader^.Client_IP[0]));
CopyIPv4(@getIPv4Config^.Address[0], puint8(@SendHeader^.Client_IP[0]));
CopyIPv4(puint8(@Header^.Server_IP[0]), puint8(@SendHeader^.Server_IP[0]));
processHeader(SendHeader);
{ Setup Options }
SendOptions:= newOptions();
{ Create a message type option and assign it the value REQUEST }
SendMsgType:= ord(TDHCPMessageType.REQUEST);
NewOption(SendOptions, TDHCPOpCode.DHCP_MESSAGE_TYPE, void(@SendMsgType), 1, false);
{ Create a Requested IP option and assign it the value from the OFFER packet header }
NewOption(SendOptions, TDHCPOpCode.REQUESTED_IP_ADDRESS, void(@SendHeader^.Client_IP[0]), 4, false);
NewOption(SendOptions, TDHCPOpCode.REQUESTED_IP_ADDRESS, void(@Header^.Your_IP[0]), 4, false);
{ Create a Server Identifier Option and assign it the value from the OFFER packet options }
Option:= getOptionByOpcode(Options, TDHCPOpCode.SERVER_IDENTIFIER);
if Option <> nil then begin
NewOption(SendOptions, TDHCPOpCode.SERVER_IDENTIFIER, void(@Option^.Value[0]), 4, false);
end;
{ Create a Parameter Request List, Request the following: Netmask, Gateway, DNS Name & DNS Server }
RequestParams[0]:= Ord(TDHCPOpCode.SUBNET_MASK);
RequestParams[1]:= Ord(TDHCPOpCode.ROUTER);
@ -522,9 +526,13 @@ begin
MAC:= getMAC();
packetCtx:= PPacketContext(Kalloc(sizeof(TPacketContext)));
packetCtx^.TTL:= 128;
copyMAC(@BROADCAST_MAC[0], @packetCtx^.MAC.Destination[0]);
{ Copy over MAC - src: broadcast - dst: DHCP Server }
copyMAC(MAC, @packetCtx^.MAC.Source[0]);
copyIPv4(@NULL_IP[0], @packetCtx^.IP.Source[0]);
copyMAC(@BROADCAST_MAC[0], @packetCtx^.MAC.Destination[0]);
{ Copy over IP - src: NULL - dst: Broadcast }
CopyIPv4(@getIPv4Config^.Address[0], @packetCtx^.IP.Source[0]);
copyIPv4(@BROADCAST_IP[0], @packetCtx^.IP.Destination[0]);
{ Setup UDPContext (UDP) & copy in the correct details }
@ -570,7 +578,7 @@ begin
{ Check the frame is for us and then process }
MAC:= getMAC;
if MACEqual(@context^.PacketContext^.MAC.Destination[0], MAC) then begin
if MACEqual(@context^.PacketContext^.MAC.Destination[0], MAC) or MACEqual(@context^.PacketContext^.MAC.Destination[0], BROADCAST_MAC) then begin
Outputln('DHCP','Frame is addressed to us.');
{ Check the message type is client specific }
If Header^.Message_Type = $02 then begin
@ -655,7 +663,7 @@ begin
copyMAC(@BROADCAST_MAC[0], @packetCtx^.MAC.Destination[0]);
MAC:= getMAC;
copyMAC(MAC, @packetCtx^.MAC.Source[0]);
copyIPv4(@NULL_IP[0], @packetCtx^.IP.Source[0]);
CopyIPv4(@getIPv4Config^.Address[0], @packetCtx^.IP.Source[0]);
copyIPv4(@BROADCAST_IP[0], @packetCtx^.IP.Destination[0]);
{ Setup UDPContext (UDP) }

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,7 @@ if ($Command -eq 'up') {
}
Receive-Job $MonitorJob
}
Get-Job | Stop-Job | Remove-Job -Force
} elseif ($Command -eq 'down') {
Write-Output "Stopping $MachineName"
VBoxManage.exe controlvm $MachineName poweroff