BlockchainSQL 1.0.9
dotnet add package BlockchainSQL --version 1.0.9
NuGet\Install-Package BlockchainSQL -Version 1.0.9
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlockchainSQL" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlockchainSQL" Version="1.0.9" />
<PackageReference Include="BlockchainSQL" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlockchainSQL --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BlockchainSQL, 1.0.9"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlockchainSQL@1.0.9
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlockchainSQL&version=1.0.9
#tool nuget:?package=BlockchainSQL&version=1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BlockchainSQL - Proof of Concept for SQL Injection Detection and Blockchain Logging
This project is a proof of concept demonstrating a library that detects potentially SQL-injected queries in a database and logs them to a blockchain for further analysis and tracking.
Features
- SQL Injection Detection: The library intercepts SQL queries executed against a database and checks for patterns indicative of SQL injection attempts.
- Blockchain Logging: When a suspicious SQL query is detected, the query is logged to a blockchain via a smart contract. This provides a tamper-proof record of suspicious activities.
Installation
You can install the library from NuGet:
dotnet add package BlockchainSQL
Configuration
To use this library, you need to configure the connection to the blockchain and the smart contract that handles the logging of detected queries. The configuration is done via appsettings.json (or another configuration source, depending on your setup).
Example appsettings.json Configuration:
{
"Blockchain": {
"RpcUrl": "https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID",
"ContractAddress": "0xYourContractAddress",
"Abi": "[YOUR_CONTRACT_ABI_JSON]",
"PrivateKey": "0xYourPrivateKey",
"AccountAddress": "0xYourAccountAddress",
"Functions": {
"AddLog": "addLog",
"GetLatestLog": "getLatestLog",
"GetLog": "getLog",
"GetCount": "getCount",
"GetAllLogs": "getAllLogs"
}
}
}
In order to log more info, need to register the middleware
app.UseMiddleware<RequestContextMiddleware>();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.EntityFrameworkCore (>= 8.0.10)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.10)
- Microsoft.Extensions.Options (>= 10.0.0-preview.3.25171.5)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Nethereum.Web3 (>= 4.29.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.