Skip to content

Instantly share code, notes, and snippets.

@rma92
rma92 / readme.md
Last active April 14, 2025 21:51
Setting up Windows 3.1 with Networking using Microsoft Network Client 3.0 on VirtualBox or VMWare

Tracking all the pieces for this were a bit tricky. The Microsoft Network Client uses 16-bit drivers, which are also used by Windows for Workgroups 3.1. (Windows for Workgroups 3.11 is a separate system with 32-bit networking that uses 32-bit drivers).

You need the Microsoft Network Client installer, and the Windows For Workgroups 3.1 drivers, originally called [wfw31.exe]. It can be found here: https://archive.org/details/pcntn3.386. Note that wfw31.exe is a 32-bit Windows self extractor, you can extract it with 7-zip. Put the contents (pcntnd.dos and oemsetup.inf) in C:\drv\amd.

The Microsoft Network Client can be found on the NT 3.51 Server CD (Clients\MSClient\Disks). It can also be found here: https://archive.org/download/MSCLIENT30 (the two executables are DOS self extracting executables, they can go into a directory together).

Base installation

  • Run Setup.exe, in DISK1 on the NT 3.51 CD, or extracted from the downloadable archive. When you get prompted for a network adapter, select unl
@rma92
rma92 / eicar.md
Last active January 16, 2025 00:12
eicar qr code

eicar qr codes

Low ECC: image

####### ### # # # ##   ## #######
#     # ###  ##   ##  #   #     #
# ### # # ##  #  ## ##### # ### #
# ### # ## #  ###### #  # # ### #
@rma92
rma92 / Readme.md
Last active November 29, 2024 16:45
Monitoring Infra: Set up victoria metrics!

I have an OpenBSD 7.0 monitoring server that's been sitting around for years to hold monitoring infra. Let's get it going with VictoriaMetrics. Seems good things come to those who wait, since now VictoriaMetrics is a better option than what was available when the infrastructure was set up in early 2022.

Firewall Config and Install URL (setup)

Set up config for /etc/pf.conf, we will probably need to unblock more for monitoring later.

set skip on lo
block all
#Allow SSH / anti-lockout:
pass in quick proto tcp from any to any port = 22
@rma92
rma92 / readme.md
Last active November 25, 2024 10:45
AD Domain Controller on Alpine Linux 3.20

Setting up a standalone DC on Alpine Linux

  • I used Alpine Linux 3.60
  • the Chrony NTP daemon in the system is sufficient for being a domain controller now.
  • Ideally, the VM should have a static IP accessible to the clients so that it is easy to set the clients to access the domain server running on the VM. This isn't strictly necessary but may cause issues if the IP address changes.
  • Replace SAMDOM and SAMDOM.EXAMPLE.COM with the names of your domain and realm.

Optional: Setup doas and add a local user so we can SSH in more easily

apk add doas
adduser user wheel
@rma92
rma92 / web1.c
Created November 20, 2024 17:30
Small webservers in C for Windows that can compile with Tiny C Compiler.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winsock2.h>
#include <ws2tcpip.h>
//#pragma comment(lib, "Ws2_32.lib")
//\local\tcc32\tcc.exe -impdef %SYSTEMROOT%\system32\ws2_32.dll
//\local\tcc32\tcc.exe web1.c ws2_32.def
@rma92
rma92 / readme-cloudinit.md
Last active November 16, 2024 17:41
Fast RDP server on Alpine Linux on Vultr

The following cloud-init user data can be used to set up a system with RDP, and a user, and a password:

#!/bin/sh
adduser --gecos "" --disabled-password user
adduser user wheel
echo user:thelongchickenpassword | chpasswd
setup-desktop xfce
apk add xrdp xorgxrdp doas ublock-origin
rc-update add xrdp
rc-update add xrdp-sesman
@rma92
rma92 / twilio-forwarder.md
Last active October 24, 2024 14:09
Twilio: Set up international forwarding number

Twilio: Set up international forwarding number

I have multiple mobile numbers, and customers in various countries. I setup Twilio numbers in the various countries to allow customers to reach me using a local call, and change the forwarding number to whatever my local mobile number is.

Set up a service for call forwarding

The call forwarding service created here will be used by any number that needs to forward to my actual mobile number. As I travel, I change the forwarding number to whatever mobile number I'm using in that location.

  • On the left pane, go to Functions and Assets > Services. Click Create Service, enter a name.
    • If "Functions and Assets" is not visible, go to Explore Products, it's under Developer Tools.
  • Click Create Service, enter a name (I used "forward-call").
  • Create a function named forward call. Put this code in:
@rma92
rma92 / setup-wds-environment.md
Last active October 24, 2024 10:17
Set up AD + WDS + iPXE (2Pint signed)

Setting up a test deployment environment in VMWare Workstation

  • Turn off DHCP on the host-only network adapter in Virtual Network Editor. It uses 192.168.254.0/24, but you can use whatever IP or network you prefer.

Create a Windows Server VM to run a domain controller, DHCP, and WDS.

  • Create a VM using mostly normal settings. Make the main network adapter have NAT or however you connect VMs to the internet, and then add a second network adapter on the host-only network.
  • Set the NIC on the host only network to a static IP (no gateway, we will use the DC for routing. Don't do this in prod):
netsh int ip set address ethernet0 192.168.254.254 255.255.255.0

Install roles and DC

@rma92
rma92 / ad_nodes.md
Last active October 22, 2024 18:01
Active Directory Notes

GUI - Find an object location in search results / dsa.msc

  • In the search window, choose "View" > "Choose Columns..."
  • Select "Published At" from "Columns avaialble", and choose "Add >>". Click "OK".
  • You may need to expand the column.

You can also find an object's location in the properties window on the "Object" tab as the "Canonical name of object."

PowerShell - Install Domain Controller

Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName "Domain1.local.arpa" -DomainNetbiosName "Domain1" -SafeModeAdministratorPassword (ConvertTo-SecureString -AsPlainText "Password1" -Force) -InstallDNS
@rma92
rma92 / readme.md
Last active March 27, 2024 05:07
Videos for Legacy Computers

Download from youtube

yt-dlp <url> --check-all-formats

Make raw avi to convert for Video for Windows:

ffmpeg -i "Skibidi Toilet Full Song Music Video [6dMjCa0nqK0].webm" -vf "scale=320:240" -c:v rawvideo -c:a pcm_s16le skibidi_320_raw.avi

Make raw quicktime to convert with Quicktime Pro: