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
# cat strace.log | |
1762 execve("/usr/bin/python3.4", ["python3.4"], [/* 15 vars */]) = 0 | |
1762 brk(0) = 0x110e000 | |
1762 uname({sys="Linux", node="spdibox-3716BBBK0D3E", ...}) = 0 | |
1762 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
1762 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6fcd000 | |
1762 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
1762 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 | |
1762 fstat64(3, {st_mode=S_IFREG|0644, st_size=17658, ...}) = 0 | |
1762 mmap2(NULL, 17658, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb6fc8000 |
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
#!/bin/sh | |
# A simple git pre-commit hook that checks if any public keys in the current directory with extension .pub is secure | |
for i in $(ls pubkeys/*.pub) | |
do | |
# DSA is insecure | |
f=$(ssh-keygen -l -f $i | cut -d "(" -f2 | cut -d ")" -f1) | |
echo "$f" | |
[ "$f" = "DSA" ] && echo "DSA is insecure: $i" && exit 1 | |
#RSA < 2096 bits is not that secure |
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
uint8_t VC0706::_verify(uint8_t cmd) | |
{ | |
if((vcBuff[VC0706_PTL_BYTE] != VC0706_RECV_MARK) || | |
(vcBuff[VC0706_SERIAL_BYTE] != VC0706_SERIAL_NUMBER)){ | |
DBG("return format error\n"); | |
return RESP_DATA_FORMAT_ERROR; | |
} | |
if(vcBuff[VC0706_CMD_BYTE] != cmd){ | |
DBG("return command error\n"); |
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
boolean VC0706::motionDetected(void) | |
{ | |
if (_read(4, 200) != 4) { | |
Serial.println("in read"); | |
return false; | |
} | |
if (!_verify(VC0706_COMM_MOTION_DETECTED)){ | |
Serial.println("in verify"); | |
Serial.println(_verify(VC0706_COMM_MOTION_DETECTED)); |
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
#include "SoftwareSerial.h" | |
#include <VC0706_UART.h> | |
#include <SD.h> | |
#include <SPI.h> | |
#define SS_SD 10 | |
//use software serial | |
SoftwareSerial cameraconnection(2,3);//Rx, Tx | |
VC0706 cam = VC0706(&cameraconnection); | |
//use hardware serial |
NewerOlder