chit chat

———–

One thing I like about linux iws that should say something like the video driver foobard, you do not have to reinsall the whole operating system. You just resovle the issue from the command line.  No reinstallation from scratch.

Need to do some editing still of this article.

—————————————————————–

Simple bash scripts for NFL football.

————————————————
nfl data for phase = 2 week = 14 season = 2013
————————————————

Home           Score              Away

Thursday, December 5
Houston 20 – 27 Jacksonville Final
Sunday, December 8
Minnesota 26 – 29 Baltimore Final
Kansas City 45 – 10 Washington Final
Buffalo 6 – 27 Tampa Bay Final
Miami 34 – 28 Pittsburgh Final
Detroit 20 – 34 Philadelphia Final
Oakland 27 – 37 NY Jets Final
Cleveland 26 – 27 New England Final
Atlanta 21 – 22 Green Bay Final
Indianapolis 28 – 42 Cincinnati Final
Tennessee 28 – 51 Denver Final
Seattle 17 – 19 San Francisco Final
NY Giants 14 – 37 San Diego Final
St. Louis 10 – 30 Arizona Final
Carolina 13 – 31 New Orleans Final
Monday, December 9
Dallas 28 – 45 Chicago Final

———————————————

Script 1:

####################################
# Score  Grabber
#
#===============================
# Assignments
# ——————————–
datafile=”nflscorefile”
a=1
flag=0
week=14
# phase 1 is preseason phase 2 is regular season phase 3 is
phase=2
season=2013
#finished week = 1 unfinished week = 0
weekfinished=1
league=”nfl”
# end assignments
#=================================
#
# Get data file
#———————————
case $weekfinished in
1)
elinks “http://sports.yahoo.com/$league/scoreboard/?week=$week&phase=$phase&season=$season”  > $datafile
;;
0)
elinks “http://sports.yahoo.com/$league/scoreboard/”  > $datafile
;;
*)
#
;;
esac
#=================================
#
# Extract and display data
#———————————
while read line
do fdata[$a]=$line
echo $line | grep -q “Home Score Away”
if  [ $? -eq 0 ]; then
# header
clear
echo
echo ————————————————
echo  $league  data for phase = $phase  week = $week  season = $season
echo ————————————————
echo
echo ”       Home           Score              Away”
echo “”
let “flag = 1”
fi
if [ $flag -eq 1 ]; then
echo $line | grep -q “Latest NFL Videos”
if [ $? -eq 0 ]; then
let “flag = 0”
else
echo $line | grep -q “Home Score Away”
if  [ $? -ne 0 ]; then
case $weekfinished in
1)
echo $line | sed ‘s/\[.*\]//’
;;
0)
echo $line
;;
*)
#
;;
esac
fi
fi
fi
let “a += 1″
done < $datafile
# footer
echo ———————————————
echo
#===============================
# End.
####################################

————————————————
NFL schedule for week: 15 of season = 2013
————————————————

Week 15

Thursday, Dec. 12

San Diego Chargers at Denver Broncos, 8:25

Sunday, Dec. 15

Washington Redskins at Atlanta Falcons, 1

Chicago Bears at Cleveland Browns, 1

Houston Texans at Indianapolis Colts, 1

Buffalo Bills at Jacksonville Jaguars, 1

New England Patriots at Miami Dolphins, 1

Philadelphia Eagles at Minnesota Vikings, 1

Seattle Seahawks at New York Giants, 1

New Orleans Saints at St. Louis Rams, 1

San Francisco 49ers at Tampa Bay Buccaneers, 1

Arizona Cardinals at Tennessee Titans, 1

New York Jets at Carolina Panthers, 4:05

Kansas City Chiefs at Oakland Raiders, 4:05

Green Bay Packers at Dallas Cowboys, 4:25

Cincinnati Bengals at Pittsburgh Steelers , 8:30*

Monday, Dec. 16

Baltimore Ravens at Detroit Lions, 8:40

———————————————

Script 2

####################################
# Nfl schedule  Grabber
#
#===============================
# Assignments
# ——————————–
datafile=”nflscorefile”
a=1
flag=0
week=15
# phase 1 is preseason phase 2 is regular season phase 3 is
phase=2
season=2013
# end assignments
#=================================
#
# Get data file
#———————————
elinks http://www.usatoday.com/story/sports/nfl/2013/04/18/week-by-week-2013-nfl-schedule/2093613/ > $datafile
#=================================
#
# Extract and display data
#———————————
while read line
do fdata[$a]=$line
echo $line | grep -q “Week $week”
if  [ $? -eq 0 ]; then
# header
clear
echo
echo ————————————————
echo  NFL schedule for week: $week of season = $season
echo ————————————————
echo
let “flag = 1”
fi
let nextweek=$week+1
echo $line | grep -q “Week $nextweek”
if [ $? -eq 0 ]; then
let “flag = 0”
else
if [ $flag -eq  1 ] ;  then
echo $line
fi
fi
let “a += 1”
done < $datafile
# footer
echo ———————————————
echo
#===================================
# End.
####################################

——————————————————————————

Couple of dumb scripts  using Hak5.

Script 1

################################################################
#   New hak5 episode?
#
file1=hak5episodes
file2=hak5episodesold
cp $file1 $file2
elinks “revision3.com/hak5/episodes”  > $file1
# diff_file=diffed
# diff  $file1 $file2 | grep “<” | sed ‘s/^<//g’ > $diff_file
# cat diff_file
I=`wc -c $file1 | cut -d’ ‘ -f1`
J=`wc -c $file2 | cut -d’ ‘ -f1`
if [ $I -ne $J ]
then
echo new episode
echo new episode at $date > hak5lastupdate
else
echo no new episode
fi

————————————————
Hak5 episodes
————————————————

All Episodes

* Point to Point Pineapple mesh continued. Decibels to Watts,
antenna polarization, “cable loss” and why HAMS get all the good…

Point to Point Pineapple Mesh Continued and Syncing with
GoodSync

* Learn the ins and outs of EIRP, 2.4 GHz and the legal way to
balance radio output with antenna gain. This episode is…

Legally build a 60 Watt WiFi Link – 2.4 GHz and EIRP

* This week we go behind the scenes at the  Studio during our
recent studio upgrades. Also Shannon explores some of the…

Upgrading the Studio and Chromecast Tricks

* This week Darren interviews Craig Heffner on his research in to
backdoors on routers. Also find Shannon dices into Seafile…

Discovering Hidden Backdoors In Home Routers And Storing Data With
Seafile

* Darren meets Paul McMillan to see the whole internets VNC servers
in 16 minutes. Also find new was to connect to your phone…

Hidden Device Inputs Revealed!

* Wireless Packet Sniffing!!! Tracking vehicle Tire Pressure Sensor
data with Jared Boone and open source software defined…

Tracking Cars Wirelessly And Intercepting Femtocell Traffic

* Exploring the software development for the castAR with Rick
Johnson. Also seeing the hardware side of castAR with Jeri…

Creating Virtual Worlds With castAR

* The new WiFi Pineapple Mark V is unveiled at this special
launch event featuring Darren, Sebastian, Eighty of Dual…

The New WiFi Pineapple Mark V

* Session Hijacking with Raphael Mudge of Armitage, Disk Forensic
from Raspberry Pi and Custom Hacker Linux Distros from…

Derbycon 2013 Continues and Enterprise Cloud Syncing

* This time on , Darren speaks with RenderMan at Derbycon 2013
on vulnerabilities in the nextgen Air Traffic Control…

Secure Messaging and Air Traffic Control Hacking

* Syncing files with BitTorrent Sync and alternative ways to Sneaker
Net files using optics and audio! All that and more, this…

Alternative Sneaker Nets and BitTorrent Syncing

* Cheap Kali Linux Laptop with a Raspberry Pi, a Lapdock and Custom
Cables – Shannon Morse reports. Then, Persistently…

Kali Linux Raspberry Pi Laptop and Hijack Windows Password

* The latest NSA leaks outline a massive program against internet
encryption. What is safe anymore? Can you trust PGP? How do…

Setup Your Own Private Cloud and Air Gaps

* Cracking Windows passwords in 15 seconds or less with a special
USB Rubber Ducky firmware and mimikatz. Build your own…

Install OwnCloud and Cracking Passwords with a Rubber Ducky

* Windows exfiltration with a USB thumb drive and a USB Rubber
Ducky and Benchmarking Your Linux Systems. All that and more…

How to Benchmark Your Linux System And Exfiltration Ducky
Attacks

* Running the occasional Windows program with out cramping your
Linux lifestyle, Windows exfiltration with the USB Rubber…

What’s Up with the Duck?

————————————-

Script 2:

####################################
# Latest Hak5 episodes
#
#===============================
# Assignments
# ——————————–
datafile=”hak5episodes”
a=1
flag=0
# end assignments
#=================================
#
# Get data file
#———————————
elinks “revision3.com/hak5/episodes”  > $datafile
#=================================
#
# Extract and display data
#———————————
while read line
do fdata[$a]=$line
echo $line | grep -q “All Episodes”
if  [ $? -eq 0 ]; then
# header
clear
echo
echo ————————————————
echo  Hak5 episodes
echo ————————————————
echo “”
let “flag = 1”
fi
echo $line | grep -q “Load More”
if [ $? -eq 0 ]; then
let “flag = 0”
else
if [ $flag -eq  1 ] ;  then
echo $line | sed ‘s/\[.*\]//’ | sed ‘s/\Hak5//’
fi
fi
let “a += 1”
done < $datafile
# footer
echo ———————————————
echo
#===================================
# End.
####################################

—————————————————————–

Yet another music server.

Picture of Yet another music server.
Screenshot from 2013-12-08 15:29:59.png
Screenshot from 2013-12-08 15:33:39.png
Screenshot from 2013-12-08 15:50:30.png

Love MPD. It is both a music player and an internet radio player. You can install this on a really old machine or a new arm based linux device. Just add an amp and  speakers and you have a new age stereo that can be controlled remotely..
Make your directories where you want your music to be and then copy them there if they are not already there. Now to inbstall the basic software. You have the program itself (mpd)and a command line player to test it.(mpc)

$sudo apt-get install mpd mpc.

Sure sure your stero and or speakers are attached to the sound card and they work. Now to test it. We will do it with a radio station if you do not have any music to t4est with.

$ mpc add http://relay3.slayradio.org:8000/
adding: http://relay3.slayradio.org:8000/

$ mpc play
You should hear the radio station out of your speakers now.

Now let’s edit the config file for file location and to allow the server to be accesed from other systems. Warning this is not secure, as your better off sshing into the machine to control it.

$ sudo vim /etc/mpd.con
Change the directory where you files are (uncomment  the line also
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon’s online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
# music_directory               “/var/lib/mpd/music”

If you want to access the machine remotely you will need to change the hostname to the nmae of the michine, Warning: people will be albe to telnet into the machine unless you password protect the system.
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon. Choose any if you want
# to have mpd listen on every address
#
# For network
# bind_to_address               “localhost”

Permissions:

# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#
#password                        “password@read,add,control,admin”
#
# This setting specifies the permissions a user has who has not yet logged in.
#
#default_permissions             “read,add,control,admin”
#
###############################################################################

There are other settings, but I will let you check that out your selves..

NOw to access the system form other machines. There is a client for about every system known to man. You can check them out yourself at:

Screenshot from 2013-12-08 16:25:45.png

http://mpd.wikia.com/wiki/Clients

To ad a radio station, you most likely yhave to an a url.

—————————————————————–

Picture of Firefly

$ sudo apt-get install forked-daapd

Installation instructions for forked-daapd
------------------------------------------

There are two ways to install forked-daapd: from a tarball or from the git
tree. The tarball contains a working build system and pre-generated ANTLR3
parsers; the git tree doesn't and requires more tools to generate the build
system and the ANTLR3 parsers.

In both cases the installation procedure is the traditional ./configure;
make; make install. Please read this file carefully before proceeding.

System-specific requirements:
 - Linux:
   + glibc 2.13+ (bugfix: process-wide setgroups(), glibc BZ#10563)
   + libasound (ALSA sound support - or you can use OSS4)
 - FreeBSD:
   + OSS4 sound support
   + libiconv

Tools:
 - The clang C compiler from the LLVM project. forked-daapd uses Blocks,
   an extension to the C language that is not supported by gcc. Along with
   clang, you'll also need the Blocks runtime, libblocksruntime.

 - pkg-config
 - gperf 3.x
        from <http://www.gnu.org/software/gperf/>

Libraries:
 - libantlr3c (ANTLR3 C runtime, version 3.2 for tarball builds)
        from <http://www.antlr.org/download/C>
 - Avahi client libraries (avahi-client), 0.6.24 minimum
        from <http://avahi.org/>
 - sqlite3 3.5.0+ with unlock notify API enabled (read below)
        from <http://sqlite.org/download.html>
 - libav 0.6+/0.7+ (or ffmpeg 0.5.1+)
        from <http://libav.org/releases/>
 - libconfuse
        from <http://www.nongnu.org/confuse/>
 - libdispatch
        /!\ Read below
 - libtre
        from <http://laurikari.net/tre/download/>
 - libavl
        /!\ Read below
 - MiniXML (aka mxml or libmxml)
        from <http://minixml.org/software.php>
 - gcrypt 1.2.0+
        from <http://gnupg.org/download/index.en.html#libgcrypt>
 - zlib
        from <http://zlib.net/>
 - libunistring 0.9.3+
        from <http://www.gnu.org/software/libunistring/#downloading>
 - libflac (optional - FLAC support)
        from <http://flac.sourceforge.net/download.html>
 - taglib (optional - Musepack support)
        from <http://developer.kde.org/~wheeler/taglib.html>
 - libplist 0.16+ (optional - iTunes XML support)
        from <http://github.com/JonathanBeck/libplist/downloads>

If using binary packages, remember that you need the development packages to
build forked-daapd (usually named -dev or -devel).

libdispatch for Linux and its dependencies can be found in the Debian archive;
you need at least libdispatch from SVN rev 197 + Debian patches (Linux support),
libkqueue 0.9.2 and libpthread_workqueue 0.7. At this time, it's probably
easiest to use whatever versions happen to be in Debian unstable.

libavl is not the GNU libavl. There doesn't seem to be an upstream website
anymore, but you'll find the source tarball alongside the forked-daapd
release tarballs (see below for the URL). Alternatively, you can fetch it from
any Debian mirror, too (it'll be in /debian/pool/main/liba/libavl).

sqlite3 needs to be built with support for the unlock notify API; this isn't
always the case in binary packages, so you may need to rebuild sqlite3 to
enable the unlock notify API (you can check for the presence of the
sqlite3_unlock_notify symbol in the sqlite3 library). Refer to the sqlite3
documentation, look for SQLITE_ENABLE_UNLOCK_NOTIFY.

Note about libav (ffmpeg)
-------------------------

libav (ffmpeg) is a central piece of forked-daapd and most other FLOSS
multimedia applications. The version of libav you use will potentially have a
great influence on your experience with forked-daapd.

The following versions of libav (ffmpeg) are supported and known to work:
 - ffmpeg 0.5.x: has issues with metadata (tags) extraction, notably with
   MP3 files and ID3 tags in general;
 - libav 0.6.x: known to work better with regard to metadata extraction;
 - libav 0.7.x: better yet

Note that forked-daapd uses libav since the ffmpeg/libav fork during the
0.6.x series.

Building from the git tree
--------------------------

Gitweb: <http://git.debian.org/?p=users/jblache/forked-daapd.git>
Git tree: <git://git.debian.org/users/jblache/forked-daapd.git>

Required tools:
 - ANTLR v3 is required to build forked-daapd, along with its C runtime
   (libantlr3c). Use at least version 3.1.3 of ANTLR v3 and the matching
   C runtime version.

 - Java runtime: ANTLR is written in Java and as such a JRE is required to
   run the tool. The JRE is enough, you don't need a full JDK.

 - autotools: autoconf 2.63+, automake 1.10+, libtool 2.2. Run autoreconf -i
   at the top of the source tree to generate the build system.

 - gettext: libunistring requires iconv and gettext provides the autotools
   macro definitions for iconv.

Start by generating the build system by running autoreconf -i. This will
generate the configure script and Makefile.in.

The configure script will look for a wrapper called antlr3 in the PATH to
invoke ANTLR3. If your installation of ANTLR3 does not come with such a
wrapper, create one as follows:

  #!/bin/sh
  CLASSPATH=...
  exec /path/to/java -cp $CLASSPATH org.antlr.Tool "@"

Adjust the CLASSPATH as needed so that Java will find all the jars needed
by ANTLR3.

The parsers will be generated during the build, no manual intervention is
needed.

Building from the tarball
-------------------------

Download URL: <http://alioth.debian.org/~jblache/forked-daapd/>

When building forked-daapd from a release tarball, the usual ./configure;
make; make install procedure applies.

FLAC and Musepack support are optional. If not enabled, metadata extraction
will fail on these files.

Support for iTunes Music Library XML format is optional. Use --enable-itunes
to enable this feature.

Recommended build settings:
 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-flac --enable-musepack

After installation, edit the configuration file, /etc/forked-daapd.conf and
adjust the values at your convenience.

forked-daapd will drop privileges to any user you'll specify in the
configuration file if it's started as root. It's recommended to create a
dedicated user without login privileges.

This user must have read permission on your library (you can create a group for
this and make the user a member of the group, for instance) and read/write
permissions on the database location ($localstatedir/cache/forked-daapd by
default).

You'll need an init script if you want to start forked-daapd at boot. A simple
init script will do, forked-daapd daemonizes all by itself and creates a
pidfile under /var/run. Different distributions have different standards for
init scripts and some do not use init scripts anymore; check the documentation
for your distribution.

For dependency-based boot systems, here are the forked-daapd dependencies:
 - local filesystems
 - network filesystems, if needed in your setup (library on NFS, ...)
 - networking
 - NTP
 - Avahi daemon

The LSB header below sums it up:

### BEGIN INIT INFO
# Provides:          forked-daapd
# Required-Start:    $local_fs $remote_fs $network $time avahi
# Required-Stop:     $local_fs $remote_fs $network $time
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: media server with support for RSP, DAAP, DACP and AirTunes
# Description:       forked-daapd is an iTunes-compatible media server for
#                    sharing your music library over the local network with RSP
#                    clients like the SoundBridge from Roku and DAAP clients like
#                    iTunes. It can also stream music to AirTunes devices.
### END INIT INFO

—————————————————————–

Picture of Squeezebox multimedia server.
Screenshot from 2013-11-23 02:36:40.png
Screenshot from 2013-11-23 02:43:41.png
Screenshot from 2013-11-23 03:16:37.png
If you do not need a fancy media server then the logitech media server aka squeezebox is a good choice.You can get fancy equipment from logitech, but they are nice enough to allow you to use their software lon a server. The software I think is available for the tradiotnal platforms. We will be using linux and an old Pentium two computer.

You need two pieices of software depeding on what your system had. Our pentium II is a minimal command line headless box.Do not let the command line scare you. Once we do the install everything will be done from a web browser.

Get the squeezebox software for the 32 bit intel based computer.  (http://www.mysqueezebox.com/download)

Install the software.

$ sudo dpkg -i logitechmediaserver_7.7.3_all.deb

Needed some sound libraries if you do not use your computer for multimedia.

$ wget http://www.deb-multimedia.org/pool/non-free/w/w32codecs/w32codecs_20110131-dmo2_i386.deb

Install the package.

$ sudo dpkg -i w32codecs_20110131-dmo2_i386.deb

Make a directory to hold your media,

$ sudo mikdir -P /var/media/

Copy your media files to that folder. (It is ok to use sub-folders.)

Now to the web.

Point your browser to squeezeboxhostname using a port of 9000.

In my case:

http://typo1:9000

You will need to setup a username and password if you do not already have one.  There is a like to the site to do that.

Log in:

Then you can set things up to look at the directory you setup to hold your media.  Then just modify the settings to what you prefer.
Save them.

Add the media to the play list. It is all point and click.

S that takes care of the server side.

Now you need to go to your media player, In my case it was an Insignia infocast with third party firmware. You will go to where the squeeeze box application is.Enter in the address of your server.

In my case it is:

Spelling is critcial here.

SUNP0007.JPG

Now just tell your squeezebox client to play. Voila you have media. In my case it was music files.being played.

—————————————————————–

We decided to make a very crude version of the famous  #ClearTV #antenna. We were able to get over 50 channels. Not bad for a couple pieces of foil. #Cablecutters

—————————————————————–

Gui vs keyboard:

Not so long ago at least for me Mainframe, C=64, Apple ][, Trs-80, MSDOS, CPM, and Unix  was all command line. When gui interaces first came out ,users screamed bloody murder if they had to use a mouse. Now if you sugggest using the command line aka keyboard, you get the same bloody murder reaction. Reminds me of the Star trek movie where Scotty tried to talk to a computer and found  that he had to use the keyboard.

[faced with a 20th century computer]
Scotty: Computer! Computer?
[He’s handed a mouse, and he speaks into it]
Scotty: Hello, computer.
Dr. Nichols: Just use the keyboard.
Scotty: Keyboard. How quaint.

320x240

—————————————————————–

Cooking math ?

Being new in the  #kitchen    was not sure how much flling I needed to fill a 9 inch pie crust pan, Could #mathematics solve the problem? A pie pan is sort of a frustrum (cut off cone). We needed the volume of a pie pan, so we used the formula: V = ((3.14*h)/3)(R^2 + Rr + r^2) or V = ((3.14*1)/3)((4.5 * 4.5) + (4.5 * 3.5) + (3.5*3.5)).That equates to about 50 square inches or about 3.5 cups (50.5*0.0693=3.49965 ). .Off to the store.

Screenshot from 2013-12-05 05:54:11

———————————————————————–

Late thanks givint dinner.

SUNP0015

Bood day.

Advertisements