Custom Search

Tag Archives: Programming

IR eye

0
Filed under arduino, electronics, Hardware
Tagged as , , , ,

This project is the first step in my motion tracking. This Eye was built and adapted from an LRM post here .

DSCN0219DSCN0221please dont laugh at my soldering job, its what i can manage with that kind of board, I like the ones that mimic a breadboard setup. With very little trouble i finished soldering in about 2 hours but had to go back a desolder one transistor and replace it and resolder one wire. After that i tested each IR sensor by themselves to make sure they all worked, each one gave a little different reading off the same IR source but that can be fixed with a little calibration in the software. But for now my goal is to hook it up to 2 servos and control the x and y for the motion tracking, eventually i would like to put this into an enclosure that looks like an eye.
This is to make sure all 4 eyes are working
const int sensepin0 = 0;
const int sensepin1 = 1;
const int sensepin2 = 2;
const int sensepin3 = 3;
int sensorValue0 = 0;
int sensorValue1 = 0;
int sensorValue2 = 0;
int sensorValue3 = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
sensorValue0 = analogRead(sensepin0);
sensorValue1 = analogRead(sensepin1);
sensorValue2 = analogRead(sensepin2);
sensorValue3 = analogRead(sensepin3);
Serial.print("sensor = ");
Serial.print(sensorValue0);
Serial.print(" ");
Serial.print(sensorValue1);
Serial.print(" ");
Serial.print(sensorValue2);
Serial.print(" ");
Serial.println(sensorValue3);
delay(10);
}

this will test all 4 sensors and print to the serial port.

also this code is written for the arduino but can be adapted to other microprossecors.

Here is a screenshot of the schematic as well

ScreenshotNext i will mount it to the servo and start writing the logic for 1 of the axis, but my question is how to mount this to a servo with stuff wround the garage. I will answer this question soo.

and this is why you should never place you MC on your keyboard…………..Screenshot-1that large stack to the left is about 30 print screen applications running. I placed my arduino on my print screen button for about 10 secs before I realized what was going on.

Parts:

  • 4x 2n 2222 NPN transistors (generic NPN)
  • 4x 220 Ohm 1/4w resistors
  • 4x NPN photo transistors
  • a bunch of wire
  • Arduino

Hacking the Code

4
Filed under PHP, security, software
Tagged as , , , , , ,

Last Post i was talking about how to clean up a hacked web server, hopeful your server is clean now and you can get back to what you do best. But what was the hacker trying to do? What does that long string mean? I will tell you how to decode the string the safe way, and understand how it was constructed.

The Example that I am going to use is from a real hacked website, the code that I will display is only partial but the construct will be complete. Any identifiable URLs will be changed to prevent identification and your safety.
Lets start by identifying the code, this is what i had found at the very beginning of the page.
<? /**/eval(base64_decode(aWYoZnVuY3Rpb25<–>KTt9fX0=)); ?>

lets start with /**/, it looks innocent but its a way to hide the code, what the code usually used for is large blocks of comments instead of using // on each line you would start it with /* and  end with */ but what i noticed is that in bluefish and notepad++ when these are highlighted the whole line appears to be a comment, my guess is that other code scanners will look like one long comment  on that line and skip it. But this is just my conclusion and testing, very clever way to use comments.

almost forgot the first thing to notice is the use of short tags(<?) that they use, on my personal server I have short tags disabled, I had learned that it should be disabled for security purposes, I don’t know if this holds true today. but the reason they use it is it helps hide it as a comment adding php to   it (<?php),makes it show up as php code not a comment, now its starting to unravel………

evalEvaluate a string as PHP code

very simple right, they need something to run there code, eval does this trick, you can even add html to the string. just another peice of the pie.

base64_decode – it decodes base64 code, now what is base64? It was originally for email to send binary data in emails, and other uses like binary data in urls and other variables but newest use is hiding php code in a long string, the string was 2692 characters long. So what did that string have in it.

Read More »

HalloweenCenter.net project

2
Filed under General
Tagged as , ,

I am Currently working on a Google Maps Integration For another Word Press Blog at Halloweencenter.net and hauntedmaps.com, Its Been a Fun project with some great challenges and a great learning experience,

hopefully it will be completely finished sometime this week with no other issues at hand, but My personal Goal with this project is an easily integrated map with DB support for markers, directions and a unique way of administrating the inputted markers by the users. My idea for this to work is a Unique Link created when the site or marker was put into the DB, after that the person who created the the marker can now go to that link and update certain parts of the entry, like the description and other non critical Data. later this Week I will Post some of the Code and the Basics of how it works, and Hopeful create some reusable Code for your own project.

but for right now i will be concentrating on getting my themes and my other WP content setup so it looks as Good as other WP sites

I have to Give a Shout to Leo, he did give me some great inspiration to start up my own site..