- Open a webpage that uses the CA with Firefox
- Click the lock-icon in the addressbar -> show information -> show certificate
- the certificate viewer will open
- click details and choose the certificate of the certificate-chain, you want to import to CentOS
- click "Export..." and save it as .crt file
- Copy the .crt file to
/etc/pki/ca-trust/source/anchors
on your CentOS machine - run
update-ca-trust extract
- test it with
wget https://thewebsite.org
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
#Requires -RunAsAdministrator | |
#Requires -Version 5.0 | |
# requires Windows 10 | |
Get-EtwTraceProvider | Select-Object SessionName, Guid | sort SessionName | |
# as Markdown | |
<# | |
#Requires -RunAsAdministrator | |
$result = Get-EtwTraceProvider | sort SessionName | |
$result | %{"|Name|GUID|";"|----|----|";}{"|$($_.SessionName)|$($_.Guid)|"} | |
#> |
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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$wc = New-Object System.Net.WebClient | |
if (!(Test-Path "C:\Tools")) { | |
New-Item -Path "C:\" -Name "Tools" -ItemType "directory" | |
} | |
# SYSMON | |
# Download Sysmon | |
$SysmonDirectory = "C:\Tools\Sysmon\" |
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
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>VM Web Console</title> | |
<!-- common js/css lib --> | |
<link href="css/wmks-all.css" rel="stylesheet" type="text/css" /> | |
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css" /> | |
<script src="lib/jquery-1.8.3.min.js"></script> | |
<script src="lib/jquery-ui-1.8.16.min.js"></script> |
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
package main | |
import ( | |
"log" | |
// replace right path | |
"[...]/utils" | |
"go.uber.org/zap" | |
"go.uber.org/zap/zapcore" | |
) |
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
//extension method make a database call by providing a function pointer to Task<T> and passing in a method parameter | |
public static async Task<T> DatabaseCall<T>(this IDatabase cache, string key, Func<string, Task<T>> databaseCall, string methodParameter, TimeSpan timeSpan, bool invalidate, bool useCache) | |
{ | |
T returnValue; | |
var cachedItem = default(T); | |
try | |
{ | |
cachedItem = await cache.GetAsync<T>(key); | |
} | |
catch (RedisConnectionException ex) |
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
HttpContext.Current = new HttpContext( | |
new HttpRequest("", "http://tempuri.org", ""), new HttpResponse(new StringWriter())); | |
NameValueCollection headers = HttpContext.Current.Request.Headers; | |
Type t = headers.GetType(); | |
const BindingFlags nonPublicInstanceMethod = BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance; | |
t.InvokeMember("MakeReadWrite", nonPublicInstanceMethod, null, headers, null); | |
t.InvokeMember("InvalidateCachedArrays", nonPublicInstanceMethod, null, headers, null); |