Category Archives: Perl

IT Security Brothers (http://itsb.pro)

Hi guys, I would like to present you our new project IT Security Brothers http://itsb.pro
We provide pentest, consultations and IT outsourcing services.
Feel free to hire us for IT jobs.

Dmesg with human-readable timestamp

Default dmesg timestamp format:
[ 680.870878] r8169 0000:02:00.0: em1: link up
[ 680.870889] IPv6: ADDRCONF (NETDEV_CHANGE): em1: link becomes ready
[ 695.002667] tun: Universal TUN/TAP device driver, 1.6

On some systems dmesg has option -T
for example fedora 17:
[Вт. дек. 11 11:52:14 2012] r8169 0000:02:00.0: em1: link up
[Вт. дек. 11 11:52:14 2012] IPv6: ADDRCONF (NETDEV_CHANGE): em1: link becomes ready
[Вт. дек. 11 11:52:29 2012] tun: Universal TUN/TAP device driver, 1.6

for other situations there are scripts on perl and python:
solutions on the perl:
Continue reading Dmesg with human-readable timestamp

Home automation

Home automation.

Accumulated some information from internet circuitry, controllers, various examples. As a confirmation of my small developing the project, decided to write an article ...
So we have: router dir-320 (with dd-wrt, the installation process described in the previous article about dir-320 + C), the controller ATmega8535, a small control circuit for optodriver, object management (reading lamps, power audio, home water heater), a little wires soldering iron, FREE  time.
What I would like to receive: software power management objects that feed from ~ 220 V.
Proper management of the facility as follows:
Mobile phone-> mobile browser-> wifi (mobile) -> wifi (router dir-320) -> set lightpd-> handler to perl-> uart (router) -> uart (controller mega8535) -> control signal (+5 controller) -> control signal (+5 optodrayvera) -> control signal (~ 220 optodriver) -> object management.
In this scheme can be replaced with «Mobile phone-> mobile browser-> wifi (mobile) ->» on a laptop, work PC and TP.
Also has the ability to manage through the wan port connected to the Inet Network, again by reference to lightpd.
What + this scheme:
  • No need to get out of bed for the inclusion of blackouts, TC management with a laptop or a mobile.
  • There is a possibility to saving by switch off / on the water heater, even if you're not at home — through the Net.
  • Integrated on / off devices (coming to the house, you can pre-enable such light wherever necessary. Including teapot before joining)
  • Often forget to disconnect the device from the network before leaving. This is possible at any time.
What — this scheme:
  • Maybe not quite convenient to get or keep a hand every once in a mobile phone for on/off light. But this is  solved by parallel turning optodriver with switch light.But, again, will not turn off remotely if it enabled.
  • Each device is an additional wire and a device for optodraiver. The wires need to get by secured to the wall or hide in the wall, which entails a change of wallpaper ))))) Optodriver also need to get by hiding in the socket, God forbid, if there is enough room)
  • Exception when MOBILE, laptop does not turn on the computer broke. Solved only parallel connection of a physical means of control.

Continue reading Home automation