This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.all import * | |
PROBE_REQUEST_TYPE=0 | |
PROBE_REQUEST_SUBTYPE=4 | |
def PacketHandler(pkt): | |
if pkt.haslayer(Dot11): | |
if pkt.type==PROBE_REQUEST_TYPE and pkt.subtype == PROBE_REQUEST_SUBTYPE: # | |
PrintPacket(pkt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn eclipse:eclipse -DdownloadSources -DdownloadJavadocs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download screen if not exist. | |
$sudo apt-get install screen | |
2. Starting a new Screen. | |
$screen bash | |
3. Detached a terminal session. | |
CTRL + A release, and then press D | |
4. List all terminal session | |
$ screen -list | |
5. Reconnect screen | |
$ screen -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Installaing Driver | |
sudo apt-get install alsa-utils | |
#Loading driver module | |
sudo modprobe snd_bcm2835 | |
#Pointing output port to analog output. | |
# sudo amixer cset numid=3 <n> | |
# Where <n> is the required interface : 0=auto, 1=analog, 2=hdmi. To force the Raspberry Pi to use the analog output : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Opening port in Linux | |
iptables -I INPUT 5 -i eth0 -p tcp --dport 8080 -m state --state NEW,ESTABLISHED -j ACCEPT | |
service iptables save | |
service iptables restart | |
iptables --line -vnL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convenient Spring JDBC RowMapper for when you want the flexibility of Jackson's TreeModel API | |
// Note: Jackson can also serialize standard Java Collections (Maps and Lists) to JSON: if you don't need JsonNode, | |
// it's simpler and more portable to have Spring JDBC simply return a Map or List<Map>. | |
package org.springframework.jdbc.core; | |
import java.math.BigDecimal; | |
import java.sql.ResultSet; | |
import java.sql.ResultSetMetaData; | |
import java.sql.SQLException; |