Skip to content

Instantly share code, notes, and snippets.

View YourButterfly's full-sized avatar
🎯
Focusing

pwd YourButterfly

🎯
Focusing
  • <optimized out>
  • <optimized out>
View GitHub Profile
@YourButterfly
YourButterfly / hello gist
Created January 4, 2019 10:30
join in gist
hello gist
@YourButterfly
YourButterfly / CVE-2019-6455.patch
Created January 23, 2019 07:12
CVE-2019-6455.patch
--- recutils-1.8/src/rec-parser.c 2019-01-23 15:05:45.000000000 +0800
+++ ./recutils-1.8.patch/src/rec-parser.c 2019-01-23 15:06:03.000000000 +0800
@@ -1118,6 +1118,8 @@ rec_parse_comment (rec_parser_t parser,
{
/* Out of memory */
parser->error = REC_PARSER_ENOMEM;
+ /* CVE-2019-6455 patch */
+ *comment = NULL;
return false;
}
@YourButterfly
YourButterfly / CVE-2019-6460.not.patch
Created January 23, 2019 08:20
CVE-2019-6460.not.patch
--- ./recutils-1.8/utils/csv2rec.c 2019-01-23 16:06:29.840024748 +0800
+++ ./recutils-1.8.patch/utils/csv2rec.c 2019-01-23 16:07:09.538200790 +0800
@@ -246,7 +246,8 @@ field_cb (void *s, size_t len, void *dat
if (!csv2rec_omit_empty || (strlen(str) > 0))
{
- if (ctx->num_fields > ctx->num_field_names)
+ /* CVE-2019-6460 patch ,not sure, maybe fixed */
+ if (ctx->num_fields >= ctx->num_field_names)
{
@YourButterfly
YourButterfly / dockerfile
Created August 26, 2021 06:56 — forked from MartinSGill/dockerfile
Example Dockerfile for SSH Server on Windows Server Core
FROM microsoft/windowsservercore:1709
# Install Powershell
ADD https://github.com/PowerShell/PowerShell/releases/download/v6.0.0/PowerShell-6.0.0-win-x64.zip c:/powershell.zip
RUN powershell.exe -Command Expand-Archive c:/powershell.zip c:/PS6 ; Remove-Item c:/powershell.zip
RUN C:/PS6/pwsh.EXE -Command C:/PS6/Install-PowerShellRemoting.ps1
# Install SSH
ADD https://github.com/PowerShell/Win32-OpenSSH/releases/download/0.0.24.0/OpenSSH-Win64.zip c:/openssh.zip
RUN c:/PS6/pwsh.exe -Command Expand-Archive c:/openssh.zip c:/ ; Remove-Item c:/openssh.zip