Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday, September 12, 2020

Creating an Access Point with a Raspberry Pi Model b (Original RPi) and a TP-Link TL-WN725N v3

I had to be very specific on the title because I am unsure if this will work with other models or versions but in theory it should, it all should, but that is the same thing I thought when I was doing this.

This was done with a fresh Raspberry OS install and no additional configurations, I have an ethernet connection and the adapter (TL-WN725N v3) which was being recognized and seemed to work fine, could get a connection established but something was funky and I could not figure it out.

After much trial and error (saving you time here) I found out the following documentation:

https://www.raspberrypi.org/forums/viewtopic.php?uid=81098&f=28&t=62371&start=0#p462982

From the above link there is a way to get the appropiate version of the driver (8188eu) which eluded me for a while (don't judge me, I tried my best here and thought the one that came with the Pi worked fine).

Here is a link that takes you directly to the drivers, in order to know which one is the right one for you do uname -r in the CLI to figure out your version: http://downloads.fars-robotics.net/wifi-drivers/8188eu-drivers/

Got that done? Good, now go and get yourself rasp-ap, a Web GUI to configure the RPi as an AP or AP-STA without having to do it all by your own, note that this is working through HTTP so you may want to get this working out with HTTPS through the command provided in the same website almost at the bottom: https://raspap.com/

If everything is good all should be green and up, don't forget to reboot for good measure.

For personal good measure I dropped port 80 (for HTTP) in the iptables because it would seem like HTTP continues to work regardless if you have the certificate or not, also the port doesn't change anything aside from the port in which you would be connecting to be it HTTP or HTTPS, doesn't mean it will switch over and drop the HTTP connection.

Hope this helps!

Additional Note:

When the Kernel version is updated on your RPi remember to update the version of your driver from the fars-robotics.net website, if you upgrade and eventually restart this will stop working.

Friday, September 4, 2020

Compiling NXLog CE 2.10.2150 and the dreaded -lcrypto error

Just two days was the time I had to mess around with to figure out what the problem was, sometimes this is not intuitive but it goes to tell you to be careful in what you are doing and what packages you are using to compile.

For whatever reason this worked in CentOS 7, which intrigued and bothered me at the same time because I had done this in Debian.

Now you may be wondering, why would you need to compile it in Debian? Because I have two Raspberry Pi which I use to capture and move logs around, so right now I am intrigued since I know this can be done.

My main issue was an error that mentioned -lcrypto not found, but I have the ssl dev package installed, what gives?

No, turns out I had the wrong package installed and there is no reference to this anywhere, I even compiled OpenSSL from the source code to test this out.

So to cut this short, this should be the list of packages you need to compile this from source in Debian or Ubuntu at the 2.10.2150 version.

If you got any problems with that let me know, also remember that you may need to add contrib and non-free to your repositories.

Debian Compilation of NXLog

apt install build-essential libapr1-dev libpcre3-dev libssl1.0-dev libexpat1-dev

Tuesday, March 19, 2019

Recovering damaged videos with untrunc

This is more for personal reference but I know someone somewhere will need this and I want to have it here as a light house because this was a pain to figure out.

There is an application called untrunc which can help recover a damaged video file as long as you have another file that was produced by the same device, in my case I am recording playthroughs and this is happening because the hard drive is giving out on me for random reasons, I can't ask much from a hard drive that has been in use for more than 8 years.

untrunc can be found here: https://github.com/ponchio/untrunc in its original form and an improved version here: https://github.com/anthwlock/untrunc

The one from anthwlock is the one that worked for me, the one from ponchio would not compile no matter what I did, for reference this was done both in Debian 9 and 10.

Once I followed the steps from anthwlock I had it installed, I added it to /usr/bin and I ran first the following command:

untrunc -v (good video) (bad video) because as it was the thing would not go through, I did not understand why though so -v told me that there was an issue with consistency, because the first video was larger than the second, how did I go around this? By using -a and -s so it looks something like this:

untrunc -a -s (good video) (bad video)

You may get a ton of prompts telling you if it's OK to continue, go ahead and from there you should be able to recover the damn thing, go at it, edit it and have fun!

Sunday, May 27, 2018

Figuring out Node.JS with Debian, a never ending journey

Many years ago I decided to switch over to Linux as my personal OS, in particular because I did not feel like buying a computer every so often and also because I did not have the money to upgrade to a considerably new machine (nowadays I still don't have the spare money to do that but from time to time I find parts that I either use to upgrade what I have or store them to build something better).
I played around with many Linux Distros (ranging from Fedora and Ubuntu to Debian and Mandriva) but ended up landing on Debian 5, to my luck Debian 6 was released a few days after I switched over to Linux and I could finally get some of the issues out of the way for some basic stuff that I needed back then (namely Dropbox), from there on I have worked with Linux at home for what would now be 7 years but I had played with the idea of working around with Linux since 2004 during which I found it quite complicated (I believe it was Mandrake that I was trying back then and eventually Slackware but neither seemed compelling to me).
From time to time I keep finding the odd Linux error which has a solution somewhere on the internet, in other instances I am confused and must work on compiling something to make either an old package work or some obscure program run on my machine.
Another thing I have learned during my tenure with Linux has been web programming (PHP and MySQL) and some scripting with Python mostly but also some Bash, these have helped me a lot on previous jobs and I have come to notice that knowing these I could put them into more practical use than whatever my work is requiring of me, such as getting a small website up and running to have presence on the internet aside from the blogs and YouTube account I currently handle, by chance I found some Web Programming books on Humble Bundle and a book caught my attention immediately, Working with Static Sites by Raymond Camden and Brian Rinaldi. If memory does not fail me static sites are a thing of the past, but I was very intrigued on trying this out and I have not been disappointed so far as my curiosity with Node.JS, ReactJS and other modern languages continues to intrigue and elude me (as I do not currently hold a position which requires me coding all the time I am not up to date with much of the things web related).
I found a problem when starting some of the tests, I decided to install Node directly from a repository and when updating or installing new packages through npm it would not work, intrigued as to why I would need sudo all the time I started looking around and found that this was an issue in how npm was handling everything and that nvm was the solution for my problem.
After downloading the latest version of nvm and easily installing it I proceeded to update npm to the latest version (npm install -g npm <-- This intrigues me, the fact that there is no command to directly update npm amuses me), finally installed harp (which was throwing a fit about a bunch of stuff not working and node-sass not installing because using sudo would break it and not using sudo would tell me there was an error during the process).
After I had done this I noticed it would not work, intrigued I checked one of my virtual machines, repeated the latest steps and got it to work without an issue, went back to my machine and remembered that I had installed through a repository so I removed it manually from the sources.list file and removed the package, with this I could finally get harp to work and show me the initial website from the default template.

Friday, September 21, 2012

Slitaz = Life Saver

Well it has been quite a while since I wrote on this blog and that is probably because I never found the special need to do so, be it for whatever reason.

Today I had the chance to toy around with a Toshiba Laptop built somewhere around ´99 or 2000, Pentium III Proc @ 450 MHz and 64 MB of SDRAM, which I tried upgrading but didn´t work, and a superior 6 GB HDD. This, laughable as it may seem to some, was my perfect choice for a school laptop, as I need to write a lot and my old T60 is gone now, forever, which left me with my bare hands... yeah, no.

So I was playing around with this thing and I tried different Distros in it with no success, Debian 6 and 7 RC 2 were not working at all, as a matter of fact I couldn´t connect to the wireless network as it uses WPA and the Debian installer only allows WEP; PuppyLinux was just doing bad, probably because the video card ranges somewhere around 2 to 4 MB, maybe even less; I wasn´t doing DSL, I didn´t do DSL; Knoppix was also out of the question; Crux, which is a Distro I learned about from K. Mandla, wasn´t working either and I have no other laptop at hand to do the whole "transfer this to the faster one then finish the fight on the slower one", too much hassle and not enough resources; then came SliTaz and everything somehow changed.

You see, with all the other Distros I wasn´t getting anywhere, at all, and the furthest I managed to get through was with Debian 6 but yet again that didn´t go far with the PCMCIA Wireless Card, take note that this laptop has no internal wireless or ethernet, keyword, NO, ETHERNET.

BOOM, HEADSHOT!

Back to SliTaz. I give it a try, at first I´m not sure why it won´t boot in some modes, then I discover it is because of the video card, so I just let it roll and get to console, good, this thing boots at blazing 8 to 5 seconds, I am impressed but I need to find a way to get this working on the hard drive itself and get rid of the CD thing.

So I look around for instructions and find that it was easier than I expected, no compiling was required and only some slight tweaking here and there, including formatting the hard drive and what not, did everything for me. Copy this and move it here, mount that, unpack this, everything goes smooth even though I have to work with Vi, nothing against it but man I´d rather have Nano anyday.

So the thing boots, IT BOOTS, but it goes into this horrible twisted screen that could be a surrealist painting. It kinda looked alive but I wasn´t sure... so in the end the video was still screwed up.

Solution?

Console mode. By adding a single screen=text to grub it all worked juuuuuuust as I needed it, this whole adventure actually started because I needed a system that would run a console system not a GUI based system so this is what I got in the end and this is what I wanted, it was a win-win situation for everyone as the guy who put it in the office wasn´t really looking forward to seeing it coming back.

Sunday, May 15, 2011

That was odd...

Well the patient shows strange behaviours that I thought were related to Windows, in some way it is, but here is what happened.

Windows XP on a SATA HDD won't boot up... Windows Vista on SATA won't boot up... I couldn't install Windows XP on an IDE drive... Debian 6 booted up just fine...

Conclusion?

There's either some incompatibility issue going on or the motherboard has a problem with SATA, period.

The desktop was sadly returned to its owner with no true solution aside from going for Linux or Windows 7, yet again no guarantees on the functionality of Windows 7 though, or backing the information up and sending it over into another PC.

Sad but true, some PC's don't like windows at all!

Saturday, May 14, 2011

Linux Tip: Oracle Virtual Machine

If you're trying out a VM, Virtual Machine, go for Oracle Virtual Machine.

So far the only issue I've ever really had was trying to install Puppy Linux, which is a known issue, and some resolution issues but well that has something to do with the VM Guest Additions, if you don't install it you can get good resolution but the integration won't be available which makes it a little harder to be working around with it.

Friday, May 13, 2011

Addendum: 3 things we think our PC can do, but it can't

I'll add my part on what Brian said on the previous post.

First off, he's right about computers not been able to think for you, they're handle mathematical operations and are waiting for an input which in turn will transform into an operation the computer can handle to give you the result that, most of the time, you're expecting.

He's also right about cleaning up, most people will never clean their computer and it turns them into a nasty infection hold that could not only affect your computer but also your health. Clean it once in a while and also remember the clean software that you don't use in your computer, defrag it every once in a while and if you feel that ain't cutting it then back everything up and go for a format, which I've always said has to be done approximately every year but I'll speak more about it on another post.

Here's the most important part to me and I'll quote Brian on it "an average user won't need more than 720GB and 4GB RAM on their PC."

This is exactly what I've always told people and that's why I went for Linux. Let us go hyphotetical here for a minute or two.

You got this old junker stored, let us say we're talking about that old PC I've talking about recently, and you suddenly get this crazy idea to get a new computer because this one won't cut it anymore with XP, Vista or 7. Question here is, do you really need a new computer?

What are you doing with it?

The average PC user will only go into his computer to check his e-mail, read the news, check pictures of cats or maybe their grandchildren as cats, make some documents, check Wikipedia or Google for some info you'll need for a work, etc.

These are pretty basic functions and you don't really need the latest and greatest for this task, you don't need a Lenovo W500 for this or the latest Apple product, your old one, if it's not broken, will just work fine people so do yourself a favor and save the planet, save some money on your pocket, because on this time and age we all need it, and you won't need to pay additional money for licenses and whatnot, OK I know most of the planet pirates their stuff but come on people give it a chance.

So in brief, save the planet and save some money to your pocket. Key words. Get that old PC or laptop out of the closet and get it working again, it won't be the latest or greatest, probably won't be pretty, but yet again you're doing a favor to the planet in which you live. It's not that hard to get Linux to work on a computer nowadays and Ubuntu is really friendly on it but I'd recommend going for Xubuntu if you know your PC has been in a cave for the last 10 to 15 years.

Monday, May 9, 2011

Me and Bluetooth

Some will actually bash me for saying this but I despise Bluetooth.

I've never liked it, never actually have owned that many things with Bluetooth anyway aside from a headset and a couple of phones here and there.

Last experience I had was back when I was using Windows 7 and it occurred to me to get a Bluetooth dongle for my ear-piece so I could chat while I was playing or writing. Back then it sounded like a cool ideas, which it was actually up until the installation.

Apparently the program that I got back then with the dongle had some sort of data license which only allowed me to do so much with it and I had to pay some such amount of money to use it.

I was not paying a single cent, why?

Because I already bought the damn thing, most phones have it integrated for the love of god, or whatever entity or thing you believe in, why do I need to pay an additional amount of money?

I forgot about it, completely, and it just occurred to me the other day to try it out with Debian thinking, what's the worst that could happen. Worst thing that happened was that it took a bit to sync with my phone and ear-piece but aside from that I had no problem at all and most importantly I didn't pay a single cent for it. Now isn't that great?

I'll personally have to thank the volunteers at Debian for this one and for actually peeking my interest again into Bluetooth technology.

Cheers!

Friday, May 6, 2011

Recommendation of the Week: Dropbox

From way back in the day someone, a real enthusiast of Open-Source software, had recommended that I should try Dropbox for cloud storage and I recall telling him that he was mad as hell if I ever thought of trusting someone with my information.

That was when Dropbox had just recently popped into the market.

Just recently, approximately 4 months ago, I decided to give Dropbox a try and I was surprised to see a 2 GB free option that could literally synchronize with every major OS and Smart Phone on this side of the planet.

The reason I mention this is because back then I was working as an IT Manager at a College and my computer was so resource limited I had to go for Linux, Debian with XFCE as a matter of fact so you can get an idea of how limited I was but putting it in Windows terms let us say that running Windows 2000 was my closest option to a stable and fast OS.

Back then I had this need to have files available on my computer back home, running Windows, and my computer at work, running Linux, and doing so with a USB was becoming a drag since I didn't want to lose important information, which has happened to all of us at some point, so I needed an alternative to this.

And I asked this friend of mine who reminded me Dropbox was an option and I can honestly say that so far it has been the best backup/cloud sharing software I've tried and believe me I've done several like Norton Ghost or Acronis up to Tape Backup, Zip Drive and USB and none had come in as easy as Dropbox.

Literally, just drop it on the folder and it synchronizes and you're done. It will appear on other computers you add to synchronization.

Best of this is that you get an additional 250MB when you finish doing the introduction steps and an additional 250MB for every person you invite that finishes doing their introduction to Dropbox.

So there I had it, Windows PC, Linux PC and my Blackberry, I had the files even on the go!

Only issue I ever had was trying to compile from source on Debian 5 but as soon as Debian 6 came to play, a month later after I began to use Linux as matter of fact, I just needed to install two more packages and I was ready to run the thing or even better, if you're running a console only box then you can use the script that they provide you, add it to the startup and as soon as you confirm you want to synchronize the PC it will do so. Neat!

Give it a try, you won't be dissapointed!

Sunday, March 27, 2011

And we're better off now!

Last tuesday drew the final line with Windows 7 and the Microsoft Windows line in general. I've used Windows during my entire life and I've transitioned from Windows 3.1 up to Windows 7, learning a fair amount of tricks, but I've grown tired of bloatware and in general Windows tendency to lose compatibility between versions.

Yeah I'm probably an old dog, not that old though, but those are the little details that piss me off... and the drivers which is what took me to fly into Linux and say good bye to Windows.

This bad boy over here is an IBM/Lenovo T61 running an Intel Centrino Core Duo at 2.0 Ghz, 2 GB of DDR2 PC-6700 and a 500GB Hard Drive, which I got from somewhere else. Even though modest in this time and year, considering these were built back in '05. Interestingly this machine had issues running Windows XP, I somehow felt there was something wrong, and even though I went for Windows 7 it still felt the same way and it wasn't until at work, while trying to fix a T500 I had been assigned, I realized that the T60/61/500 line had SERIOUS problems with driver compatibility. So bad it was that if you tried to format the computer with a Windows XP CD it wouldn't let you and if you didn't have the recovery discs then you were in for an ugly ride until you yet again realize you have to mess around with the BIOS to get it working and then after the install is done you have to mess with it again... not cool Microsoft/IBM/Lenovo. And I'm not going to talk about my experience with Windows Vista and the T500, believe me I have NOTHING good to say about it.

So it all comes down to this, Linux. I had intended to do this transition earlier but for X or Y reason I just wouldn't, OK I procrastinated, but in the end it is a change I don't regret at all. In comparation Debian 6 "Squeeze" is running way smoother with the Gnome interface at a noble 300~ MB when it has completely finished booting up into the Desktop, after 30 seconds, which in no way was happening with either XP or 7. Oh joy, Windows Security Updates, Windows Driver Updates, Windows Something Updates, sorry what's that? 300MB patches? Windows Genuine Advantage Mathingy? Resource Hogs at the turn of every corner?

Things like that always made me cringe in terror but fortunately that's all in the past and if I ever need to run anything I just go for WINE or fire up the Virtual Machine which contains an original version of Windows XP. And for those telling me that's not true remember that all branded PC's contain a label with the key and I'm using mine for the VM XP so Microsoft can go and kiss my ass with their retarded policies.

And as a final note the only issue I had with Linux was the Wireless Driver which took me around 5 minutes to find, which unfortunately with Windows XP was a whole different story because the property drivers are NOT included in the installation disc which literally consists of most components in the laptop except for the motherboard, monitor, keyboard, mouse and the USB hubs... aside from those it could vary and if you weren't using a Windows XP SP3 CD then you weren't going to find the Hard Drive, EVER, since there were no SATA drivers included or if you found 'em it was minimal.

Yes Microsoft, quite a joyful time I had with your operating systems...

Installing OSSEC 3.7.0 on Debian 11 (Bullseye) How-To

Now that version 3.7.0 has been released I took another deep dive into how this is compiled from Source, as usual I brought this onto me bec...