Thursday, March 5, 2015

install jsunpack-n on ubuntu 32/64 bits

0:
apt-get update
apt-get upgrade
apt-get install  build-essential make patch gettext gcc g++ automake autoconf libtool  flex bison libglib2.0-dev libnet1-dev

apt-get install linux-headers-$(uname -r) build-essential make patch gettext gcc g++ automake autoconf libtool  flex bison libglib2.0-dev libnet-dev

1, install js
apt-get  install libmozjs*
ln -s /usr/bin/js24 /usr/bin/js

2, install pynids
apt-get install libpcap-dev pkg-config python-dev libgtk2.0-dev libnet1-dev libnids1.21 libnids-dev
$ sudo ldconfig
wget https://jon.oberheide.org/pynids/downloads/pynids-0.6.1.tar.gz --no-check-certificate

tar zxvf pynids-0.6.1.tar.gz
cd pynids-0.6.1/
python setup.py build
python setup.py install

3, install yara
apt-get install yara
apt-get install python-yara python-magic

4  Build and install BeautifulSoup from ./depends/BeautifulSoup-3.2.0.tar.gz
    (alternatively from the pypi http://pypi.python.org/pypi/BeautifulSoup/3.2.0)

    $ cd depends
    $ tar xvfz BeautifulSoup-3.2.0.tar.gz
    $ cd BeautifulSoup-3.2.0/
    $ python setup.py build
    $ sudo python setup.py install

5 Install pycrypto (for encrypted PDFs) from ./depends/pycrypto-2.4.1.tar.gz
    (alternatively from the pypi http://pypi.python.org/pypi/pycrypto/2.4.1)

    $ cd depends
    $ tar xvfz pycrypto-2.4.1.tar.gz
    $ cd pycrypto-2.4.1
    $ python setup.py build
    $ sudo python setup.py install


2, 
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

Monday, February 23, 2015

update kibana replicas to 0

This kibana 4
Update public/index.js file
line 46098

root@cm-log-manager:/opt/kibana/src# vim ./public/index.js

```
define('components/setup/steps/create_kibana_index',['require','components/setup/_setup_error'],function (require) {
  return function CreateKibanaIndexFn(Private, es, configFile, Notifier) {
    return function createKibanaIndex() {
      var notify = new Notifier({ location: 'Setup: Kibana Index Creation' });
      var complete = notify.lifecycle('kibana index creation');
      var SetupError = Private(require('components/setup/_setup_error'));

      return es.indices.create({
        index: configFile.kibana_index,
        body: {
          settings: {
            number_of_shards : 1,
            number_of_replicas: 0
          }
        }
      })
      .catch(function (err) {
        throw new SetupError('Unable to create Kibana index "<%= configFile.kibana_index %>"', err);
      })
      .then(function () {
        return es.cluster.health({
          waitForStatus: 'yellow',
          index: configFile.kibana_index
        })
        .catch(function (err) {
          throw new SetupError('Waiting for Kibana index "<%= configFile.kibana_index %>" to come online failed', err);
        });
      })
      .then(complete, complete.failure);
    };
  };
});
```

Monday, January 26, 2015

install bd on ubuntu 64

1, download
http://download.bitdefender.com/SMB/Workstation_Security_and_Management/BitDefender_Antivirus_Scanner_for_Unices/Unix/Current/EN_FR_BR_RO/Linux/

wget http://enterprise.bitdefender.com/site/Downloads/dwf/625/

2, install
mv index.html BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.amd64.deb.run

chmod +x BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.amd64.deb.run
./BitDefender-Antivirus-Scanner-7.6-4.linux-gcc4x.amd64.deb.run

3, update sig
 bdscan --update

Install F-Prot in ubuntu 64

dpkg --add-architecture i386
apt-get update
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386



1 dowload
http://files.f-prot.com/files/unix-trial/fp-Linux.x86.32-ws.tar.gz

2, unzip and mv it to /opt

3, cd /opt/f-prot/

  ./install-f-prot.pl

install AVG to ubuntu 64 bits

There are two ways to do it:
A:
1, Download AVG
  wget http://download.avgfree.com/filedir/inst/avg2013flx-r3118-a6926.i386.deb

2, Install 32 lib
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo dpkg -i avg2013flx-r3118-a6926.i386.deb


B:
1, Download AVG
  wget http://download.avgfree.com/filedir/inst/avg2013flx-r3118-a6926.i386.deb
 
2,  Install 32 lib
apt-get install libc6:i386
cd /etc/apt/sources.list.d
echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs
rm /etc/apt/sources.list.d/ia32-libs-raring.list
apt-get update
apt-get install gcc-multilib

3, Install AVG
dpkg -i avg2013flx-r3118-a6926.i386.deb
/opt/avg/av/bin/avgsetup
avgupdate

Tuesday, January 6, 2015

EW:~/code/nutty/chef$ export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
EW:~/code/nutty/chef$
EW:~/code/nutty/chef$
EW:~/code/nutty/chef$
EW:~/code/nutty/chef$ /usr/bin/sqlplus64

SQL*Plus: Release 12.1.0.2.0 Production on Tue Jan 6 15:48:14 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Enter user-name: ^C
chang@ACPNEW:~/code/nutty/chef$ /usr/bin/sqlplus64 meta94@//dev-db.cwxbj.us-west-2.rds.amcom:1521/META

SQL*Plus: Release 12.1.0.2.0 Production on Tue Jan 6 15:48:44 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Release 11.2.0.2.0 - 64bit Production

Sunday, November 9, 2014

linux history with date

1, export HISTTIMEFORMAT='%F %T '

2, history

[ec2-user@ip-10-0-3-22 ~]$ history | grep log | grep rm
  398  2014-11-10 01:16:01  rm python_etl_today_error.log
  426  2014-11-10 01:16:01  rm sqlldr_log_folder
  765  2014-11-10 01:16:01  rm python_etl_dev.log
 1004  2014-11-10 01:25:28  history | grep log | grep rm
 1006  2014-11-10 01:33:03  history | grep log | grep rm