Stop DNS hijacking in windows

- disable DNS hijacking
- change DNS server
- setting up google as DNS server

What is DNS hijacking ?
- DNS redirecting

Why don’t I want it ?
- When I but a url that is not recognized it gets redirected to ads
- It interferes with avahi-daemon (zeroconf)

How do I know its occurring ?
- by typing a non existing url in the browser
- ping a non existing url
- in windows by running nslookup in the command line and seeing a foreign ip address

How to stop it ?
- setting up a specific router (http://hackercodex.com/guide/how-to-stop-isp-dns-server-hijacking/)
- or changing your computer dns server (https://developers.google.com/speed/public-dns/docs/using)

More ?
- in windows command line running ipconfig /all will show what dns server you’re running

tags:
time warner
bright house network

Zend 2 notes

# creating a new module folders
$ mkdir -p Album/{config,src/Album/{Controller,Form,Model},view/album/album}
# using zf.php, http://framework.zend.com/manual/current/en/modules/zendtool.introduction.html
$ vendor/bin/zf.php create module

tags:
zf2

Jquery .on() method not working on dynamic content

A page that executes javascript every time an input field it checked and also load new data thru ajax.

My jquery selector

$(".te_multiselect_checkbox").on("change", function( e ) {} 

was not working on the new content. When I ran $(‘.te_multiselect_checkbox’) in the console before the new content was retrieve I would get http://x-v.it/uploads/capit/ge/n3/8y.jpg but after the new content was loaded I got

http://x-v.it/uploads/capit/4q/7x/s1.jpg
(x.fn.x.init)
I dont know if this happens because the page was architect to do so or javascript is doing it.

What I learned is the selector is not getting the new content change the selector to

$(document.body).on('change', '.te_multiselect_checkbox', function( e ) {}

Here is the explanation:

http://stackoverflow.com/questions/15090942/jquery-on-method-not-working-on-dynamic-content

http://stackoverflow.com/questions/203198/event-binding-on-dynamically-created-elements

tags:
jquery maintain selector when new ajax content
jquery get by class more than 100

Fix VT-x/AMD-V hardware acceleration

Operating System: Windows 7
Motherboard: asus z-97-ar
Intel CPU: Intel Core i7-4790K

Does your CPU support virtualization?

Download software https://www.grc.com/securable.htm

You must enable Virtualization in BIOS
Advvance -> CPU Configurations -> Intel Virtualization Technology -> enable

The reason I had to enable VT-x was because when I “vagrant up” I received this error in Oracle Virtualbox:
“VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.”

So to resolve that I need to enable VT-x and in my Vagrant file add

config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
end

Resources:

http://askubuntu.com/questions/41550/how-do-i-run-a-64-bit-guest-in-virtualbox#answer-41554

tags:
homestead laravel

SSH Private Key conversion

In attempt to login into a ssh server using a private key in phpstorm I ran accross this error.

Keypair ‘private_key.ppk’ is corrupt or has unknown format. Only SSH2 keys in OpenSSH format or PuTTY Private Key *.ppk are supported. Error message: The cipher ‘aes256-cbc’ is required, but it is not available.

This error will not allow the “next” and “test connection” button to appear

The issue here is that the private key format is incorrect. You’ll will need to convert the private key to open ssh format. And the way to do that is

Open your private key in PuTTYGen
Top menu “Conversions”->”Export OpenSSH key”.
Save the new OpenSSH key when prompted.

Laravel Homestead Vagrant windows setup

video notes:
9:35 editing hosts files
6:13 putty ssh to vagrant server

# start vagrant
# inside C:\Users\username\Desktop\vagrant\Code
$ vagrant up

# the url will be http://homestead.app:8000/

# vagrant for public access
# http://stackoverflow.com/questions/18051760/how-to-access-vagrant-box-in-public-network#answer-18068143

config.vm.network :public_network, ip: "192.168.1.21"

# to allow symbolic links, ln -s
# in windows 7 you need to run the terminal as administrator

https://github.com/cityindex-attic/logsearch/issues/7#issuecomment-19054050

Installing Burp Suite

# Using Ubuntu 12.04.4 LTS

$ sudo -su
$ cd /opt
$ mkdir burpsuite
$ cd /opt/burpsuite

# or the current version see http://portswigger.net/burp/download.html
$ wget http://portswigger.net/burp/burpsuite_free_v1.5.jar
$ cd /opt/burpsuite
$ java -jar burpsuite_free_v1.5.jar