Skip to content

Instantly share code, notes, and snippets.

@changux
changux / gist:2321715
Created April 6, 2012 18:07
Check Flashback Trojan
display dialog "Lets go to check two simple values, if the result is not equal to OK, run some antivirus or do your job with the terminal app. Also, check http://goo.gl/3FWfA" with icon stop with title "Simple Flashback Trojan detect tool"
try
set test1 to do shell script "defaults read /Applications/Safari.app/Contents/Info LSEnvironment > /tmp/nada 2>&1; cat /tmp/nada | grep -i not"
set test1 to result
if test1 contains "does not exist" then
display dialog "Step 1: OK" with icon note
do shell script "rm -f /tmp/nada"
else
@changux
changux / gist:2321883
Created April 6, 2012 18:28
VTDecoderXPCService error in OSX
Process: VTDecoderXPCService [38461]
Path: /System/Library/PrivateFrameworks/VideoToolbox.framework/Versions/A/XPCServices/VTDecoderXPCService.xpc/Contents/MacOS/VTDecoderXPCService
Identifier: VTDecoderXPCService
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Date/Time: 2012-03-13 16:19:35.652 -0500
OS Version: Mac OS X 10.7.3 (11D50)
Report Version: 9
@changux
changux / gist:2321971
Created April 6, 2012 18:38
Check Flashback Trojan
display dialog "Lets go to check two simple values, if the result is not equal to OK, run some antivirus or do your job with the terminal app. Also, check http://goo.gl/3FWfA" with icon stop with title "Simple Flashback Trojan detect tool"
try
set test1 to do shell script "defaults read /Applications/Safari.app/Contents/Info LSEnvironment > /tmp/nada 2>&1; cat /tmp/nada | grep -i not"
set test1 to result
if test1 contains "does not exist" then
display dialog "Step 1: OK" with icon note
do shell script "rm -f /tmp/nada"
else
@changux
changux / popular-passwords
Created May 13, 2012 03:32
Popular passwords
@changux
changux / multicastlan.xml
Created August 4, 2012 01:39
SMF to automatic start multicast route
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="multicastlan">
<service name="site/multicastlan" type="service" version="1">
<create_default_instance enabled="false"/>
<single_instance/>
@changux
changux / ncurses-ruby
Created August 31, 2012 14:24
ncurses-ruby compiling error
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -DHAVE_UNISTD_H -DHAVE_LOCALE_H -DHAVE_NCURSES_H -DHAVE_NEWSCR -DHAVE_TABSIZE -DHAVE_ESCDELAY -DHAVE_KEYBOUND -DHAVE_CURSES_VERSION -DHAVE_TIGETSTR -DHAVE_GETWIN -DHAVE_PUTWIN -DHAVE_UNGETMOUSE -DHAVE_MOUSEMASK -DHAVE_WENCLOSE -DHAVE_MOUSEINTERVAL -DHAVE_WMOUSE_TRAFO -DHAVE_MCPRINT -DHAVE_HAS_KEY -DHAVE_DELSCREEN -DHAVE_DEFINE_KEY -DHAVE_KEYOK -DHAVE_RESIZETERM -DHAVE_USE_DEFAULT_COLORS -DHAVE_USE_EXTENDED_NAMES -DHAVE_WRESIZE -DHAVE_ATTR_ON -DHAVE_ATTR_OFF -DHAVE_ATTR_SET -DHAVE_CHGAT -DHAVE_COLOR_SET -DHAVE_FILTER -DHAVE_INTRFLUSH -DHAVE_MVCHGAT -DHAVE_MVHLINE -DHAVE_MVVLINE -DHAVE_MVWCHGAT -DHAVE_MVWHLINE -DHAVE_MVWVLINE -DHAVE_NOQIFLUSH -DHAVE_PUTP -DHAVE_QIFLUSH -DHAVE_SCR_DUMP -DHAVE_SCR_INIT -DHAVE_SCR_RESTORE -DHAVE_SCR_SET -DHAVE_SLK_ATTR_OFF -DHAVE_SLK_ATTR_ON -DHAVE_SLK_ATTR -DHAVE_SLK_ATTR_SET -DHAVE_SLK_COLOR -DHAVE_TIGETFLAG -DHAVE_TIGETNUM -DHAVE_USE_ENV -DHAVE_VIDATTR -DHAVE_VID_ATTR
@changux
changux / ncurses-ruby-ok
Created August 31, 2012 15:53
ncurses-ruby compiling fixed
p@localhost:~/Downloads/ncurses-ruby-1.3.1$ sudo cflags=-DNCURSES_OPAQUE=0 make
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.0 -I. -DHAVE_UNISTD_H -DHAVE_LOCALE_H -DHAVE_NCURSES_H -DHAVE_NEWSCR -DHAVE_TABSIZE -DHAVE_ESCDELAY -DHAVE_KEYBOUND -DHAVE_CURSES_VERSION -DHAVE_TIGETSTR -DHAVE_GETWIN -DHAVE_PUTWIN -DHAVE_UNGETMOUSE -DHAVE_MOUSEMASK -DHAVE_WENCLOSE -DHAVE_MOUSEINTERVAL -DHAVE_WMOUSE_TRAFO -DHAVE_MCPRINT -DHAVE_HAS_KEY -DHAVE_DELSCREEN -DHAVE_DEFINE_KEY -DHAVE_KEYOK -DHAVE_RESIZETERM -DHAVE_USE_DEFAULT_COLORS -DHAVE_USE_EXTENDED_NAMES -DHAVE_WRESIZE -DHAVE_ATTR_ON -DHAVE_ATTR_OFF -DHAVE_ATTR_SET -DHAVE_CHGAT -DHAVE_COLOR_SET -DHAVE_FILTER -DHAVE_INTRFLUSH -DHAVE_MVCHGAT -DHAVE_MVHLINE -DHAVE_MVVLINE -DHAVE_MVWCHGAT -DHAVE_MVWHLINE -DHAVE_MVWVLINE -DHAVE_NOQIFLUSH -DHAVE_PUTP -DHAVE_QIFLUSH -DHAVE_SCR_DUMP -DHAVE_SCR_INIT -DHAVE_SCR_RESTORE -DHAVE_SCR_SET -DHAVE_SLK_ATTR_OFF -DHAVE_SLK_ATTR_ON -DHAVE_SLK_ATTR -DHAVE_SLK_ATTR_SET -DHAVE_SLK_COLOR
@changux
changux / gist:3758462
Created September 20, 2012 21:28
ndp1
# yum groupinstall 'Development Tools'
# yum install libpcap-devel.x86_64 libxml2-devel.x86_64 libxslt-devel.x86_64 mailx.x86_64 httpd.x86_64
@changux
changux / gist:3758468
Created September 20, 2012 21:28
ndp2
# wget -c http://downloads.sourceforge.net/project/ndpmon/ndpmon/ndpmon-2.1/ndpmon_2.1.0.tar.gz
# cd ndpmon_2.1.0/
# autoreconf -vi
# mkdir -p /var/local/lib; mkdir -p /usr/local/etc
# ./configure --prefix=/usr/local --with-var-datadir=/var/local/lib --with-confdir=/usr/local/etc --enable-mac-resolv --enable-webinterface --with-webdir=/var/www/html --enable-syslogfilter --enable-countermeasures
# make && make install
@changux
changux / gist:3758469
Created September 20, 2012 21:29
ndp3
# rm -f /etc/logrotate.d/ndpmon
# rm -f /etc/init.d/ndpmon