Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2ae25af
Compiling payloads and updating scripts
efargas Mar 19, 2026
eaf6fb3
feat: Add a 5-second delay and logging between bootloader segment and…
efargas Mar 19, 2026
6f9a462
refactor: migrate application settings management to a strongly-typed…
efargas Mar 19, 2026
0b87ea4
chore: Configure default .NET solution path in VS Code settings.
efargas Mar 23, 2026
7abff22
Apply suggestions from code review
efargas Mar 23, 2026
06ebe13
Initial plan
Copilot Mar 23, 2026
b4009cb
fix: synchronize WritableOptions.UpdateAsync with SemaphoreSlim and i…
Copilot Mar 23, 2026
3d4c225
Update src/S7Tools/Services/ApplicationSettingsService.cs
efargas Mar 23, 2026
03c713f
Merge pull request #154 from efargas/copilot/sub-pr-153
efargas Mar 23, 2026
49741b1
Initial plan
Copilot Mar 23, 2026
df99636
fix: update tests to use strongly-typed settings API
Copilot Mar 23, 2026
873a395
Merge pull request #155 from efargas/copilot/sub-pr-153
efargas Mar 23, 2026
e77ccb5
Initial plan
Copilot Mar 23, 2026
301a409
fix: apply PR review feedback - async settings, configurable delays, …
Copilot Mar 23, 2026
2003c47
fix: apply second round of PR review feedback - UI thread safety, roo…
Copilot Mar 23, 2026
7ba2fce
Merge pull request #156 from efargas/copilot/sub-pr-153
efargas Mar 23, 2026
cc56ac2
refactor: Consolidate profile editing and unified dialog services int…
efargas Mar 23, 2026
7b3ca37
refactor: Consolidate enhanced bootloader service functionality into …
efargas Mar 23, 2026
8719bf8
feat: Introduce Modbus power supply service and refactor profile, job…
efargas Mar 23, 2026
a92a9b8
feat: Implement settings export/import and refactor UI thread marshal…
efargas Mar 23, 2026
39c6902
Initial plan
Copilot Mar 23, 2026
ddc5f8e
fix: apply review feedback - debounce settings saves, fix MemoryRegio…
Copilot Mar 23, 2026
3ddaf50
fix: unsubscribe SettingsChanged on disposal and remove dead Continue…
Copilot Mar 23, 2026
450b57f
Merge pull request #157 from efargas/copilot/sub-pr-153
efargas Mar 23, 2026
c200811
Initial plan
Copilot Mar 23, 2026
909a942
Fix PlcTransportAdapter: reliable reconnect logic and proper stream c…
Copilot Mar 23, 2026
dd8ea1f
Apply ConnectAsync/DisconnectAsync fixes to DI-registered adapter; re…
Copilot Mar 23, 2026
0f2b18d
Merge pull request #159 from efargas/copilot/sub-pr-158
efargas Mar 23, 2026
2d235bc
feat: Implement comprehensive profile management, task logging, and U…
efargas Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
*.ttf binary
*.eot binary
*.otf binary
*.svg binary
*.svg binary
*.bin binary
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
},
"chat.instructionsFilesLocations": {
".github/instructions": false
}
},
"dotnet.defaultSolution": "src/S7Tools.sln"
}
3 changes: 1 addition & 2 deletions benchmarks/S7Tools.Benchmarks/ProfileCrudBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,8 @@ private class MockPathService : IPathService
public string SerialProfilesPath => Path.Combine(ProfilesDirectory, "Serial", "SerialProfiles.json");
public string SocatProfilesPath => Path.Combine(ProfilesDirectory, "Socat", "SocatProfiles.json");
public string PowerSupplyProfilesPath => Path.Combine(ProfilesDirectory, "PowerSupply", "PowerSupplyProfiles.json");
public string MemoryRegionProfilesPath => Path.Combine(ProfilesDirectory, "MemoryRegions", "MemoryRegionProfiles.json");
public string MemoryRegionProfilesPath => Path.Combine(ProfilesDirectory, "MemoryRegion", "MemoryRegionProfiles.json");
public string PayloadSetProfilesPath => Path.Combine(ProfilesDirectory, "PayloadSets", "PayloadSetProfiles.json");
public string MemoryRegionsDirectory => Path.Combine(ResourcesDirectory, "MemoryRegions");
public string LogsDirectory => Path.Combine(ResourcesDirectory, "Logs");
public string MainLogsDirectory => Path.Combine(LogsDirectory, "Main");
public string ExportedLogsDirectory => Path.Combine(LogsDirectory, "Exported");
Expand Down
8 changes: 8 additions & 0 deletions bootloader-payloads/payloads/lib/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "print.h"
#include "stdlib.h"
#include "read.h"

#define BUF_LEN 16

Expand Down Expand Up @@ -194,6 +195,13 @@ int UART_protocol_send_many(const char *s, unsigned int len) {
unsigned int transfer_size;

while(i<len) {
// Check for cancellation signal from host (0x03)
if (is_data_available()) {
if (read_byte_blocking() == 0x03) {
break;
}
}

if(len-i < CHUNK_SIZE) {
transfer_size = len-i;
} else {
Expand Down
3 changes: 3 additions & 0 deletions bootloader-payloads/payloads/lib/read.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ int UART_protocol_recv_chunk(char *buf, int bufsize);
*/
int UART_protocol_recv(char *buf, int n);

int is_data_available(void);
int read_byte_blocking(void);

#endif
31 changes: 31 additions & 0 deletions bootloader-payloads/payloads_out/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Compiled SiemensS7-Bootloader Payloads

This directory contains the compiled payloads extracted from the Docker build process.

## Payload Descriptions

### dump_mem/

- **dump_mem.bin**: Binary payload for memory dumping

### hello_loop/

- **hello_loop.bin**: Binary payload for hello loop demonstration

### tic_tac_toe/

- **tic_tac_toe.bin**: Binary payload for tic-tac-toe game

### hello_world/

- **hello_world.bin**: Simple hello world binary payload

### stager/

- **stager.bin**: Stager payload binary

## Usage

These compiled payloads can be used with the SiemensS7-Bootloader for exploitation and testing purposes.

Extraction method: Docker volume mount
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added bootloader-payloads/payloads_out/stager/stager.bin
Binary file not shown.
Binary file not shown.
15 changes: 0 additions & 15 deletions patch.diff

This file was deleted.

14 changes: 0 additions & 14 deletions patch2.diff

This file was deleted.

34 changes: 32 additions & 2 deletions src/S7Tools.Core/Constants/ColorPalette.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace S7Tools.Core.Constants;
/// These RGB color values ensure consistent visual feedback across all UI components.
/// Each color is defined with RGB byte values (0-255) for red, green, and blue channels.
/// </remarks>
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

public static class ColorPalette
{
#region Log Level Colors
Expand All @@ -18,8 +18,11 @@ public static class ColorPalette
/// </summary>
public static class Trace
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 128;
/// <summary>Gets the green channel value.</summary>
public const byte G = 128;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 128;
}

Expand All @@ -29,8 +32,11 @@ public static class Trace
/// </summary>
public static class Debug
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 0;
/// <summary>Gets the green channel value.</summary>
public const byte G = 122;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 204;
}

Expand All @@ -40,8 +46,11 @@ public static class Debug
/// </summary>
public static class Information
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 0;
/// <summary>Gets the green channel value.</summary>
public const byte G = 150;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 0;
}

Expand All @@ -51,8 +60,11 @@ public static class Information
/// </summary>
public static class Warning
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 255;
/// <summary>Gets the green channel value.</summary>
public const byte G = 165;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 0;
}

Expand All @@ -62,8 +74,11 @@ public static class Warning
/// </summary>
public static class WarningLight
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 255;
/// <summary>Gets the green channel value.</summary>
public const byte G = 152;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 0;
}

Expand All @@ -73,8 +88,11 @@ public static class WarningLight
/// </summary>
public static class Error
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 220;
/// <summary>Gets the green channel value.</summary>
public const byte G = 20;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 60;
}

Expand All @@ -84,8 +102,11 @@ public static class Error
/// </summary>
public static class ErrorRed
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 211;
/// <summary>Gets the green channel value.</summary>
public const byte G = 47;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 47;
}

Expand All @@ -95,8 +116,11 @@ public static class ErrorRed
/// </summary>
public static class Critical
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 139;
/// <summary>Gets the green channel value.</summary>
public const byte G = 0;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 0;
}

Expand All @@ -106,8 +130,11 @@ public static class Critical
/// </summary>
public static class None
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 64;
/// <summary>Gets the green channel value.</summary>
public const byte G = 64;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 64;
}

Expand All @@ -117,11 +144,14 @@ public static class None
/// </summary>
public static class Default
{
/// <summary>Gets the red channel value.</summary>
public const byte R = 128;
/// <summary>Gets the green channel value.</summary>
public const byte G = 128;
/// <summary>Gets the blue channel value.</summary>
public const byte B = 128;
}

#endregion
}
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

8 changes: 7 additions & 1 deletion src/S7Tools.Core/Constants/ResourcePathConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ public static class ResourcePaths
/// <summary>
/// Folder name for memory region profiles
/// </summary>
public const string MemoryRegionsFolder = "MemoryRegions";
public const string MemoryRegionFolder = "MemoryRegion";

/// <summary>
/// Legacy folder name for memory region profiles used by previous versions.
/// Keep for backward compatibility when probing or migrating existing profiles.
/// </summary>
public const string LegacyMemoryRegionsFolder = "MemoryRegions";

/// <summary>
/// File name for memory region profiles JSON file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using Microsoft.Extensions.Logging;

namespace S7Tools.Core.Logging;
namespace S7Tools.Core.Interfaces.Logging;

/// <summary>
/// Defines a structured logger with enhanced logging capabilities.
Expand Down
Loading