Here’s a one-liner in PowerShell to get the total size of all files found with wildcard pattern of *ORIGINAL*. [math]::round((get-childitem -path . -filter "*ORIGINAL*" -file -recurse | measure-object…
Throwing some notes here for me to remember on having PHP not buffer the output of a long running process so that it provides realtime output to the…
The following port scanner C code checks approximately 65535 ports in about 15 seconds on-network. #include <stdio.h> #include <stdlib.h> #include <netinet/in.h> #include <string.h> #include <sys/socket.h> #include <arpa/inet.h> #include…
// gcc bofh.c -o bofh #include <stdio.h> #include <stdlib.h> #include <time.h> #define NUM_QUOTES 10 const char* bofh_quotes[NUM_QUOTES] = { "No, my powers can only be used for good.",…
Looking to capture some performance metrics for website from the Linux command line and eventually get it into Cacti (RRD). Here are my scattered notes on this process.…
The PowerShell script is designed to extract information about Remote Desktop Protocol (RDP) local session manager events from the Windows event logs on a RDS host and save…
Working with some older Cisco ASA devices, I’m trying to access the ASDM interface. The browser isn’t giving me luck, so I turned to PowerShell to help me,…
This PowerShell script retrieves information about enabled Active Directory (AD) users, including their SAM account name, last logon time, and organizational unit (OU). The script makes use of…
I’m working on a side project that is a portscan utility written in VB.net. Here’s my progress so far, and it is working. There’s some way to go…
Handling commandline arguments in VB.NET (or really anything) can be tricky. I came across the following class the other day while looking for a drop-in solution to a…
On my server, I have PHP 5.6 to 8.1 installed and use the versions for various testing purposes. To change the memory_limit across all versions as simply as…
I needed a quick way to check activation status of Windows Servers in a domain. This is the solution I came up with using PowerShell to run the…
To have System.IO.FileSystemWatcher LastAccess work, the system must have access logging enabled with the following command. fsutil behavior set DisableLastAccess 0 After setting this, reboot, and you can…
Over the last few weeks I've been using Python to scrape the Pennsylvania Department of Health's Coronavirus page. Over time the page has evolved and even split into…
I've been trying to learn some Python and have been tinkering with the requests module. Here is how I am able to log into a webpage, such as…