My Journey in Python (or any programming) as a non-Programmer

Python knowledge these days is kinda like a must. Because Python is everywhere and has many uses. Bonus points for you if you have this knowledge.

Disclaimer : This is my experience as a non-programmer learning how to program. My job has never been a Programmer.
I did Networks, Linux, Surveillance, VoIPs throughout my career but never been much into programming.

So I needed to learn Python. What did I do?

First I tried Video Tutorials, I watched a couple of them, Youtube Tutorials, bought some Udemy tutorials and so on. Giving 1 – 3 hours a day, I would complete each series in less than a week.
Was I able to program good enough? Of course Not! I had a basic knowledge and grasp about how functions work, how to use libraries etc. Not that the instructors don’t explain well, the instructors explained very well, I also coded along, but my point is, I had been missing a gap of real life programming.

Not satisfied, I moved onto READING beginners tutorials again. There were many tutorials with examples on how to use loops, data sets etc. Different instructors used different approach. I tried different IDEs, text editors. Theoretically, I thought I knew how to code, but in reality, I could not jump much higher than simple basic programs.

The thing about Python is it’s widely used different sets of applications. Python is everywhere. Realistically what you want to learn is Real life applications. You can start with printing out tuples and simple loops and operators, but eventually you need to jump onto the REAL codes. I mean the REAL CODES. Not just tic-tac-toe games.

So I decided what I wanted to learn. I wanted to build a small camera app. I have a knowledge about Cloud and CCTV networks so I thought I would build a program based on that. But I have to admit, I did not build apps from scratch.

What I did was I Reverse Engineered. I tried to get some source codes from actual working programs, I learned how they worked, learned what each buttons did, and I tried to break the code. Removed some lines, added some lines. Got some more programs, extracted bits out of it, combined in the first program. Installed Libraries and modules. Tried to compile and make them work.

I simply thought rather than myself writing buggy codes and spending hours and hours, its better to learn from more cleaner, well-written codes by more advanced programmers. The more I broke, the more I understood how each lines of codes worked. I thought that was a better learning curve, at least for me. (Again, as a non-programmer)

Maybe if you have ever been stuck on learning programming, you can try my approach. It will not make you the best programmer but it might get you somewhere where you can start. It may even be a short cut for you to become the best programmer.

Regards

Teza




















Wireless Troubleshooting on Linux (applies for Kali linux and Parrot OS) with Realtek chipset

After installing Parrot Security OS, I was not able to connect to wifi anymore. The reason being Parrot OS not supporting my laptop’s Realtek wifi chipset.

Long story short and get to the troubleshooting steps, that got me going.

ifconfig
See if your wifi interface is up, normally you should see a loopback interface, LAN interface and a WLAN interface.

lspci
Check your chipset model. Below is my wifi card. If you see something similar but WLAN interface is not showing up on ifconfig, then its most likely the driver issue.

03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter


Temporary internet connection
You will need an Internet connection
I know it sounds silly when your WLAN interface is not showing up, but trust me its alot easier to try to connect to internet first. Get a wifi adapter or an Ethernet cable to connect to the internet first.

Step 5 – Disable Secure Boot in Bios

reboot your computer, in Bios configuration, Enable Legacy and disable Secure Boot.
Save and Exit. Depending on your Laptop make, F key will be different. For HP, it is F10.


Git Clone driver for Linux
sudo git clone https://github.com/tomaspinho/rtl8821ce

change to download folder
cd rtl8821ce

Change permissions
chmod +x dkms-install.sh
chmod +x dkms-remove.sh

Run the Installer

sudo bash dkms-install.sh

Reboot your computer

Different ways to run Linux for non – linux users

For many users out there, Linux may not be their main OS.
This may be because of a few reasons –

Most computers you buy come with Windows Pre installed.
Your Job offeres you a laptop with Windows OS pre installed.
The worst of all – Intimidation (probably seen codes and command lines and dont know what they are all about)
Linux is not very hard indeed. These days, there are different Linux distributions that looks alot like Windows interfaces.

And the best of all, unlike Windows, Linux is highly customizable.

These are the few ways you can run Linux

  1. Fresh install on Standalone computer
  2. Dual Boot alongside another OS
  3. Virtual Machines such as Virtual Box or VMWare or Windows Hyper-V
  4. Windows Subsystem for Linux
  5. Cloud instances
  6. Live images


1. Fresh install may not be an option for beginners. There may be issues with drivers and pre configs, backups etc – depending on the Linux distro you want to use.
There are some hardware that come with Linux pre installed. Like System 76. Its got PopOS and I hear good things about those devices.

2. Dual boot although dual boot is my preferred choice of installing, you may need to consider hard ware limitation, legacy support, bootloader etc. This may be for more advanced users.

3. With Virtual Machines, you are sharing resources with host machine. There are different Virtualization engines out there. You can simply install one, download the Linux image and run on it. It may be one of the easiest way when you start to migrate to Linux.

4. WSL provides a Linux-compatible kernel interface developed by Microsoft and allows a user to chose a Linux distribution to install from the Microsoft Store. Since it can be easily downloaded from Microsoft Store, within a few clicks, you can try a taste of linux.
If you try to locate the path, C:\Users\AppData\Local\Packages\YourLinux, you will get a better idea of what its doing. You will also not find wireless interfaces in WSL. So you will need an external wifi adapter for doing some wifi tests.

5. Cloud VMs. If you are already using some cloud services, which in these days many offices are, you may be able to try installing cloud instances and try linux there.

6. Most modern Linux distros these days come with Live images. you can install it on any USB device, and plug it into your laptop and try your flavor of linux before you are actually installing it. It may be the easiest way to try out different flavors of Linux.


Regards
Teza

Changing DNS in Linux

For whatever reason, you want to change your DNS, you need to change it at resolv.conf

First change your directory to /etc.
cd /etc

if you type in ls -l, you will see resolv.conf file.

you have to sudo or su to make changes

sudo nano resolv.conf

if there is existing dns, you can hash it out. Just put # in front of the address

and then type in the new nameservers

you can use openDNS, Googles DNS or any DNS that you prefer.

OpenDNS 1: 208.67.222.222
OpenDNS 2: 208.67.220.220

ctrl + O
Enter

ctrl +x

Apply for $300 AWS Credit with AWS Proof of Concept Program

Yes Amazon is giving away $300 credit with Proof of Concept Program.
Read on below from AWS and see if you are eligible for the application.

Amazon Web Services wants to help your business scale and grow with low cost, easy to use cloud products and services.  The AWS Proof of Concept Program provides a $300 credit to small businesses to quickly get started and test AWS against their specific IT and business requirements by subsidizing a proof of concept. More than a million active customers, from Slack to GE, use AWS Cloud solutions to deliver flexibility, scalability, and reliability. Join them and start scaling your business with AWS today.

To qualify, you must have:

  • A valid AWS account, with up-to-date billing information 
    (reseller accounts do not qualify)
  • Not previously received more than $200 of AWS promotional credit
  • A sufficient business case and proof of concept to test using the credits
  • No linked accounts
  • Credits valid for 6 months

Cannot Delete S3 Buckets using Root Access

Lately, I have been doing some testings with AWS Elastic Beanstalk and came across this issue where I could not delete the S3 bucket even with my root account.

It comes up with the message saying

"Insufficient permissions to delete bucketAfter you or your AWS admin have updated your IAM permissions to allow s3:DeleteBucket, choose delete bucket"

The solution is to change the bucket policy.

Continue reading “Cannot Delete S3 Buckets using Root Access”

Using Proxy Chains to tunnel traffic over network

First, install proxychains.

sudo apt-get update -y

$ sudo apt-get install -y proxychains

$ locate proxychains

Then change the config files. The config files are in the code below.


$ nano proxychains4.conf

If you wish, you can add more proxy address.
At the bottom of the conf file, add your proxy addresses.

Format should be
proxy type IP address Port Username password

Example socks5 101.2.3.123 12356

There are many websites which you can find proxy addresses. just search for socks proxy.


Use dynamic chain and link it with Tor
All you need to do is just unhash the lines that you want to enable.

$ service tor status

$ service tor stop /start

$ proxychains4 curl ipinfo.io/city #this will tell you where your current location is. Check this first to make sure you are hidden.

Now you can browse securely.

$ proxychain firefox google.com

You can also use proxychain with other services. You just need to run the proxychain command first.

Example proxychain nmap 213.12.123.12

Continue reading “Using Proxy Chains to tunnel traffic over network”

Launching EC2 Instances on AWS

After reviewing my video, when i was first accessing my DB instance from my local server, I could not access and the reason was because of the internal IP. 😛 what was I thinking, anyways its just a demo video so I hope you can forgive me with that.

Anyways, more video tutorials to come. Please like and subscribe. That will motivate me to create more videos. Cheers

Continue reading “Launching EC2 Instances on AWS”

AWS Virtual Private Cloud Setup

This is my Video tutorial on how to manually set up Virtual Private Cloud VPC on Amazon AWS.
This will include setting up, VPCs, Subnets, Internet Gateways, Security Policy etc.

If you like this video and want more contents like this, please like and subscribe.
Why not! Its just one simple click and you will not lose anything!

Continue reading “AWS Virtual Private Cloud Setup”

No Package MYSQL Server Available

If you have come across an issue of installing sql server on AWS Linux AMIs, especially when you are using one of those Free Tier Eligible AMIs, well its very likely that this is the solution for you. I came across this issue and got me stuck for a little while before I found the solution somewhere on the net. The problem is that the AMIs that you are using may not have the default repos in it.

Continue reading “No Package MYSQL Server Available”