this week I'm gonna teach you how to
create vector images from raster's like
pings or JPEGs on Linux also we're gonna
be beginning our build of a software
product that's going to allow us to
create say a doorbell
that rings simply when your staff
approaches the office stick around
[Music]
our live recordings are trusted only to
solid-state drives by Kingston
technology revive your computer with
improved performance and reliability
over traditional hard drives with
Kingston SSDs category 5 TV streams live
with Telestream Wirecast and nimble
streamer tune in every week on roku cody
and other HLS video players for local
show times visit category-five dot TV
welcome to the show everybody it's so
great to have you here it is just me
flying solo this week I proved before
the Christmas break that I could pull it
off and so I guess that was my
initiation and Here I am I'm glad to
have you along for the ride with me
we're gonna have a lot of fun this week
first of all I had I had intended to
have this discussion with my lovely
hosts who are not here with me today but
kind of looking at how I've been you
know what kind of progress have I been
making you know my new year's resolution
is a little bit different I'm not trying
to lose weight instead I'm trying to
educate myself as to my health so that
indirectly I can maybe lose weight and
be a little bit healthier so so far what
I'm doing is I'm stepping on my smart
scale 2 times a day and I'm watching the
trends and I am noticing of course I'm
heavier at night than I am in the
morning so let's just split the
difference actually no let's not take
the average let's take the morning wait
I think that's the one I'm gonna go with
but that's really helping me to be able
to set some goals that's really my
intent and those goals are very
arbitrary I'm that they're not very diet
related they're very much so that I can
just simply see that hey this is where
I'm at and this is where I want to be
and then consider as my day goes on what
can I do to achieve
my goals in the long term I don't know
if it's gonna take eight weeks I don't
know if it's gonna take 365 days I don't
know but at least I've got some kind of
tracking going on thats gonna be able to
help me with that my fitness tracker on
my wrist is helping me to be able to
monitor my heart rate it also does
monitor my blood pressure which is a
good thing because I do have a little
bit of a higher blood pressure nothing
to be afraid of or anything like that
but I do find some times when I'm
stressed out it can be an issue so it's
good to be able to just tap into my
wristwatch if you will and be able to
see those numbers and and it also tracks
me 24/7 and I can see those graphs
throughout the day so that I can see
what's going on which is very very
helpful for me as I set those goals and
and it also incidentally through the day
two things that it reminds me is it
reminds me to stand up from my desk
which is probably a good thing and it
actually does like it vibrates and I
look at my wristwatch and it says stand
up doesn't actually say that it's got a
little icon that is like a guy standing
up at a desk and that that's me and so I
do and I've been pretty much sticking to
that there's been a couple of times when
it's like I'm too busy for you right now
fitness tracker and then I feel bad but
I've been sticking to it as best I can
and then it reminds me with a glass of
water it looks like coffee mug full of
water to have a drink of water and I've
been drinking a lot more water which is
gonna help me with my metabolism and
help me to be able to burn fat as well
so indirectly again I'm not trying to
lose weight per se but indirectly it's
gonna happen so also this week now last
week I did the the zucchini pasta thing
this week my wife served rice with curry
on top of it and instead of going with
the rice what I did is I took a
cauliflower and I shredded it with a
cheese shredder I know hear me out here
okay so what cauliflower shredded with a
cheese shredder and then I sauteed it in
a little bit of olive oil
and I put my curry sauce on top of that
so instead of rice which is full of
carbs I
having cauliflower and I like
cauliflower so it's not a big deal for
me but it was it was like a really quick
fix and very very low carb so that was
really excellent and as far as snacks go
I've been snacking on cottage cheese
it's like if I want chips I just take a
couple scoops of cottage cheese which
also I like so I'm okay with that so
what does this have to do with tech
Robby that's kind of a question I've
been getting over the past week well
what does all this stuff have to do with
tech I'm using technology because we
live in a time right now where tech can
is available for like $35 for the scale
$35 for the smart fitness tracker that
connects with Bluetooth to my smartphone
and is able to generate graphs so using
technology I'm able to generate reports
that help me to be able to achieve that
so as we're kind of kicking off 2020
here's my goal I want you to join me for
it if you're a patron you're gonna be
able to follow along I'm gonna post some
screenshots and things like that that
are gonna help help you if you're
interested to follow along with me and
and I encourage you if if you have
similar goals that maybe we can share
our progress and discuss that as well
Before we jump into the actual tech
content of this week's show I want to
remind you to subscribe to us on YouTube
and click that bell that's gonna make
sure that you get those notifications
anytime we're live and anytime that we
post any new videos on our YouTube
channel
what has changed on YouTube in the past
week for category-five technology TV
well we have two main YouTube channels
for this show so there's category-five
technology TV that's where you're gonna
catch the full one-hour broadcast of
category-five technology TV and it's
just like front-to-back
and you're watching the full hour
alternatively there's what's called
Linux tech show you can get there it's a
hotlink Linux tech show comm and what I
do with Linux tech show is I take the
entire one-hour show and I cut up all
the pieces of the show now this past
week we did something a little bit
differently or I did something a little
bit differently I had a discussion with
some of the team and said what if we did
this and everybody was like yeah it
sounds like a lot of work Robbie but you
can do this and if you do this it's
probably gonna be a really good thing so
what I did is not only do I take all of
the clips from category five technology
TV so you can watch just the feature or
just the newsroom and now I've taken it
to the next step and said okay last week
we had eight stories on the category
five dot TV news room eight stories
these are news stories that were
following in tech so you can watch that
full category five dot TV news room
episode which is 28 minutes long or now
starting last week you can watch each
individual story so if there's a
particular story in the category 5 TV
news room that you love go to Linux tech
show com you'll be able to find that
story from here on in and you can share
that on your social media profile you
can post it on YouTube you can post it
on Twitter you can post it on Facebook
you can share it with your friends and
family so if there's a particular story
that applies to you or those that you
that you think are following your social
media profiles you'll be able to post
those videos and that's a great way to
spread the kind of the word about
category-five technology TV as we grow
here in 2020 this week I mentioned at
the top of the show we are going to be
looking at how to create vector images
from raster images and what does that
mean well when I'm working on websites
or when I'm working on any kind of
graphic projects quite often I request a
vector image from my client and the
client may say oh well we don't have
such a thing or even better yet
what the heck is a vector image right so
so maybe that's the question I have to
answer first so a raster image or a
flattened image like a JPEG or a
painting or bitmap is it's what's called
a rasterized image so that image is set
to the dimensions that the Creator had
saved it as so let's say a video is 1920
by 1080 so if you have a screenshot from
that video that screen shot is going to
be 1920 by 1080 now you can scale that
down and it's gonna look great you can
shrink it and it's gonna look fantastic
however if you ever tried to make it
bigger so let's say you wanted to fit it
on a 4k screen
well now what you're doing is you're
taking that 1080 piece screenshot and
you're stretching it and well how does a
computer stretch an image well it
recreates all the pixels it stretches
them and each pixel is stretched so
eventually when you get big enough
you're gonna get distortion you're gonna
get blurriness and this happens when you
take a logo it's a perfect example when
you take a little logo from a website
and you try to print it on a billboard
well that's not gonna look good and
somebody with some quality control is
gonna tell you don't do that we need a
vector image well what is the vector
image how can I get a vector image I
don't have one okay so then myself as a
graphic eye I'm not a graphic designer
but I'll use that term loosely in that
I'll take your graphics and I'll be
quality control and I'll make sure that
it's ready for you for your billboard
what can I do to help a lot of times you
have access to those graphics as raster
images but they're not vector so again
it's a logo if I scale it up if I make
that little logo that's meant for a
website and scale it up to a billboard
it's gonna get all grainy it's gonna get
blurry it's gonna get those like blocky
pixels it's gonna look terrible in the
end so you want to avoid that at all
costs vector is where it's at
vector images are basically the
difference is instead of a rendered
image that has the pixels all kind of
saved on that canvas it's a text file
that directs well here's a curve okay so
if this is a curve that curve is gonna
be the same either this big at that or
this big at that
that's what vector is it's gonna allow
you to scale it up and the curve is
gonna stay the same that the image is
gonna look just as good if you print it
on a 500 foot billboard versus and I
don't know if such a thing exists but if
it does you could print it with a vector
if you took a raster image and did that
it would be horrible but it often comes
up in my industry and and perhaps you've
encountered this where it's like I don't
have a vector so what am I gonna do so
today we're looking at how to use Linux
and free software in order to convert a
raster image into a vector now there are
online tools that allow you to do this
that's cool
but if you ever look at the source code
you're gonna realize that those online
tools that do this for free all they're
doing is and quite often not not
necessarily all they always and it's not
always the case but quite often those
free tools are taking that raster image
and they're putting it in a vector and
then they're embedding the raster image
into a vector file so it's still raster
instead what we want to do is we want to
take that image and we want to trace
around all of the curves so if there's a
letter S I want to trace around that
letter s so that when I scale it up it's
going to look absolutely perfect well
how do I do that that sounds like a lot
of work because we're thinking in raster
terms right we're thinking in the GNU
image manipulation program or Photoshop
and how we'd have to trace around
everything and it would just be
absolutely brutal but Linux makes it a
lot easier so let's jump into my
terminal I'm going to bring up my
computer here and all we need is a
simple program
which I'm going to install first but
then we're gonna grab a logo off of the
web so I'm gonna become root so on Linux
Mint its sudo su or su do su for those
purists and enter your password now that
I'm the super user so I'm the root user
now I can type apt update and that's
gonna grab my latest repository
information from the web so these are
the online available Linux applications
and I'm gonna go apt install and there's
a really simple command here p.o trace
that's gonna grab a program called I
don't know if it's called Poe trace or
Pio trace we'll call it Poe trace and
I've said yes
now that is installed so if I type Poe
trace - - help I should get a help
dialog there that's fantastic
alright so we've got it installed now
let's jump on the web so I'm gonna get
on here and let's actually you know
let's let's grab the category-five dot
TV logo let's see how that's going to
work so there it is it's on the web and
if I right-click on it and go open image
and new tab let's click on that and
there's my image wow that's really
really tiny I don't know how well that's
gonna scale you probably you know that
makes me think about the initial quality
control as we're doing this we want to
try to get the biggest image we can we
want to try to get it as something that
has an alpha layer like a ping for
example that would be perfect and we
want to make sure that it's as clear as
possible if it's got dithered edges or a
drop shadow behind it it's not going to
render well as a vector because vectors
are completely different than a raster
image they're not colorized
but they can be colorized on the like
when you display them so you can say
okay well that part is going to be this
Pantone and that part is going to be
this Pantone but it's a lot different
because it's not saving it as the same
raster
image so what I might want to do with my
category 5
TV network logo that you see there on my
screen is I might want to do something
like grab the master image that one
looks like it's got some drop shadowing
going and I could probably go to wiki
dot category-five dot TV and on my wiki
I could find branding and go to the
category 5 branding and I can grab one
of these full-scale images so maybe
something a little more like this would
be to my liking so at the bottom here
I've got a word mark file and you can do
that by you know even just getting onto
Google Images or something and finding a
larger image for the images that you're
looking for so something like that will
look pretty good but notice that this is
actually a ping file yeah it scales well
but it's a ping so let's save it I'm
going to throw that on my desktop and
it's called word mark underscore light
dot ping so you can see it right there
so there it is so it's a raster image
yes I happen to have one that's seventy
four forty four by two one eight seven
pixels it's gonna do really really well
regardless it's a giant image but what
if you've got something else like let's
go on to Google Images and just do a
quick search for I'm gonna do a search
for logo and let's see what we can come
up with all right we got Burger King we
got McDonald's we got IKEA let's grab
the IKEA logo we have no rights to use
that but this is for the sake of the
demonstration so fair use says hey we're
showing you how to do this there we go
so we've got two logos on my desktop
we've got the category 5 TV logo and
we've got the IKEA logo sound good so
with this program installed so I've got
PO trace installed and now I'm gonna go
to my desktop and look at the images
that I have there and both of those are
ping images now one of the things with
PO trace that we need to keep in mind is
that PO trace only supports bitmap
images so for the sake of the
demonstration and just for the ease of
use and for familiar
I want to use BMP files so back on my
computer I'm going to bring up the GNU
image manipulation program remember I'm
doing this all from Linux Linux is a
free operating system the GNU image
manipulation program is a free image
editor everything that I'm doing here is
available absolutely free to anyone who
wants to do this if you're on Windows
and saying oh but how do I do this on
Windows you know what you can install
Linux and that's one way that you can
achieve this alright so I'm going to
export as so I've got the category 5 TV
logo I'm gonna export this as a bitmap
so I'm just gonna change the extension B
M P and hit enter now it's gonna ask me
a couple of things here it's going to
say ok compatibility options let's open
that and make sure that this is not
checked do not write color space
information now we absolutely need color
space information that's a requirement
of po trace in Advanced Options we can
see 16-bit 24-bit and 32-bit the default
is 32-bit a RGB that stands for alpha
red green blue now we do want RGB but we
do not want 32-bit because PO trace is
probably going to have problems with
that instead we're gonna go with 24-bit
RGB so I'm gonna click on that and now
RGB 24-bit is selected and i'm gonna
click export so now on my desktop i
should have another file here called
word mark light BMP and when i
double-click on that it is my logo look
at that
it's still a raster image if i if i
scale that too much i'm gonna start
losing quality i wonder if i can
actually show you that you can see that
if i zoom way in do you see those
pixelated edges see how grainy that is
and how blocky that is that's a raster
image because it saved each and every
pixel so instead we're gonna create a
vector based on that file remember the
first step is that I do need that bitmap
so whether it's a ping source or a JPEG
or whatever it happens to be you need to
convert it first to a bitmap and then PO
trace will be able to work with it so
now I'm going to type PO trace and
there's a couple of things now you can
do - - help to learn more see how this
works and what you want to do you can
kind of scroll up here and see what kind
of options are available to you but I'm
gonna tell you what I think is gonna
work just fine for us and we'll see here
live on the air if this is gonna work
I'm gonna do - s which means I'm gonna
save this as an SVG vector image then
I'm gonna say - group and - group is of
is an SVG option and what that does is
it groups related paths together so it's
gonna merge all those into a single
basically a vector like traversal point
I don't know the technical terms but
rather than having a whole bunch of
separate things in your SVG file it's
gonna merge those together so let's
group those together keep things nice
and clean now I want to tell it my
output I'm gonna call this logo dot SVG
SVG being a scalable vector format and
then the next thing that I can do this
is optional but I'm gonna do - - tight
and what - - tight does is it if there's
a lot of white space around your logo
that you're working with it's gonna
bring that in it's gonna basically Auto
crop that vector for you so that you
don't have a bunch of whitespace from a
vector perspective I think that's a good
idea and then the next thing is my input
file so that file was called word mark
light dot BMP now I'm just gonna hit
enter and as soon as I hit enter if
everything Oh what did I do
it says PO trace invalid option - - zero
oh why did I push zero that was supposed
to be an O for output there you go so
remember - oh not - zero enter and did
you see how quickly that popped up a
logo dot SVG file on my desktop so if I
double click on that file now you can
see CAD
five and it's stripped away the green so
that's a problem for me but this is in
fact a vector so why did it strip away
the green well it's grayscale right so
maybe I can work with that I can look at
the options that are available to me
let's see if gray scaling it would do
some kind of difference so looking at
our output options here let's get a
closer look and see what kind of options
we have as far as the colorization goes
we've got resolution scale stretch
rotate margin left margin bottom margin
page size all these things Oh
- color set foreground color fill color
opaque but if you're if you're not sure
there are ways to do it there are ways
to have it dither for you but there's
something that we can do here so
remember we created that bitmap
ourselves right and remember that what a
victor is is basically the outlines of
this file so let's export that again
let's create a new export before we do
that I'm gonna go image mode grayscale
and then image mode RGB again so I've
just gray scaled it let's see if that's
gonna do it for us there's still a lot
of white there I'm going to overwrite
that file set the same settings I want
to be 24-bit and export that all right
I'm just gonna minimize that and see
what happens here so let's poet race
that again and see if that's made any
difference and it hasn't so our color is
causing a problem with this particular
vector because it's trying to get those
edges and it's seen the black but it's
not seeing the green so how can I fix
that and it's not seeing the white
either it's seeing that as like a
background color so back in the GNU
image manipulation program I can turn on
alpha hold so this is locked the Alpha
Channel and then choose black
and right-click and go edit fill with
foreground color and so I've created
that as a completely black image now I
can go file export as word mark light
dot BMP export and replace set my
settings and export so now I've got an
image that's a bitmap that is all black
so now if I run that command again you
don't have to be afraid to experiment
and try things out that is the actual
vector so this is the logo SVG this is
the logo dot BMP so with the logo dot
BMP I'm gonna hit 1 and then I'm gonna
hit + 1 - can i zoom in 1 2 ctrl + 1 2 3
4 5 and then I'm gonna hit I'm going to
come over here so this is the bitmap you
see those edges how kind of awful those
are 1 2 3 4 5 see that jagged edges
right so let's do the same thing let's
go back to our SVG file that we've
output and let's zoom into that and
let's go zoom in a whole bunch of times
and move over here notice the background
has gone to see how clean that edges
because now we're working with a vector
file I've zoomed in a hundred fifteen
hundred times and you can and it's
really really hard to scroll because I'm
scaled in so close but now ok I'm zoomed
in two thousand times which is the
absolute maximum and you can see that
that Edge has absolutely no jagged edges
whatsoever so I can scale that up too no
matter what I want it to be and it's not
going to be jagged edge if I open that
with the GNU image manipulation program
now it's an SVG file so what is it
saying hey this is a render scalable
vector graphic this is the width and
height and what do you want to do well
let's make it a ridiculous amount let's
make it thirty thousand pixels wide you
think this is gonna crash my computer
let's hit OK it might crash
my computer that's ridiculously high-res
there we go
I'm gonna view it at one times and look
at that see those edges that is actually
one of the letters in our logo they're
absolutely perfect no jagged edge
because this is legitimately a vector
and I mentioned there that some of these
online tools that do this for free are
gonna cause you to have like a
rasterized image within a vector that's
not gonna scale up like that so let's
actually see how we can determine that
so if I open with and let's actually
open our SVG file with a text editor and
I can see that those SVG paths have been
traced by PO trace so these are actually
the paths of the vector now what you'll
see if it's not vector if it's just like
a fake vector is that you'll see that it
has like an embed with like some pain
data well this is a true vector so there
you have it
and I mentioned about this IKEA logo so
let's actually see what happens here
with the IKEA logo because I want to see
I want you to know that this is not
something that I'm just pretending I'm
gonna export that one and I'm gonna save
that on my desktop as dot what dot BMP
enter compatibility options make sure
that the color space information is
saved and you notice I'm trying to click
on Advanced Options and it's not letting
me do that well why is that okay
something wrong here if we cancel out
one of the things I can see about this
image is that this particular image is
indexed color do you remember back when
I was working on the category 5 logo I
had to switch back to RGB well if I
right-click on the image and go image
mode you can see that it is selected as
indexed let's change that to RGB now
that it's RGB I can export as a bitmap
so export as change it to BMP
and now look at that I've got my
Advanced Options back and I can click on
24 bits which was the default for this
logo make sure that the color space
information is saved and hit export so
now on my desktop I've got a nice little
image file a duplicate it looks like a
duplicate but this one is a bitmap so
now back in my terminal let's try that
one so I'm just gonna press the up arrow
on my Linux keyboard and remove the
source image from the last command and
instead change that to IKEA underscore
2019 logo dot BMP and hit enter and
instantly I see a new IKEA oh no it
saved as logo SVG because of the - OH
command let's see what that looks like
tada
so that's a vector of the IKEA logo well
that's not exactly what I would want
remember vector is not saving the color
information it's saving the paths right
the color information is going to be
separate that's something that you're
gonna provide to your graphic designer
or maybe your logo doesn't have a whole
lot but watch this so if I do that
command again now I'm gonna add to that
command I don't know if I can do it at
the end but I'm gonna type - - invert
and now that I've typed - - invert and I
open that image again look at the
difference it's inverted that logo for
me and now I have a perfect vector that
looks like that so again if I open that
in the GNU image manipulation program
and I'm only doing that because this is
a raster program but I want you to see
that this is indeed a vector image now
if I take that and I make it fifty
thousand pixels wide eighteen thousand
seven hundred and eight pixels high it
says I don't have enough memory for that
let's try a little bit smaller open with
GNU image manipulation program you see
it is vector let's try 10 thousand
pixels wide 3742 pixels high there we go
alright hit 1 and you can see those
edges are flawless well how's the round
edge look let's jump up look at that my
friends
absolutely beautiful there you have it
so that is one way that we can actually
very very quickly convert a ping to a
bitmap make sure that it's grayscale or
that the colors are going to convert
properly into a vector and then actually
use a free tool that's available through
our repositories I used apt - I used apt
install pote Reis you can use app - get
install poet race or you can use a yum
install PO trace depending on your
distribution I'm on Linux Mint and so
apt install PO trace got me there and as
long as I've got a bitmap image that's
going to be compatible with it I can
convert that to a vector image very very
quickly
I've done it before I've manually
retraced images in order to create a
vector and it's a brutal process you saw
live how long did that take we did it
let me know below comment below how that
has helped you as far as your logo
creation process converting images to
vector and now you can take that raster
image and scale it up as big as you want
it it doesn't matter if you want to
print that on the 500 foot wide
billboard it's gonna work for you it's
gonna look fantastic we've got to take a
really quick break when we come back
well we're gonna be looking at we're
jumping I mean this is my chance to be a
geek right nobody else is here so it's
just you and me we can get into the
Linux terminal that's where I am most
comfortable we're gonna talk about how
we can create a bash script that we're
gonna run it as a cron job on a
Raspberry Pi inevitably but today I'm
just doing it on my laptop but we're
gonna write it together to be able to
tell when people come and go from work
we're gonna be able to use it as a
doorbell we're gonna be able to use it
as a time tracker to know when they're
at work and when they're not at work you
could use this so that when you get home
all your lights turn on
cuz you've got a program to do so you
could have it so that when you get to
the office hey your music starts
whatever you want to do we're gonna show
you I'm gonna show you here how we can
code that to to detect your presence and
do something stick around so here at
studio D sometimes it can be a problem
when a host arrives they get locked
outside in the cold Canadian winter
because we have it set up in such a way
our studio is within a massive building
and there's a foyer between us and the
outside world and the foyer gets locked
at night and in order to get into the
building I have to first exit studio D
walk out the foyer a and unlock the
front door to let somebody in so when
Sasha arrives when Jeff arrives when
Henry Bailey Brown arrives they usually
message me on discord they let me know
that I'm that they're here sometimes I
don't catch that right away it's 40
below and it's like freezing rain out or
whatever it may be so that's my scenario
your scenario may be a little bit
different maybe you just want to be able
to walk into your house and have all of
your devices recognize that hey honey
I'm home
maybe you want to use this in an office
where if I walked in the door all of a
sudden my time is being tracked maybe
that's a cheap maybe a free way for you
to be able to track your employees
coming and going from the office maybe
well how can we do that well everybody
carries a device I've got my smartphone
my smartphone is connected to the Wi-Fi
as soon as I approach the studio once
I'm here it connects to Wi-Fi and what
does that tell you well
I have an IP address on the LAN now that
I'm connected to the Wi-Fi and if I have
an IP address on the land
what can I presumably have happened to
me I can be pinged can I be pinned well
here's the thing we don't often do this
with a smartphone for example we just
let the DHCP server just dish out IP
addresses and it's all fine and good but
Robbie's here we know and trust Robbie
Robbie's a staff member and when
Robbie's here we want to know about it
Sasha when she arrives maybe we want to
know maybe in my case I want to have a
little light come on that says hey
Robbie it's time to open the door walk
out through the foyer and unlock the
door let her in maybe in your office you
want to be able to track if your custody
for staff is there on time and spending
the entire shift and monitoring those
maybe it's like a who knows
maybe it's an environment where you just
get paid while you're there or maybe you
just hey we want to have that light come
on when the staff is arrived so how can
we do that well every device has a MAC
address the MAC address is a private
address that's not available on the web
but it's available on the device and
it's available to the DHB DHCP server so
your DHCP server that dishes out the IP
address to every connected device says
all right we're gonna give this the next
address in the DHCP pool 10.0.0.0 seven
could be your phone so get into your
DHCP server whether it's a router or a
Windows DHCP server or maybe you've got
a Linux DHCP server and look at the MAC
address of that device and set up a DHCP
reservation so now every single time I
connect to the Wi-Fi my smart phone is
given the same IP address
whatever I've defined pardon me in my
case I've said dot 5-0 ping 10.0.0.0
what do you see
hey that's Robby's phone so what happens
if I pick up my phone and I'm gonna
count down from three I'm gonna
disconnect from the Wi-Fi you ready for
this three two one click I am now off
the Wi-Fi what has happened to your
screen it's frozen Robby's now left the
building or he's turned off his Wi-Fi
but why would he do that if this is
being used to track his hours and make
sure that he's paid there you go
destination host unreachable I'm going
to reestablish my Wi-Fi connection just
by pushing the Wi-Fi button on my phone
in three two one now and let's see how
long it takes so I've now approached the
building and guess what Robby's back
right so we know that that's the case
well how can we use that information for
good well easy-peasy
I always make things easy for you head
on over to my github github.com slash
cat 5 TV slash Linux tools Linux - tools
I should say and there's a script there
called Wi-Fi check let's do it click on
it click on raw and let's download it
save as and I'm gonna throw that on my
desktop it's calling it txt whatever
I'll rename it and now let's jump into
my terminal go to my desktop move Wi-Fi
check txt to Wi-Fi check dot done all
right chmod plus x Wi-Fi - check so now
that file is executive all alright so
now I need to create a config file so
I'm gonna call that Wi-Fi - check CFG so
echo and we're gonna go 10.0.0.0 was my
establish IP address right so I'm gonna
save that to Wi-Fi - check dot CFG so
now if I nano that file look at this
oh no not Wi-Fi check dot CFG dot C F G
there it is 10.0.0.0 so if Sasha brings
in her smartphone I'm gonna assign a
static IP address to her which is gonna
be 10.0.0.0 so now if I run that file
Wi-Fi - check what do you see 10.0.0.0
equals 110 dot 0 dot 0 dot 5 1 equals 0
well what does that tell us
ok so we've established Robbie's dot 5 0
Sascha's dot 5 1 you see Sasha Sasha was
not here Robbie is so Robbie equals 1
Sasha equals 0 1 point 4 Robbie
so now programmatically we can say ok
well we can we can program that we can
change that we can manipulate that to
say ok is Robbie online and we can run
that as a cron job right
okay so similarily let's take my smart
phone and I'm going to turn off my Wi-Fi
so now my Wi-Fi is off I'm gonna run
that command again and watch what
happens you can assume what happens but
10.0.0.0 which we've already established
as Robbie is going to timeout and it's
gonna say 0 so now we know that both
Robbie and Sasha are gone from the
building I've turned on my Wi-Fi and I'm
gonna run that command again and now we
can see Robbie's back sash is still not
here so what does that do for me so now
programmatically I can say let's get an
alert let's use a GPIO on a Raspberry Pi
to be able to trigger events so as soon
as Sasha approaches the building and her
phone connects to my Wi-Fi now all of a
sudden a green light above the door
turns on and I know exactly what that is
I'm gonna head over there and open the
door no more standing out in the
Canadian cold winters and we can do we
can program that to be able to log
things to a MySQL database there's no
limit
as long as you've got some creativity
and a little know-how you're gonna be
able to do this so let's look at that
source code and see what it's actually
doing so I'm gonna edit Wi-Fi - check
from my get repository so what it's done
is it's open the file the the config
file that I created and it's grabbing
the addresses well they don't have to be
I should say they don't have to be IP
addresses on a local LAN I can put
google.ca if I wanted to and then if I
run it it's just so you know so just so
you know the flexibility of this so you
can see google.ca is online it's
responding to a ping so I just want you
to know that it has that flexibility
okay so you can put anything in there
that you want as long as it's a valid
hostname a domain name or it could be an
IP address as we're using in the
demonstration today for this particular
use case so then it pings it well that's
all it does it just pings it there it is
ping and it pings the host and if it is
up it responds with one and if it's down
it responds with zero okay well what
good is that if it responds with one or
zero you know what what do I do with
that information Robbie well this is why
I wanted to show you the source code
because you can now say okay well I know
that it's echoing out 10.0.0.0 equals
one why don't we instead wait a minute
why don't I delete that line and say
echo and we're gonna say dollar sign
host dot and remember this is PHP is up
dot PHP EOL
all right and maybe I take this one and
I say you know what maybe there's no
else maybe I can remove the else and say
it's only gonna tell me if it's up so
now if I run that 10.0.0.0 is up right
but it doesn't show me the ones that are
down or maybe I can take that and I'm
only showing you that there's no limit
okay maybe I can say let's just use a
really simple command if dollar sign
host equals equals 10 dot 0 dot 0 dot 5
0 we're gonna say echo Robby's here Oh
boom okay see what I'm doing and then I
can change this to an else
so if it's not Ravi 10.0.0.0 it's gonna
just echo the host name so now I'm gonna
re add Google to that so you can see cuz
Google's gonna be up watch here
Robby's here yes my phone is online
Google is up I got some syntax issues
but that's okay
we can work with that I'm going to turn
off my Wi-Fi and then run it again
notice Robby's not here however Google
is up and then I watch Google is up and
then I'm gonna get that syntax issue
again I'll fix that don't you worry I
know exactly what's happening there see
that Google is up my config file
I accidentally added an extra carriage
returns that's why it's it's running
against a carriage return
trying to ping nothing so dot slash
Wi-Fi check and it's gonna say nothing
but google.ca is up now I'm gonna turn
on my Wi-Fi and run the exact same
command again Robby is here google.ca is
up so do you see what I'm doing there so
programmatically I can do anything
absolutely anything and treat people's
connectivity to their smartphone so
their smartphone connects to the Wi-Fi
the DHCP server dishes out the IP
addresses based on their reservation
based on their MAC address now you can
control events based on coming and going
of your staff I don't think I need to
say anything more I think already in
your head ideas are coming I want you to
comment below I want you to tell me what
kind of ideas does that birth what kind
of things can you do with this I think
of time tracking as a great example
robbie checked in robbie signed out
here's this paycheck based upon that
information it's really hard to spoof
that right and i mean if you trust your
staff anyways it's really not a trust
thing it's a it's simply an ease of use
thing as soon as you connect to Wi-Fi
guess what I'm tracking the fact that
you are connected there's no there's no
tracking there's no privacy issue here
it's just simply are you online or are
you not online
it's a ping and as long as that device
or that domain or that IP address
replies to ping ICMP then you're gonna
be able to in incorporate that into your
config file cap 5tv
on github you'll find a repository
called linux - tools which will get you
started
all right we've got a head over to the
newsroom here's what's coming up in the
category five dot TV newsroom paypal has
confirmed that a researcher found a high
severity security vulnerability that
could expose user passwords to an
attacker hundreds of millions of
Broadcom based cable modems are at risk
of remote hijacking Apple is now selling
rack-mountable cheese graters and the
pine foam Braveheart Edition is
available now for early adopters and
we'll tell you about the $150 smartphone
from pine 64 stick around the full
details are coming up later in the show
this is the category 5 dot TV newsroom
covering the week stop texting with a
slight linux bias
Ravi Ferguson filling in for Sascha
Rickman this week some quick honourable
mentions
last month citrix disclosed a critical
security hole in both its application
delivery controller and unified gateway
offerings up to 80,000 systems were
thought to be at risk with some 25,000
instances found online over this past
weekend those admins who haven't put
mitigations into place by now will want
to make sure that they address their
situation immediately as InfoSec
researchers have now publicly declared
and shared working exploit code for the
remote takeover bug now the
proof-of-concept code can be used to
trivially achieve arbitrary code
execution with no account credentials in
other words they'll be easily able to
hijack systems if you haven't put in
place the mitigations by now and you
have vulnerable systems facing the
internet you've probably already been
hacked
since BOTS have been masked scanning the
net for machines to compromise these
days with ransomware for example being
such a key issue I can't reiterate
enough keep your firmwares up to date
could you imagine if somebody was able
to compromise your modem that gives them
access to every device every single
device on your network and if any one of
those is accessible with RDP or with
Samba shares right like file-sharing
your server probably has file-sharing
well now all of a sudden guess what
you're done keep those devices up to
date speaking of security support for
Windows 7 is now over for security
software updates and other reasons it's
time to stop procrastinating make sure
that you move to Windows 10 if you're
gonna stick on the Windows platform
Microsoft support for Windows 7 has
officially ended and this shouldn't come
as a surprise to Windows users Microsoft
promised just 10 years of product
support when Windows 7 was released back
in October 20 2009
you believe it's been that long and now
they've shifted to newer technologies as
of January 14th Microsoft is no longer
offering technical assistance or
software updates to your device and the
company has encouraged people to upgrade
to Windows 10 to keep their PCs and
laptops secure your Windows 7 computer
will keep working but Microsoft will not
provide any security updates or fixes or
even technical support for any issues
that leaves your computer at greater
risk for viruses and malware that may
circulate to take advantage of any of
the flaws that are later discovered
that's why it's important for you to
switch to an OS that is newer security
vulnerabilities are discovered for the
discontinued OS and hackers will create
tools to exploit those vulnerabilities
but Microsoft will not patch those
issues without security updates or fixes
you're putting your computer and other
devices on your network at risk if
you're a Windows 8.1 user extended
support for that OS won't end until
January 2023 Windows 10 was released in
2015 and extended support for the latest
version of the OS is until 2025 this
could also be an excellent time for you
to try out Linux I gotta throw that in
there right while an upgrade to Windows
10 might require you to upgrade your
hardware to Linux could breathe new life
into your existing computer you can
remove the discontinued Windows 7 and
replace it with Ubuntu or Linux Mint
absolutely free alright let's get into
the top stories that we're following
this week first of all PayPal has
confirmed that a researcher found a high
severity security vulnerability that
could expose user passwords to an
attacker the researcher Alex Burson
discovered the high severity
vulnerability when he was exploring the
main authentication flow at Pape
his attention was drawn to the fact that
javascript file contained what looked
like a cross-site request forgery token
and a session ID he says quote providing
any kind of session data inside a valid
JavaScript file usually allows it to be
received by attackers end quote if a
user fails to login several times
pardon me they have to solve a CAPTCHA
at that point and once they finally
authenticate and PayPal noted quote the
exposed tokens were used in the post
request to solve the CAPTCHA PayPal said
quote if a user followed a login link
from a malicious site similar to a
phishing page unquote that's all it
takes
follow a link from a site log in to your
PayPal account you're done however
Burson said in the real world of social
engineering attacks quote the only user
interaction needed would have been a
single visit to an attacker controlled
web page and that's the end of the quote
within 24 hours of the bugs confirmation
by the hacker one bug bounty program
PayPal had patched the vulnerability
bearson said while he was rewarded with
a bug bounty worth about fifteen
thousand three hundred dollars u.s. and
the thing that we have to keep in mind
here ok so this is an exploit that is on
a site like PayPal so if you followed a
link and created that session cookie
that could have been compromised
I mean you click on that link in a
phishing scam email right and you think
oh well this is a phishing scam I'm
gonna back away wolf it's too late you
didn't even log in and it's too late
that's what we're up against here so any
of your staff who has access to your
PayPal account now clicked on that link
and has that session cookie in place
from a malicious and malicious site and
then
later legitimately logs into PayPal
after having gone through the capture
process I guess that's the the exploit
itself you have to fail the login a
couple times and then when you get it
right that's when the hacker gets your
credentials well you know how does that
affect me and how can I prevent that
from happening I think it really comes
back to password managers because you
think how how do you enter the wrong
password for PayPal three times to the
point where you need to enter a CAPTCHA
you're probably typing it in and if
you're typing in your password to PayPal
it's probably too easy if you can
remember your password to PayPal it's
too easy can you remember your password
to PayPal if I sent you to PayPal calm
right now would you be able to log in by
typing your username and password if
that's the case you are a potential
victim you are easily exploited through
this type of attack I don't know my
credentials for PayPal my password
manager ensures that my password for
PayPal is so obscure and so secure that
even I don't know it when I go to
paypal.com I log into my password
manager with my secure password which is
a password recipe and then it enters it
fills in the information for PayPal so
that I can log in if you're not doing it
that way then you are wide open to this
type of vulnerability and I need to
encourage you that hey you need to
understand the value of a password
manager it's not about
I can I remember my passwords that's not
what it's about it's about being able to
create passwords for sites like PayPal
where your money resides where they have
access to your checking account and your
credit card it's about having passwords
that are so secure that even you don't
know them that's the key point about a
password manager a vulnerability in
broad coms cable modem firmware has left
as many as 200 million home broadband
gateways in Europe and potentially more
worldwide at risk of remote hijacking a
vulnerable user would simply have to
visit a website or even open an HTML
file that contains malicious JavaScript
this code subsequently it connects to
the web server built into the vulnerable
modem on the local network the script
then alters the contents of the modems
processor registers by overwriting the
stack to redirect execution to malware
smuggled in by the request at that point
the code can attempt man-in-the-middle
attack which allows the hacker to gain
access for example to potentially
sensitive information sent to or from
the users internet connection the
miscreant can also use the exploit to
manipulate the firmware change DNS
settings to redirect connections to web
pages and they can redirect to anything
of their choosing so no doubt phishing
versions of every bank and social media
site would be something that they would
think of they can snoop on traffic
launch distributed denial of service
assaults and more in other words this is
a bad one
once exploited an attacker can use the
modem to do pretty much anything they
want
Broadcom says that the exploit code was
patched last May but it seems clear that
the fix was not widely adopted by users
in their tests the cable haunt team were
able to compromise a large number of
Sageman calm Netgear Technicolor and
compal models for instance since
Broadcom chips are in many brands of
routers and modems it's important for
you to make sure that your firmware is
up-to-date so that you don't get
compromised now that the exploit is
known to hackers
[Music]
has begun selling the rack-mountable
variant of its Mac Pro desktop computer
starting at just 6500 dollars the
rack-mounted Mac Pro is identical to the
tower version in terms of specifications
and it comes in the same hardware
configurations as well it has the same
ports it's laid out the same inside the
case and it has the same rear
connections the differences from the
tower variant are entirely in the case
itself this variant of the Mac Pro 4
goes the wheels or stands of the tower
model in favor of stainless steel rails
that allow the device to be mounted
horizontally in server racks it also has
a removable lid instead of the fully
removable frame seen in the tower
additionally the handles are on the
front for easy removal from server racks
and some other elements like the power
button have been moved from the tower
top to the front rack this Mac Pro is
intended for inclusion in render farms
as a server and other commercial and
professional uses I could certainly see
in the render farm I mean I work in
video all the time so having something
that's able to do my rendering that's
that powerful but does it have to be a
Mac could it be a Linux machine with
blender running that would be sweet
let's let's go that route the pine phone
oh you knew I was gonna get here didn't
ya fine 64 let's just take a moment the
pine phone is an affordable Linux smart
phone created by Pine 64 the makers of
the pine butt Pro laptop the rock pro 64
and pine 64 single board computers the
pine phone specs price and design are
all tailored towards keeping it a
super-low $149 so that puts it in a spot
all its own the pine phone is built for
Linux enthusiasts and developers who can
appreciate its privacy
and open-source software don't expect it
though to be on par with the latest and
greatest smartphone right the goal with
the pine phone is to provide a reliable
open and hackable smartphone platform
powered by Linux the Braveheart Edition
is available now and it's intended for
enthusiasts and early adopters only
we'll call it a first pass batch it does
not ship with Linux installed you'd have
to actually do that yourself from one of
the betta builds that are available and
the handset has a few differences to the
final run units mainly related to the
antenna and the placement of the 2g
signals soon the pine phone will be
available as a complete phone preloaded
with a Linux based mobile operating
system there's no specific release date
but as soon as there is we'll be sure to
let you know so make sure you subscribe
and click the bell to receive
notifications big thanks this week - Roy
W Nash and our community of viewers for
submitting stories to us thank you for
watching the category-five dot TV
newsroom don't forget to Like and
subscribe for all your favorite tech
news with a slight Linux bias and if you
appreciate what we do please become a
patron of this particular segment of the
show
it's patreon.com slash newsroom please
show us some love there that would mean
a lot from the category-five TV newsroom
I'm Robbie Ferguson filling in for
Sascha Rickman it's been so nice having
you all here with me this week thank you
for joining me thank you for being my
community here keeping me company
because otherwise it's pretty lonely
when you're just here all by your
lonesome in studio D but it's nice
having you here and it's been nice
interacting with you I look forward to
seeing you again next week I anticipate
that I will have house here with me
sometimes things come up that make it
impossible but we do endeavor to have
folks here to make the banter a little
more exciting than just Robbie speaking
into
the void that is the internet but hey
maybe you can help with the interaction
comment below send me a message let me
know what you thought of tonight's show
and I'd greatly appreciate that but in
the meantime I hope you have a wonderful
week I look forward to seeing you again
next week
take care
[Music]