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
import netifaces | |
satInterface = 'ppp0' #finding interface | |
interfaceList = netifaces.interfaces() #create interface list | |
if satInterface in interfaceList: #find interface in list | |
netifaces.ifaddresses(satInterface) #get ip | |
ip = netifaces.ifaddresses(satInterface)[2][0]['addr'] | |
print ip |
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
sudo nmap -sO 192.168.2.* -p22 | |
#it will be shown as ; | |
Nmap scan report for 192.168.2.109 | |
Host is up (0.00076s latency). | |
PROTOCOL STATE SERVICE | |
22 closed xns-idp | |
MAC Address: B8:27:EB:0C:FE:5A (Raspberry Pi Foundation) |
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
/* Simple C program that connects to MySQL Database server | |
* | |
* compile with $(mysql_config --cflags) mysql-c-api.c $(mysql_config --libs) | |
*dependencies: libmysql-dev mysql-client | |
*/ | |
#include <mysql.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> |
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
/* Simple C program that connects to MySQL Database server*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> | |
int main(){ | |
time_t t = time(NULL); |
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
/* | |
* Wiegand API Raspberry Pi | |
* By Kyle Mallory All rights reserved. | |
* 12/01/2013 | |
* Based on previous code by Daniel Smith (www.pagemac.com) and Ben Kent (www.pidoorman.com) | |
* Depends on the wiringPi library by Gordon Henterson: https://projects.drogon.net/raspberry-pi/wiringpi/ | |
* | |
* This is linked with -lpthread -lwiringPi -lrt | |
* | |
* The Wiegand interface has two data lines, DATA0 and DATA1. These lines are normall held |
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
sudo mount /dev/sda6 /mnt | |
sudo mount --bind /dev /mnt/dev && | |
sudo mount --bind /dev/pts /mnt/dev/pts && | |
sudo mount --bind /proc /mnt/proc && | |
sudo mount --bind /sys /mnt/sys | |
sudo chroot /mnt |
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
AddDefaultCharset UTF-8 | |
<VirtualHost *:80> | |
ErrorLog /var/www/test/logs/error.log | |
CustomLog /var/www/test/logs/access.log combined | |
WSGIScriptAlias / /var/www/test/application.wsgi | |
Alias /robots.txt /var/www/test/robots.txt |
NewerOlder