Skip to main content

Posts

Showing posts from August, 2023

Redis

 What is Redis? Rdis is a database, most specifically it is NoSql database. Definitely not similar to other NoSql databases like Mongos and NoSql. Note that redis don't have idea of tables and documents. All data stored in key values pairs in JSON format. Other Databases run in disk but redis run/ work in RAM thats why it is incredibly fast. It run on top of other traditional databases. Fastly to get data from it. This storage is not persistance storage mean dta lose if system crash or turn off, therefore is is use for caching.  Before start redis service in redis Before start redis service set Linux Kernal overcommit memory to 1 by adding  vm.overcommit_memory = 1  to  /etc/sysctl.conf  file. Why we should do that: As we know redis is in memory data store. It primarily uses RAM to store data. Redis and other processes use RAM memory. We set vm.overcommit_memory = 1 to make sure Kernal not overcommit the memory by allocating memory to new program which requ...

Different nature of attacks in cybersecurity

 1. The Persirai botnet In 2017, an Internet of Things (IoT) botnet, Persirai, targeted over 1,000 different models of Internet Protocol (IP) cameras, accessing open ports to inject a command that forced the cameras to connect to a site which installed malware on them. Once the malware was downloaded and executed, it deleted itself and was therefore able to run in memory to avoid detection. Over 122,000 of these cameras from several different manufacturers were hijacked and used to carry out distributed denial-of-service (DDoS) attacks, without the knowledge of their owners. A DDoS attack occurs when multiple devices infected with malware flood the resources of a targeted system. The IoT is connecting more and more devices, creating more opportunities for cybercriminals to attack. 2. Equifax Inc. In September 2017, Equifax, a consumer credit reporting agency in the United States, publicly announced a data breach event: Attackers had been able to exploit a vulnerability in its web a...

Technical terms and their meaning in IT, Security.

 Infringing on your privacy and potentially causing serious damage to your reputation. Meaning: آپ کی رازداری کی خلاف ورزی اور ممکنہ طور پر آپ کی ساکھ کو شدید نقصان پہنچانا۔ identity theft شناخت کی چوری vandalize an organization’s website by posting untrue information غلط معلومات پوسٹ کر کے کسی تنظیم کی ویب سائٹ کو تباہ کرنا organization’s reputation and credibility تنظیم کی ساکھ اور ساکھ online vandalism can portray unprofessionalism آن لائن توڑ پھوڑ غیر پیشہ ورانہ پن کو پیش کر سکتی ہے۔ infiltrating organizations دراندازی کرنے والی تنظیمیں remain vigilant so that you don’t become the next victim. چوکس رہیں تاکہ آپ اگلا شکار نہ بن جائیں۔ The term 'script kiddies' emerged in the 1990s اسکرپٹ کِڈیز کی اصطلاح 1990 کی دہائی میں سامنے آئی amateur شوقیہ  commit sabotage on behalf of their government. اپنی حکومت کی جانب سے تخریب کاری کا ارتکاب کرتے ہیں۔ wreaking havoc on their computer systems and networks. ان کے کمپیوٹر سسٹمز اور نیٹ ورکس پر تباہی مچا رہے ہیں۔ Iran’s nuclear enrichm...

How the PHP MVC pattern works and how requests are processed within a PHP framework

 H ow the PHP MVC pattern works and how requests are processed within a PHP framework. While I can't watch the video directly, I can certainly explain the concept based on your description. In the context of a PHP MVC (Model-View-Controller) framework, here's a general explanation of how the request handling process works: Initial Request Handling: When a user makes a request to your web application, the request is usually directed to a single entry point, often referred to as index.php located in the "public" directory of your project. This entry point is responsible for initializing the framework and kicking off the request-handling process. Front Controller Pattern: The index.php file acts as a front controller, meaning that all incoming requests are directed to this single entry point. This is a common architectural pattern in web development. The front controller's responsibility is to analyze the incoming request, decide which controller should handle it, ...

OOP concept in php

Abstraction Abstraction is the key concept in OOP language. Its main goal is to handle the complexity by hiding the unnecessary details from the user. What does it mean. We drive car? Yes. For driving car is we need to know how engine works, how gear box works and how music system work? No, because these are very complex things to understand. It the mechanical engineer/ technician duty to deal with them. For end-user perspective user/driver have to focus on how to drive car / How to shift gear and how to play music using control panel. Now come in programming/coding terminology It is  high level  representation of  object and concept of what is doing rather than how it doing. In simple words abstraction help you create a simpler and easy representation of  something complex.  Let say we want to build system to manage different types of vahicle Now all vahicle a have some common characteristics like branding, manufacturer and also have specific characteristics, p...

What is service provider and service container and what it is use for?

 What is service provider and service container and what it is use for? What we need to understand the work flow (life cycle) of laravel than we can easily understand the concept of service provider and service container. Step1: Entry Point Laravel entry/start point is from public folder index.php file. It do two main thing 1) It loads composer 2) it make object of app.php class in bootstrap folder. Step2: Make Instance/Objects of all service provider. These are basic building blocks means core files  of laravel. What are those core file? Go to config folder and find app.php file. In this file you will find and providers array which contain all the service classes names and their path. These classes are use to function our laravel application. e.g cache, cookies, mail, notification , queue and many more. Laravel also allows us to make our custom Service-Provider. Command: php artisan make:provider ProviderName After that we need to register that provider in app.php file in pro...