Skip to content

Instantly share code, notes, and snippets.

@NanXiao
NanXiao / macos-openssh-portable.sh
Created November 1, 2021 02:16 — forked from surjikal/macos-openssh-portable.sh
Compile OpenSSH Portable on OSX / MacOS
#!/usr/bin/env bash
brew install openssl
git clone git://anongit.mindrot.org/openssh.git
cd openssh
# ./configure script does not exist, so we have to build it
autoreconf
#define UNW_LOCAL_ONLY
#include <libunwind.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
void
backtrace(void)
{
#!/usr/bin/awk -f
BEGIN {
FS = ",";
}
function update_array(server_name, ticket)
{
if (length(ticket) != 0)
{
#!/usr/bin/awk -f
BEGIN {
FS = ",";
}
function update_array(server_name, ticket, full_array, partial_bytes_array)
{
if (length(ticket) != 0)
{
#!/usr/bin/awk -f
BEGIN {
FS = ",";
}
function update_array(ticket, full_array, partial_bytes_array)
{
if (length(ticket) != 0)
{
#!/usr/bin/awk -f
BEGIN {
FS = ",";
session_id_ticket = 0
}
function update_array(len, array)
{
if (len != 0)
#!/usr/bin/awk -f
function max_value(new_value, old_value)
{
if (new_value > old_value)
{
return new_value;
}
else
{
#!/usr/bin/awk -f
BEGIN {
FS = ",";
records_have_session_id = 0;
session_resumption_use_id = 0;
records_have_session_ticket = 0;
session_resumption_use_ticket = 0;
}
#!/usr/bin/awk -f
function max_value(new_value, old_value)
{
if (new_value > old_value)
{
return new_value;
}
else
{
#!/usr/bin/awk -f
function remove_quotes(s) {
return substr(s, 2, length(s) - 2)
}
BEGIN {FS = ","}
{printf "%s,%s,%s,%s\n", remove_quotes($4), remove_quotes($5), remove_quotes($6), remove_quotes($7)}