When I came to Unix my programming ability was ahead of my ability to appreciate the existing tools and libraries.
I wrote many a naive replacement for existing stuff, usually crippled versions.
This script keeps the amount of /dev/ada* devices on a computer visible from far away,
#!/usr/local/bin/bash
while [ : ]
do
clear
(ls /dev/ada? /dev/ada?? 2>/dev/null | sort -V ) | while read l
do
echo "$l"
done
figlet "$(ls...
Some details - HPFS is not NTFS, no OS/2 or win32 Windows have NTFS root support.
The Jan 1998 dating of the laptop aligns with 4GB HDD size, but it is a possibility Windows 2000 or NT4 have been installed at some point.
balanga as far as I can...
Consider a job step that created a file for a subsequent step or a step that deleted a file when the previous step returned a non-zero return code. The step still had to run a program in order to let the system handle file disposition in those...
Gasp.
That's precisely it. There's lots of beautiful hiking and trails in the US, and it's super nice - but also different in nature (from what I gather from pictures).
It's been a while ago, and I don't quite remember the details anymore. But I've also had a few issues when using the RC structure for "firewall control".
pf_reload()
{
echo "Reloading pf rules."
pf_resync
}
pf_resync()
{...
First... to my defense (well, sorta... :-/) this happened in the weekend and I had a few drinks? (uh oh....).
So... PostgreSQL isn't just a database server to me, it's a way of life when it comes to storing/processing (bulk?) data from the...
service pf reload /var/log/ddosip.log 2>&;1 | tee -a /var/log/ddosip.log
Can you check by changing this command to another, without reloading all rules with
pfctl -t ddos -T replace -f /usr/local/etc/pf.ddos.list
or with flushing table before...
Yes i could try that in a script instead.
I tried them manually as a quick test right now, this is what I got:
# pfctl -t ddos -T replace -f /usr/local/etc/pf.ddos.list
3 addresses added.
# pfctl -t ddos -T flush
756328 addresses deleted.
#...
To contrast with the Useful scripts thread, this is for sharing your most pointless stuff.
I'll start:
This C program literally just allocates exactly 128 bytes of memory to write a random value to it. It then proceeds to only print where the...
Does anyone use Ventoy's special boot menu?
In case you don't know you can set up your own boot menu which comes up first if you have one. You can access it using F6:ExMenu.
I use it extensively for booting various versions of FreeBSD and Linux...
Did you know you can use the "prtscr" (Print Screen) key on your keyboard to cycle through the virtual terminals on the console? Does that work? It's a weird situation you have, makes very little sense. Things might have gotten messed up right...
I once had a pice of customer hardware. When I would switch on the light (neon tubes), the display would be garbled. Totally snowstorm with confetti. Lights out, lights on again - switched to clear display. Toggle lights again, display goes...
Not supported here.
https://forums.freebsd.org/threads/ghostbsd-pfsense-truenas-and-all-other-freebsd-derivatives.7290/
Unused memory is useless. So you're going to find all your memory being used after a while. Mostly caches (process cache...
https://yumiusb.com/
I'll leave it here, maybe you can use it.
I remember using it a long time ago.
And it's like Hiren's BOOT CD, only you can add what you need.
It uses the syslinux loader or grub2.
Something like this...
I haven't done this in a long time
1. Mount ISO
# mdconfig -a -t vnode -f /home/user/my.iso -u 0
# mount -t cd9660 /dev/md0 /mnt
2. Copy ISO files and modify
# mkdir /tmp/my_new_iso
# cp -R /mnt/* /tmp/my_new_iso/
#...
Something like this...
I haven't done this in a long time
1. Mount ISO
# mdconfig -a -t vnode -f /home/user/my.iso -u 0
# mount -t cd9660 /dev/md0 /mnt
2. Copy ISO files and modify
# mkdir /tmp/my_new_iso
# cp -R /mnt/* /tmp/my_new_iso/
#...
Is there any way to make an mdconfig backed file R/W?
I have mounted an ISO file using '-t 9660' and would like to be able to change it.
Is that possible?
Quite possibly, NTFS, HPFS and exFAT all share the same ID, and it's a pretty safe bet that this isn't an exFAT disk.
If it were me personally, I'd image the entire disk, or at least all of the partitions and mount those. It's a fairly small...
And this is the script running every 15 minutes via crontab:
#!/bin/sh
now=$(date)
echo -e "$now - Adding DDoS addresses to PF table..." >> /var/log/ddosip.log
awk '$11 == "404" && index($9, "/attacked-url-1") {print $1}'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.