What happens on New Years' day when you have 3D printer filament, a messy cupboard containing your shaving supplies, and you are full of boredom? You make something to hold your razors on the cupboard door, that's what. It's a nice test of the rapid prototyping techniques and tools. Here's the details.
First, over the last little while, I kept thinking about trying to mount the razors against the inside of the cupboard door. It keeps them easily accessible, and leaves the rest of the shelf open for other things like shaving gels and other "keep me in a state my wife is willing to be close to me" stuff. Yeah, this is serious stuff. I thought about using some robe-hangers found at the local orange-box-type of store, but didn't think it would work. (Translation: I was too lazy to go buy one of those and try it.) New Years' morning, I woke up early (it happens a lot, even if I was up late). It only took me an hour before I needed to do something constructive (there is only so much screen time I guy can take before his engineering kicks in, you know?). Then it hit me - why not build my razor hangers? I have everything I need.
I headed out to the shop and grabbed the calipers (uh, just because I might need 0.005" of accuracy), and took a few measurements of the razors in the position I'd be hanging them. This would simply give me the basic design of the holders.
Next, I opened OpenSCAD (seriously? Yup, I grew up with POV-Ray, so I am used to using code to set up the object. It took me an hour to get everything the way I wanted it to look.
After the design and a quick STL export, I loaded it into the printer and hit "run".
My wife and I ran and played some racquetball, then came back to a failed print. The filament got tangled up, and prevented it from being extruded. [sigh]. I untangled it, got it set up again (with something to keep it spooling), and hit "run" again.
We ran to see "Star Wars". Finally saw it. If I actually cared about my "nerd credentials", I'd have been to see it sooner, but I'm willing to wait. Visited an "adopted" couple of boys (cute, but bouncing-off-of-the-walls kinds of energy). Then headed and grabbed dinner, came home, and found a successful print. I did another one (I have two razors), just for that one. We watched another movie while we ate dinner (Disney's The Sword in the Stone), and I had two prints ready to be cleaned up and installed in less than 24 hours.
This morning, I cleaned them up (breaking support structures out of the parts), and did some sanding on them with a Dremel to remove some of the hard edges. They turned out nice, so I grabbed some machine screws and installed them. I know I could have used some body filler to really smooth them out and painted them, but it just wasn't worth it to me. My wife somewhat enjoys aesthetics. To me, it has to have a good function. We are great together, because when our heads work together, we can do some amazing work. So, they got installed as-is, and are fully functional.
Not a bad little bit of work!
Tuesday, January 2, 2018
New Years Boredom
Friday, October 13, 2017
More on Chinese Camera Hacking
So, as I keep phasing out my Hosafe Chinese cameras, I also keep going back to them. They were cheap, but they have security issues that drive me crazy. They also had a great picture. So, I am really getting to the point I want to use them, without having them dial-home to mamma.
I decided to through a little more at these things, just to get a little more information. I tossed Nikto to the camera, and it identified that you can hit the /cgi-bin/ URI and it will list the scripts. They appear to be minimal, and two of them stood out. One was called "snapshot.sh" - and I immediately threw some shell escape characters trying to inject commands. Unfortunately, they actually did some sanity checking, and your maximum length to play with is a command about 4 characters long. Scratch that one off of the list.
The other script (ignoring the "proccgi" and "wagent" scripts) was called "jvsweb.cgi". A quick google, and someone said you can list video streams using this CGI in the form of :
There was also one called "webdevinfo". My curiosity was definitely piqued now. I tossed it in, and got a param error. A Russian page (https://habrahabr.ru/post/318572/) gave a bit more information that I could change the action to "list" (and better information on each of the commands in the webhelp, too) for most of those cmd's, and sure enough, I got a response for http://192.168.1.20/cgi-bin/jvsweb.cgi?username=admin&password=&cmd=webdevinfo&action=list :
It is amazing to me that such a cheap, "anonymous" camera has such a good picture, and yet such a lack of controls in that "dial home" tendency.
I decided to through a little more at these things, just to get a little more information. I tossed Nikto to the camera, and it identified that you can hit the /cgi-bin/ URI and it will list the scripts. They appear to be minimal, and two of them stood out. One was called "snapshot.sh" - and I immediately threw some shell escape characters trying to inject commands. Unfortunately, they actually did some sanity checking, and your maximum length to play with is a command about 4 characters long. Scratch that one off of the list.
The other script (ignoring the "proccgi" and "wagent" scripts) was called "jvsweb.cgi". A quick google, and someone said you can list video streams using this CGI in the form of :
http://192.168.1.20/cgi-bin/jvsweb.cgi?username=admin&password=&cmd=yst&action=get_video
Hrm. I wonder what else it can do? I tried some additional shell escapes on this, and it smartly refused to do anything else and just gave me a "param error". I dunno, maybe it tried to run it, but I couldn't get anything out of it (like a "%24%28cp+/etc/passwd+/mnt/web/cgi-bin/%29" [$(cp /etc/passwd /mnt/web/cgi-bin/)], though I didn't use a pipe on it). Another google with the cmd and yst added to the jvsweb.cgi, and I see a page referencing a "webhelp". That gives a list of options for the cmd parameter, and a very-high-level rundown of what they are for. It includes everything from modifying your white balance to configuring motion detection.There was also one called "webdevinfo". My curiosity was definitely piqued now. I tossed it in, and got a param error. A Russian page (https://habrahabr.ru/post/318572/) gave a bit more information that I could change the action to "list" (and better information on each of the commands in the webhelp, too) for most of those cmd's, and sure enough, I got a response for http://192.168.1.20/cgi-bin/jvsweb.cgi?username=admin&password=&cmd=webdevinfo&action=list :
{
"type": "ipc",
"hardware": "JVS-HI3516CS",
"firmware": "V2.2.2904",
"manufacture": "JVS-HI3516CS",
"sn": "S509233745",
"model": "ipc-module",
"channelCnt": 1,
"streamCnt": 3,
"ystChannelNo": [1, 2, 3, 0, 8, 0, 8, 0, 8, 0, 8, 0, 8, 0, 49316, 19032, 35896, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49048, 19032, 48912, 19032, 38256, 386, 45380, 16436, 2848, 16437, 200, 0, 2848, 16437, 0, 0, 0, 0, 16487, 50277, 16487, 50277, 45380, 16436, 49088, 19032, 1216, 19033, 2384, 19033, 63192, 16398, 49088, 19032, 16487, 50277, 45380, 16436, 60304, 375, 46392, 16436, 338, 0, 46392, 16436, 16487, 50277, 16487, 50277, 45380, 16436, 49144, 19032, 1216, 19033, 46392, 16436, 16487, 50277, 16487, 50277, 45380, 16436, 49168, 19032, 1216, 19033, 46392, 16436, 16487, 50277, 16487, 50277, 45380, 16436],
"name": "Camera",
"date": "2000-01-01 09:11:37",
"bSntp": 1,
"sntpInterval": 24,
"ntpServer": "192.168.1.1",
"tz": 8,
"bDST": 0
}
The product for these cameras is "JVS-HI3516CS". That matches the "dial-home-to-mamma" URL of it hitting "jovetech.com", as these are "Jovision" cameras. The HI3516CS seems to match a cheap, rebadge-friendly hardware producer named "Hisilicon". And, they sell an SDK. I might have to delve into the SDK to see if I can create a firmware that will override something, or give me another shell, but it is definitely a start. The ipc-module is interesting, to - it is an "IP Camera", modular manufacture system where you build the software you want around it, slap a pretty sticker on it, and ship it out.It is amazing to me that such a cheap, "anonymous" camera has such a good picture, and yet such a lack of controls in that "dial home" tendency.
Saturday, September 30, 2017
Tool Score - Gerstner Tool Box
Someone had listed a Gerstner and Sons tool box on a local classifieds website, complete with a few tools. It turns out that it was a model 42, in Oak. They listed it for $450, but I couldn't afford that. I offered $250, and we settled on $300. It was nearly theft on my part - the box alone goes for $350. I also picked up another set of inside micrometers (Millers Falls Company), outside micrometer (Starret, No. 224 0-4"), and a 5" Brown and Sharpe sine bar :
So, on to the tool box. It has definitely seen better days. I don't really want to refinish it, though. It is beautiful.
My biggest surprise was middle drawer that enclosed a 1940 10th edition of the Machinery Handbook (the bible for a machinist), with a hand written note that it was purchased in 1940. If it was purchased for this tool box, that puts the tool box into the same era.
Next, I did a little drawer organization. Starting from the bottom, I found end mills, cutting inserts, lathe bits, set screws, ball bearings, hex wrenches and boring bars. I also found a weird little measuring device that I am unfamiliar with :
Next one up had punches, chisels, files, pencils/pen, and a the usual marking supplies along with a demurring tool set :
The third drawer from the bottom had a few clamps, a 0-1" outside micrometer (Geo Scherr Company), a 1-2" outside micrometer, dividers, compass, a few needle points that I am unfamiliar with, and an old pin chuck :
Next, we'll tackle the left drawers. The bottom of the left side drawers contained some machinist jacks, v-blocks, clamps, and a little machinist vice. One cool thing out of that drawer was a portable oiler, shown in the middle of this next picture :
Next was a bunch of taps (some custom ground for specific purposes) :
And then, in the top-most drawer on the left side, tap wrenches and a few dies (along with a random chuck key). The cool thing was this tool box owner built his own die using a nut and either a mill or a drill :
Next, I went to the right side, starting from the bottom-misty right-handed drawer. It was full of center drills, drill bits for a chuck, and drill bits for a morse taper (1MT). It was just getting better all the time.
Next came with some solder, stones, o-rings, and some other odds and ends. I am interested to know who "Carla" was - written on one of the measuring rulers found here :
Two left! Next one on the right side was full of gear pitch gauges, feeler gauges, and other measuring tools. This owner was definitely organized :
One thing in this drawer I was unfamiliar with was a craftsman tool looking like :
So, onward and upward. The last drawer was filled with bushings, pins, welding tips, a couple of springs, and some rather weird stuff. It also had two pieces of what looked like part of a sine bar, and four small parallels :
Finally, to the top. This was a bit of a score in and of itself. There were two squares, three micrometer stands, a small micrometer, a small mechanical micrometer, angle finders, an alignment device (Tubalcain/mrpete222 called it a "wobbler", and I am not sure of the official name), parallels/gauge blocks, and some right-angle blocks :
Yes, I think I scored. For a grand total of $350, I ended up with four micrometers, three micrometer stands, rulers, alignment pins, drill bits, v-blocks, jacks, taps, dies, end mills, lathe cutting bits, inserts, set screws, dividers, and a host of other things I've already forgotten.
So, on to the tool box. It has definitely seen better days. I don't really want to refinish it, though. It is beautiful.
Next, I did a little drawer organization. Starting from the bottom, I found end mills, cutting inserts, lathe bits, set screws, ball bearings, hex wrenches and boring bars. I also found a weird little measuring device that I am unfamiliar with :
Next one up had punches, chisels, files, pencils/pen, and a the usual marking supplies along with a demurring tool set :
The third drawer from the bottom had a few clamps, a 0-1" outside micrometer (Geo Scherr Company), a 1-2" outside micrometer, dividers, compass, a few needle points that I am unfamiliar with, and an old pin chuck :
Next, we'll tackle the left drawers. The bottom of the left side drawers contained some machinist jacks, v-blocks, clamps, and a little machinist vice. One cool thing out of that drawer was a portable oiler, shown in the middle of this next picture :
Next was a bunch of taps (some custom ground for specific purposes) :
And then, in the top-most drawer on the left side, tap wrenches and a few dies (along with a random chuck key). The cool thing was this tool box owner built his own die using a nut and either a mill or a drill :
Next, I went to the right side, starting from the bottom-misty right-handed drawer. It was full of center drills, drill bits for a chuck, and drill bits for a morse taper (1MT). It was just getting better all the time.
Next came with some solder, stones, o-rings, and some other odds and ends. I am interested to know who "Carla" was - written on one of the measuring rulers found here :
Two left! Next one on the right side was full of gear pitch gauges, feeler gauges, and other measuring tools. This owner was definitely organized :
One thing in this drawer I was unfamiliar with was a craftsman tool looking like :
So, onward and upward. The last drawer was filled with bushings, pins, welding tips, a couple of springs, and some rather weird stuff. It also had two pieces of what looked like part of a sine bar, and four small parallels :
Finally, to the top. This was a bit of a score in and of itself. There were two squares, three micrometer stands, a small micrometer, a small mechanical micrometer, angle finders, an alignment device (Tubalcain/mrpete222 called it a "wobbler", and I am not sure of the official name), parallels/gauge blocks, and some right-angle blocks :
Yes, I think I scored. For a grand total of $350, I ended up with four micrometers, three micrometer stands, rulers, alignment pins, drill bits, v-blocks, jacks, taps, dies, end mills, lathe cutting bits, inserts, set screws, dividers, and a host of other things I've already forgotten.
Saturday, September 9, 2017
Generating Video Intros for Training Segments
Our company had some training. We are large enough that we have dedicated videographers and video editors, but they were unavailable. After recording the webex, we needed to break the videos into segments, and throw a header on each segment. That meant I had to generate some fancy-schmancy header that included a company logo, followed by the vendor logo, and then enough time to put segment-specific text. Here's how I built the header :
First, I generated four separate images I wanted to use. The first was "white". The second was the company logo on white. The third was the vendor logo and faded-company logo on white, and the last was both vendor and company logos faded on a white background. I called them "frame-01.jpg", "frame-02.jpg", "frame-03.jpg", and "frame-04.jpeg". I know, I know, fairly creative naming convention.
Next, I needed to create video segments for each of those. Seeing as how I love the open-source world, and I prefer Linux as my workstation, I ended up using a command line :
Once I had those videos and transition videos, I could finally assemble them into a single header video. This was done by creating a file with the file names listed in the following format :
First, I generated four separate images I wanted to use. The first was "white". The second was the company logo on white. The third was the vendor logo and faded-company logo on white, and the last was both vendor and company logos faded on a white background. I called them "frame-01.jpg", "frame-02.jpg", "frame-03.jpg", and "frame-04.jpeg". I know, I know, fairly creative naming convention.
Next, I needed to create video segments for each of those. Seeing as how I love the open-source world, and I prefer Linux as my workstation, I ended up using a command line :
ffmpeg -loop 1 -i frame-01.jpg -c:v libx264 -t 2 -r 30 -pix_fmt yuv420p -vf scale=1920:1080,setdar=16:9 01-white.mp4
ffmpeg -loop 1 -i frame-02.jpg -c:v libx264 -t 7 -r 30 -pix_fmt yuv420p -vf scale=1920:1080,setdar=16:9 02-company.mp4
ffmpeg -loop 1 -i frame-03.jpg -c:v libx264 -t 7 -r 30 -pix_fmt yuv420p -vf scale=1920:1080,setdar=16:9 03-vendor.mp4
ffmpeg -loop 1 -i frame-04.jpg -c:v libx264 -t 2 -r 30 -pix_fmt yuv420p -vf scale=1920:1080,setdar=16:9 04-faded-2_seconds.mp4
That gave me four separate videos. I wanted it to be fancy, so I thought I would use a fancy video editor to generate some cross fade/transition segments between each of them. I used Cinelerra. It is fairly complex, but you can do a TON of stuff with it. I could have done the entire video - but kept ending up at the command line because that's where I felt most comfortable with it. Anyway, I used that to generate transitions between the white and company videos, the company and vendor videos, and the vendor to faded videos. I also generated a fade from the faded to the white video, just so I could fade it back to white.Once I had those videos and transition videos, I could finally assemble them into a single header video. This was done by creating a file with the file names listed in the following format :
file '015-transition_from_white_to_intermountain.mp4'
file '025-transition_from_ihc_to_sav.mp4'
file '035-transition_from_sav_to_faded.mp4'
file '04-faded-2_seconds.mp4'
file '04-faded-2_seconds.mp4'
file '04-faded-2_seconds.mp4'
file '045-transition_from_faded_to_white.mp4'
After that, it was simply running the following command to assemble them into a single video file :ffmpeg -f concat -i files.txt -c copy saviynt-training_header.mp4
There was a small problem - my monitor resolution was a wee bit smaller than the 1920x1080 video I had generated. So, on a whim, I down-scaled that video into something smaller I could play as a preview :ffmpeg -i saviynt-training_header.mp4 -vf scale=720:480,setdar=16:9 saviynt-training_header-smaller.mp4
Not a bad days' work!
Subscribe to:
Posts (Atom)







