Skip to content

Instantly share code, notes, and snippets.

@cyhook
Forked from rickheil/wmic-install
Last active May 3, 2018 17:27
Show Gist options
  • Save cyhook/d5a6acc1c251c9675d0b7b6e10281d8c to your computer and use it in GitHub Desktop.
Save cyhook/d5a6acc1c251c9675d0b7b6e10281d8c to your computer and use it in GitHub Desktop.
installing wmic for linux
#!/bin/bash
# compiles WMIC for linux
apt-get install autoconf
cd /usr/src
wget http://www.openvas.org/download/wmi/wmi-1.3.14.tar.bz2
bzip2 -cd wmi-1.3.14.tar.bz2 | tar xf -
cd wmi-1.3.14/
vim Samba/source/pidl/pidl
:583 (to jump to line 583)
remove the word defined before @$pidl
:wq
export ZENHOME=/usr
make "CPP=gcc -E -ffreestanding"
cp Samba/source/bin/wmic /usr/local/bin
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment