BE CAREFUL! THIS SCRIPT IS INVOKED FROM A SETUID ROOT BINARY

#!/bin/bash # BE CAREFUL! THIS SCRIPT IS INVOKED FROM A SETUID ROOT BINARY # function printhelp () { echo “Usage: sys_uname [-h] [OPTION] [ — mod_path … ]” echo “Prints kernel version string for modules” echo echo ” -h Print this help” echo ” -f Choose closest kernel” echo ” -l List available kernels” echoContinue reading “BE CAREFUL! THIS SCRIPT IS INVOKED FROM A SETUID ROOT BINARY”

Perl Script

#!/usr/bin/perl -w # A simple perl script to extract the version number from include/version. #$a=cat include/version.h; #$c=cat patchlevel.h; $a = cat $ARGV[0]; if( $#ARGV == 1 ) { $c = cat $ARGV[1]; } @A = $a =~ /#define[\t ][\t ]MAJOR_VERSION[\t ][\t ](\w)/g; @B = $a =~ /#define[\t ][\t ]MINOR_VERSION[\t ][\t ](\w)/g; if( $#ARGV == 1Continue reading “Perl Script”

kver_approx.c

/* * Creation Date: <2001/08/06 00:27:12 michael> * Time-stamp: <2002/07/02 19:04:26 michael> * * <kver_approx.c> * * * * Copyright (C) 2001, 2002 Michael Jones (michaeldevonjones@gmail.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by theContinue reading “kver_approx.c”

CMDos

Dim FSO, shell, xslProcessor Sub RunCmd(CommandString, OutputFile) cmd = “cmd /c ” + CommandString + ” >> ” + OutputFile shell.Run cmd, 0, True End Sub Sub GetOSInfo(outputFileName) On Error Resume Next strComputer = “.” HKEY_LOCAL_MACHINE = &H80000002 Dim objReg, outputFile Dim buildDetailNames, buildDetailRegValNames buildDetailNames = Array(“Product Name”, “Version”, “Build Lab”, “Type”) buildDetailRegValNames = Array(“ProductName”,Continue reading “CMDos”