Posts

MySQL - Get size of table

Get the Size of all tables in a database

select table_name, round(((data_length + index_length) / (1024*1024)),2) as 'size in megs' from information_schema.tables where table_schema = 'the_name_of_my_db';

Get the Size of a specific table in a database

select table_name, round(((data_length + index_length) / (1024*1024)),2) as 'size in megs' from information_schema.tables where table_schema = 'the_name_of_my_db' AND table_name = 'the_name_of_my_table';


The name "table_schema" is a bit misleading, in fact  you have to specify the database name.


REFERENCES: https://mikewilliamson.wordpress.com/2009/11/27/mysql-tables-calculating-size-on-disk/

Vulnerability Scanning - authenticated scan vs unauthenticated

Imagine you have the choice between opening a box and looking inside, or shaking and prodding it from the outside to guess what it may contain. Imagine further, that if you are unable to successfully guess the contents of the box, something bad may happen, something damning, damaging or dangerous. Which of the two choices would you decide to take?
Unauthenticated testing alone will not fully simulate targeted attacks on your application or system. Although unauthenticated scans will show weaknesses in your perimeter, it will not show you what the attacker will exploit once breaching your perimeter: weaknesses within your network.
Authenticated scans allow vulnerability scanners to use privileged credentials to dig deeper into a network and detect threats around weak passwords, malware, installed applications, and configuration issues. They are able to simulate what a user of the system can actually do. By finding and fixing internal security holes, you can prevent an attacker who breac…

Profitable SaaS Ideas

The way to get profitable startup idea is not to try to think of startup ideas (including SaaS development). It's to look for problems, preferably problems you have yourself.

In fact, for many entrepreneurs, successful business ideas start out as solutions designed to address a challenge they face personally. Solving the problem that frustrates you may be one of the best ways of finding an idea for your startup. Look at these software developers who turned their problem into success.


REFERENCE : TOP SOFTWARE DEVELOPERS SHARED HOW THEY CAME UP WITH PROFITABLE SAAS IDEAS , https://belitsoft.com/php-development-services/saas-ideas-startups

Install fortune & cowsay to give some life to your terminal

I have tested on Centos 7

yum install cowsay.noarch

yum install fortune-mod.x86_64

[root@localhost ~]# vim .bash_profile
Add the following line
fortune | cowsay


Let's try it.


[vicky@localhost ~]$ su - Password: Last login: Fri Aug  3 18:21:46 MUT 2018 on pts/2  ____________________________________ / Be consistent.                     \ |                                    | \ -- Larry Wall in the perl man page /  ------------------------------------         \   ^__^          \  (oo)\_______             (__)\       )\/\                 ||----w |                 ||     || [root@localhost ~]#

You can't add both CNAME and TXT to the same subdomain

I was a bit surprised to learn about this while processing the request of a customer.

Here is the reason why

"If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different. This rule also insures that a cached CNAME can be used without checking with an authoritative server for other RR types."


REFERENCES 

https://stackoverflow.com/questions/34613083/cname-and-txt-record-for-same-subdomain-not-workinghttps://tools.ietf.org/html/rfc1034

Deploy your own mail hosting with Mail-in-a-Box

Mail-in-a-Box lets you become your own mail service provider in a few easy steps. It’s sort of like making your own gmail, but one you control from top to bottom. Technically, Mail-in-a-Box turns a fresh cloud computer into a working mail server. But you don’t need to be a technology expert to set it up. The box also includes: automatic DNS configuration, spam filtering,greylisting, backups to Amazon S3, static website hosting, and free TLS (SSL) certificates from Let’s Encrypt.
Your box can host mail for multiple users and multiple domain names. It implements modern mail protocols (SPFDKIM, and DMARC) and the latest security best practices, including opportunistic TLS, strong ciphers, and HSTS. When enabled, DNSSEC (with DANE TLSA) provides a higher level of protection against active attacks. Exchange ActiveSync is also available as a beta feature. It has web based interface for administration and features RoundCube webmail as client. Really swiit 😊
Check it out !!
Official Website …

What is SELinux

SELinux is a security enhancement to Linux which allows users and administrators more control over access control. Access can be constrained on such variables as which users and applications can access which resources. These resources may take the form of files. Standard Linux access controls, such as file modes (-rwxr-xr-x) are modifiable by the user and the applications which the user runs. Conversely, SELinux access controls are determined by a policy loaded on the system which may not be changed by careless users or misbehaving applications. SELinux also adds finer granularity to access controls. Instead of only being able to specify who can read, write or execute a file, for example, SELinux lets you specify who can unlink, append only, move a file and so on. SELinux allows you to specifby access to many resources other than files as well, such as network resources and interprocess communication (IPC).
Reference: https://selinuxproject.org/page/Main_Page