<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Basics | Ukant Jadia</title><link>https://ukantjadia.github.io/tag/basics/</link><atom:link href="https://ukantjadia.github.io/tag/basics/index.xml" rel="self" type="application/rss+xml"/><description>Basics</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Mon, 30 Dec 2024 14:15:59 +0530</lastBuildDate><image><url>https://ukantjadia.github.io/media/icon_hu5e29e1df12b63ca0c9252c8db4842f1b_8915_512x512_fill_lanczos_center_3.png</url><title>Basics</title><link>https://ukantjadia.github.io/tag/basics/</link></image><item><title>A Beginner's Guide to DevOps with Terraform and GitHub</title><link>https://ukantjadia.github.io/project/devops-journy/</link><pubDate>Mon, 30 Dec 2024 14:15:59 +0530</pubDate><guid>https://ukantjadia.github.io/project/devops-journy/</guid><description>&lt;h1 id="a-beginners-guide-to-devops-with-terraform-and-github">A Beginner&amp;rsquo;s Guide to DevOps with Terraform and GitHub&lt;/h1>
&lt;p>As a fresh graduate in Computer Science and Engineering, my exploration into the world of DevOps has been nothing short of an enlightening adventure. Coming from a machine learning background, I often found myself compelled to understand how backend systems could be crafted with such elegance. This curiosity fueled my capstone project, where I aimed to create a CI/CD pipeline that elegantly demonstrated the power of tools like Terraform and GitHub.&lt;/p>
&lt;h2 id="what-is-devops-and-why-is-it-important">What is DevOps and Why is it Important?&lt;/h2>
&lt;p>DevOps blends development and operations, aiming to minimize the distance between these two traditionally siloed groups. The goal is to improve collaboration, increase deployment frequency, and deliver more stable operating environments. The DevOps culture promotes continuous integration and continuous delivery (CI/CD), which significantly enhances the software development lifecycle.&lt;/p>
&lt;h3 id="key-components-of-devops">Key Components of DevOps&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Continuous Integration (CI)&lt;/strong>: Developers frequently integrate their changes in a shared repository.&lt;/li>
&lt;li>&lt;strong>Continuous Delivery (CD)&lt;/strong>: Automating the delivery of applications to selected infrastructure environments.&lt;/li>
&lt;li>&lt;strong>Infrastructure as Code (IaC)&lt;/strong>: Managing infrastructure through code, ensuring that setups are easy to replicate.&lt;/li>
&lt;/ul>
&lt;h3 id="a-personal-exploration-into-devops">A Personal Exploration into DevOps&lt;/h3>
&lt;p>Reflecting on my academic journey, the decision to delve into a DevOps project stemmed from a fundamental question: How can vast complexities be integrated seamlessly? My project aimed to demystify this by constructing a basic CI/CD pipeline orchestrated through Terraform and GitHub.&lt;/p>
&lt;h2 id="setting-the-stage-understanding-my-project">Setting the Stage: Understanding My Project&lt;/h2>
&lt;p>The core of my project revolved around leveraging Terraform for infrastructure automation, along with GitHub for version control and CI/CD capabilities. This combination would provide a straightforward yet powerful example of deploying applications in a cloud environment.&lt;/p>
&lt;h3 id="project-objectives">Project Objectives&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Demonstrate CI/CD using GitHub Actions&lt;/strong>: Show how automatic deployment can facilitate rapid product releases.&lt;/li>
&lt;li>&lt;strong>Use Terraform for Infrastructure Management&lt;/strong>: Illustrate how infrastructure can be provisioned and managed as code.&lt;/li>
&lt;li>&lt;strong>Visualize Workflows&lt;/strong>: Employ tools like Eraser.io to create flowcharts to help visualize the project&amp;rsquo;s structure.&lt;/li>
&lt;/ul>
&lt;h2 id="getting-started-with-terraform">Getting Started with Terraform&lt;/h2>
&lt;p>When I first explored Terraform, I was struck by how declarative it is. Terraform allows you to define your infrastructure in configuration files which can then be executed to provision that infrastructure automatically.&lt;/p>
&lt;h3 id="example-terraform-configuration">Example Terraform Configuration&lt;/h3>
&lt;p>Here’s a simple example of a Terraform configuration file that provisions an AWS EC2 instance:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="l">provider &amp;#34;&amp;#34;aws&amp;#34;&amp;#34; {&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="l">region = &amp;#34;&amp;#34;us-west-2&amp;#34;&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>}&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="l">resource &amp;#34;&amp;#34;aws_instance&amp;#34;&amp;#34; &amp;#34;&amp;#34;my_instance&amp;#34;&amp;#34; {&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="l">ami = &amp;#34;&amp;#34;ami-0c55b159cbfafe1f0&amp;#34;&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="l">instance_type = &amp;#34;&amp;#34;t2.micro&amp;#34;&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="l">tags = {&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="l">Name = &amp;#34;&amp;#34;MyInstance&amp;#34;&amp;#34;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>}&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>}&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="key-features-of-terraform">Key Features of Terraform&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Infrastructure as Code&lt;/strong>: Treat infrastructure setup as code, making it easier to maintain and version control.&lt;/li>
&lt;li>&lt;strong>Execution Plan&lt;/strong>: Terraform generates a clear execution plan which shows what will happen before any changes are applied.&lt;/li>
&lt;/ul>
&lt;h2 id="integrating-github-actions-into-the-pipeline">Integrating GitHub Actions into the Pipeline&lt;/h2>
&lt;p>GitHub Actions provides a robust platform for automating workflows directly in your GitHub repository. For my project, I set up actions to automatically test and deploy the application upon code commit.&lt;/p>
&lt;h3 id="github-actions-workflow-configuration">GitHub Actions Workflow Configuration&lt;/h3>
&lt;p>This YAML file illustrates a basic GitHub Actions workflow:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-yaml" data-lang="yaml">&lt;span class="line">&lt;span class="cl">&lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">CI/CD Pipeline&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">on&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">push&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">branches&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">main ]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="nt">jobs&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">build&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">runs-on&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">ubuntu-latest&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">steps&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Check out the code&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">uses&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">actions/checkout@v2&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Set up Node.js&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">uses&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">actions/setup-node@v2&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">with&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">node-version&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s1">&amp;#39;14&amp;#39;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Install dependencies&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">run&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">npm install&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Run tests&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">run&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">npm test&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>- &lt;span class="nt">name&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">Deploy to production&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nt">run&lt;/span>&lt;span class="p">:&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="l">npm run deploy&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="benefits-of-using-github-actions">Benefits of Using GitHub Actions&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Seamless Integration&lt;/strong>: Works directly with your repositories.&lt;/li>
&lt;li>&lt;strong>Customizability&lt;/strong>: Create tailored workflows to fit specific project needs.&lt;/li>
&lt;/ul>
&lt;h2 id="visualizing-the-workflow">Visualizing the Workflow&lt;/h2>
&lt;p>To visualize how data flows through the different stages of the pipeline, I employed Eraser.io. This tool allowed me to create flowcharts that represented the overall CI/CD process from code push to deployment.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Project Workflow Diagram" srcset="
/project/devops-journy/image/intro/image_huea26ebdf79552f1cb16da2d020438785_337448_db3a68c6db8bf6bb22c39db4b0c12eb5.webp 400w,
/project/devops-journy/image/intro/image_huea26ebdf79552f1cb16da2d020438785_337448_60e706c65945e27497b28bc21c1ec67c.webp 760w,
/project/devops-journy/image/intro/image_huea26ebdf79552f1cb16da2d020438785_337448_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://ukantjadia.github.io/project/devops-journy/image/intro/image_huea26ebdf79552f1cb16da2d020438785_337448_db3a68c6db8bf6bb22c39db4b0c12eb5.webp"
width="611"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>&lt;em>Figure 1: The flow of code and data in the CI/CD pipeline&lt;/em>&lt;/p>
&lt;h2 id="the-elegance-of-cicd-a-real-world-application">The Elegance of CI/CD: A Real-World Application&lt;/h2>
&lt;p>As I progressed through my project, witnessing the pipeline&amp;rsquo;s operation became one of the most rewarding aspects. It was astounding to see how a simple workflow could articulate the path of requests or data between containers and servers.&lt;/p>
&lt;h3 id="key-takeaways-from-the-cicd-pipeline-experience">Key Takeaways from the CI/CD Pipeline Experience&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Visual Learning&lt;/strong>: The flowcharts provided invaluable insight into how requests and data moved, making the whole process comprehensible.&lt;/li>
&lt;li>&lt;strong>Hands-on with Real Tools&lt;/strong>: Working directly with GitHub and Terraform solidified my understanding of cloud infrastructure and automation.&lt;/li>
&lt;/ul>
&lt;h2 id="final-thoughts">Final Thoughts&lt;/h2>
&lt;p>Reflecting on this project, I can confidently say that building a CI/CD pipeline using Terraform and GitHub not only quenched my curiosity about backend processes but also equipped me with practical skills for my career ahead. This journey reaffirmed my belief that technology can create elegant solutions to complex problems. I hope my exploration encourages others to dive into the DevOps ocean, where every wave brings new learning opportunities.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ol>
&lt;li>&lt;a href="https://github.com/ukantjadia/devops-qr-code" target="_blank" rel="noopener">GitHub Repository - DevOps QR Code&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://app.eraser.io/workspace/FvUVWqTvzrhkXkz8aEch?origin=share" target="_blank" rel="noopener">Eraser.io Workspace&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ukantjadia/devops-qr-code/blob/Main/task.md" target="_blank" rel="noopener">GitHub Task Documentation&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/ukantjadia/devops-qr-code/blob/Main/README.md" target="_blank" rel="noopener">GitHub README Documentation&lt;/a>&lt;/li>
&lt;/ol>
&lt;p>&lt;em>Feel free to explore these resources further to expand your knowledge and understanding of DevOps and CI/CD pipelines.&lt;/em>&lt;/p></description></item><item><title>What I Know About Java</title><link>https://ukantjadia.github.io/post/what-i-know-about-java/</link><pubDate>Sat, 30 Dec 2023 14:23:50 +0530</pubDate><guid>https://ukantjadia.github.io/post/what-i-know-about-java/</guid><description>&lt;h2 id="explaining-the">Explaining the&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="cl">&lt;span class="n">pubic&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">static&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">main&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="o">[]&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">args&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>
&lt;p>the execution of our code starts form main.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>let in order to create the object of class x we should have the main method&lt;/p>
&lt;/li>
&lt;li>
&lt;p>So main is a parameter and it takes parameter ie. &lt;code>main ( )&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>And the type of the parameter can be anything so we take the &lt;code>string&lt;/code> because &lt;code>String&lt;/code> except values and we don&amp;rsquo;t know how many values we are taking so we take array &lt;code>main(String args[])&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>There is nothing to return in main so it is a &lt;code>void&lt;/code> type&lt;/p>
&lt;/li>
&lt;li>
&lt;p>In order to call the method we require the object and the execution of our code is start from the main so that&amp;rsquo;s why it considered as &lt;code>static void main(String args[])&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>and it made public so &lt;code>public static void main(String args[])&lt;/code>&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="creating-a-object-inside-the-main">creating a object inside the main&lt;/h3>
&lt;ul>
&lt;li>we type the class name and obj name &lt;code>Main obj&lt;/code>&lt;/li>
&lt;li>then we have a keyword &lt;code>new&lt;/code> : it tell the jvm how memory it required for the given class, for that the size of class is define by the default constructor.&lt;/li>
&lt;/ul>
&lt;ul>
&lt;li>it is like a blowing the air inside the pillow (keyword new ), and capacity of that pillow is constructor.&lt;/li>
&lt;/ul>
&lt;h1 id="java-oop">Java OOP&lt;/h1>
&lt;h2 id="method-overloading">Method Overloading&lt;/h2>
&lt;ul>
&lt;li>Methods with same name but diff in (parameter or data type of the(both)).&lt;/li>
&lt;li>this kind of methods are known as overloaded method.
ex :&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="cl">&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">func&lt;/span>&lt;span class="p">(){..}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">func&lt;/span>&lt;span class="p">(){...}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kt">float&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">func&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">x&lt;/span>&lt;span class="p">){...}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">func&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">x&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">float&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">k&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">long&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">l&lt;/span>&lt;span class="p">){...}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>Method overloading should be consider by the type or count of the parameter that passed to a method not by the &lt;strong>return type of the method.&lt;/strong>&lt;/li>
&lt;/ul>
&lt;h2 id="constructor">Constructor&lt;/h2>
&lt;blockquote>
&lt;ul>
&lt;li>It is member method.&lt;/li>
&lt;li>Constructor have same name as class name.&lt;/li>
&lt;li>Constructor will never return anything.&lt;/li>
&lt;li>It used to allocate the memory.&lt;/li>
&lt;/ul>
&lt;/blockquote>
&lt;hr>
&lt;blockquote>
&lt;ul>
&lt;li>Every time when we have to create a any object we have to use the constructor weather we define it or not.&lt;/li>
&lt;li>If we don&amp;rsquo;t create a constructor it will be there that&amp;rsquo;s a default constructor.&lt;/li>
&lt;li>What a Constructor do : it will define the size of class which help keyword new to create the memory accordingly .&lt;/li>
&lt;/ul>
&lt;/blockquote>
&lt;ul>
&lt;li>unlike methods, a constructor has the &lt;strong>same name as that of class&lt;/strong> and does not have any return type.&lt;/li>
&lt;li>In java similar to method but only invoked when an object of the class is created.
ex:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="cl">&lt;span class="kd">class&lt;/span> &lt;span class="nc">Main&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">short&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">num&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// constructor&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">Main&lt;/span>&lt;span class="p">()&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;After the object is create. &amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">num&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">27&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">static&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">main&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="o">[]&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">args&lt;/span>&lt;span class="p">){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// object of class is created &lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">Main&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">obj&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Main&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// calling the var&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;the short number is &amp;#34;&lt;/span>&lt;span class="o">+&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">obj&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">num&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>There are three type of Constructor&lt;/li>
&lt;li>&lt;strong>Private Constructor&lt;/strong> : Private constructor can&amp;rsquo;t be accessed from outside the class.&lt;/li>
&lt;li>&lt;strong>No-Arg Constructor&lt;/strong> : Constructor that does not accept any arguments.&lt;/li>
&lt;li>&lt;strong>Parameterized Constructor&lt;/strong> : Constructor that accepts arguments.&lt;/li>
&lt;li>&lt;strong>Default Constructor&lt;/strong> : Constructor that is automatically created by the Java compiler if it is not defined.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;ul>
&lt;li>A constructor can not be &lt;code>abstract&lt;/code>, &lt;code>static&lt;/code> or &lt;code>final&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="access-modifier">Access Modifier&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>It is helpful in the Encapsulation ( preventing the data from misuse and alter.).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>And to Control what part of program can access the members of a class.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Default&lt;/strong> : Declarations are visible only within the package(package private).&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Public&lt;/strong> : This can be access by other class.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Private&lt;/strong> : This can not be accessed by other class.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Protected&lt;/strong> : Declarations are visible within the package or all subclasses.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>refer to this image &lt;a href="https://cdn.programiz.com/sites/tutorial2program/files/java-access-modifiers-public-private-protected-default_0.jpg" target="_blank" rel="noopener">this&lt;/a>&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="this-key-word">this key word&lt;/h2>
&lt;ul>
&lt;li>this : refer to the current object inside a method or constructor.&lt;/li>
&lt;li>in other words: this is treating the variable with same name, differently according to there position/place.&lt;/li>
&lt;li>using this with getters and setters : in getters/setters we are using the same var name as in the program&lt;/li>
&lt;li>using this in constructor overloading
ex:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="cl">&lt;span class="kd">class&lt;/span> &lt;span class="nc">Complex&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">a&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">b&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// constructor with 2 parameters&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">Complex&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">j&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">this&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">a&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">this&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">b&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">j&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// constructor with single parameter&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">Complex&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// invokes the constructor with 2 parameters&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">this&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// constructor with no parameter&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">private&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">Complex&lt;/span>&lt;span class="p">(){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// invokes the constructor with single parameter&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">this&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">0&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="nd">@Override&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">toString&lt;/span>&lt;span class="p">(){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="k">return&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">this&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">a&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">+&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s">&amp;#34; + &amp;#34;&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">+&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">this&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">b&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">+&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s">&amp;#34;i&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">static&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">main&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="o">[]&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">args&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// creating object of Complex class&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// calls the constructor with 2 parameters&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">Complex&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">c1&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Complex&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">2&lt;/span>&lt;span class="p">,&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">3&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// calls the constructor with a single parameter&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">Complex&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">c2&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Complex&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">3&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// calls the constructor with no parameters&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">Complex&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">c3&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">Complex&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// print objects&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">c1&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">c2&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">c3&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>passing this as an argument : - i also didn&amp;rsquo;t get it. ask to sir&lt;/li>
&lt;/ul>
&lt;h2 id="final-keyword">final keyword&lt;/h2>
&lt;ul>
&lt;li>final keyword means used to denote the constants and it can be used with variables,method and classes.&lt;/li>
&lt;li>final variable cannot be reinitialized with another value.&lt;/li>
&lt;li>the final method cannot be overridden.&lt;/li>
&lt;li>the final class cannot be extended.&lt;/li>
&lt;/ul>
&lt;h2 id="instanceof-operator">&lt;code>instanceOf&lt;/code> operator&lt;/h2>
&lt;ul>
&lt;li>used to check whether an object is an instance of class or not&lt;/li>
&lt;li>syntax &lt;code>objectName instanceOf className;&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="inheritance">Inheritance&lt;/h2>
&lt;ul>
&lt;li>It allows to create a new class from an existing class.&lt;/li>
&lt;li>just inherit it from it&amp;rsquo;s father class.&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-java" data-lang="java">&lt;span class="line">&lt;span class="cl">&lt;span class="kd">class&lt;/span> &lt;span class="nc">Main&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">static&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">main&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">args&lt;/span>&lt;span class="o">[]&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">child&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">boy&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="k">new&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">child&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">boy&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">display&lt;/span>&lt;span class="p">();&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kd">class&lt;/span> &lt;span class="nc">parent&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">String&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">color&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="s">&amp;#34;White&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;It is same like we get the traits from our parents, JDK or JVM also doing the same thing.&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// it is same like we get the traits from our parents, JDK/JVM/java is also doing the same thing. &lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="c1">// inherit from parents&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="kd">class&lt;/span> &lt;span class="nc">child&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kd">extends&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="n">parent&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="kd">public&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="kt">void&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="nf">display&lt;/span>&lt;span class="p">(){&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;The value for variable \&amp;#39;color\&amp;#39; is comming from the parent class.&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">out&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="na">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Color of child is &amp;#34;&lt;/span>&lt;span class="o">+&lt;/span>&lt;span class="n">color&lt;/span>&lt;span class="p">);&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="p">}&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Network Concepts Basics</title><link>https://ukantjadia.github.io/post/network-concepts-basics/</link><pubDate>Sat, 30 Dec 2023 14:21:26 +0530</pubDate><guid>https://ukantjadia.github.io/post/network-concepts-basics/</guid><description>&lt;h1 id="networking-concept">Networking Concept&lt;/h1>
&lt;h3 id="mac-address">Mac address&lt;/h3>
&lt;ul>
&lt;li>Media control access&lt;/li>
&lt;li>It is physical address to identify the devices&lt;/li>
&lt;li>it identify the NIC of each divices (NIC&amp;ndash;&amp;gt; Network identification card)&lt;/li>
&lt;li>ex:- ether 00:0c:49:0a:43:03&lt;/li>
&lt;li>Mac work in the second and third layer of the OSI model&lt;/li>
&lt;li>Specially it is related to the switches&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="tcp---vs---udp">TCP &amp;ndash;VS&amp;ndash; UDP&lt;/h3>
&lt;h4 id="tcp">TCP&lt;/h4>
&lt;ul>
&lt;li>Transmission COntrol Protocol&lt;/li>
&lt;li>Connection oriented protocol&lt;/li>
&lt;li>used in HTTPS/SSH/TelNet/SMTP/FTP&lt;/li>
&lt;li>provide the more security and relailablity&lt;/li>
&lt;li>it form one-to-one connection and it gurantee the complete delivery of data&lt;/li>
&lt;li>Three way hand shake&lt;/li>
&lt;li>SYN -&amp;gt; SYN-ACK -&amp;gt; ACK&lt;/li>
&lt;li>it is slow due to three-way-handshake, it take time to complete and establis the connection&lt;/li>
&lt;li>Use port to establish the connection&lt;/li>
&lt;li>During hand-shake it acknowldge your machine to the requested server&lt;/li>
&lt;li>contains the 20Byte packet&lt;/li>
&lt;/ul>
&lt;h4 id="udp">UDP&lt;/h4>
&lt;ul>
&lt;li>User Datagram Protocol&lt;/li>
&lt;li>Connection less Protocol&lt;/li>
&lt;li>it provide the fast transmission&lt;/li>
&lt;li>Broadcast or multicast the message and the complete delivery of data is note guarnted&lt;/li>
&lt;li>Streamming on voice-over-io(VOIP), DHCP,DNS&lt;/li>
&lt;li>Used for streaming the data like procast, video&lt;/li>
&lt;li>contains the 8Byte packet&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="comman-ports-and-protocol">Comman Ports and Protocol&lt;/h3>
&lt;h4 id="tcp-1">TCP&lt;/h4>
&lt;pre>&lt;code> PROTOCOL/SERVICE PORT'S
FTP 21
SSH 22
TelNet 23
SMTP 25
DNS 53
HTTP/HTTPS 80/443
POP3 110
SMB 139+445
IMAP 143
&lt;/code>&lt;/pre>
&lt;h4 id="udp-1">UDP&lt;/h4>
&lt;pre>&lt;code> PROTOCOL/SERVICE PORT'S
DNS 53
DHCP 67.68
TFTP 69
SNMP 161
&lt;/code>&lt;/pre>
&lt;hr>
&lt;h3 id="the-osi-model">The OSI Model&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Open Systems Interconnection(OSI)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Learn this mnemonic to to know the seven layer sequence&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Please Do Not Throw Sausage Pizza Away&lt;/strong>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>OSI seven layers are&lt;/p>
&lt;pre>&lt;code> 1. Physical (P)Please
2. Data link (D)Do
3. Network (N)Not
4. Transport (T)Throw
5. Session (S)Sausage
6. Presentation (P)Pizza
7. Application (A)Away
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>OSI Model Explain &lt;a href="https://www.imperva.com/learn/application-security/osi-model/" target="_blank" rel="noopener">REF&lt;/a>&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img src="https://www.imperva.com/learn/wp-content/uploads/sites/13/2020/02/OSI-vs.-TCPIP-models.jpg.webp" alt="IMG" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;pre>&lt;code> Layers For
1. Physical -- Provide the connection between computer and network, it includes physical datacable,server
2. Data Link -- Make sure the data-transfer is error-free between different node, when data packet arrive at network layer then data link layer(DLL) deliver that packet to the requested host using MAC address.
3. Network -- Transmitt the data from one host to other, in different netwroks.It also place the reciver/sender ip address in header of packet.
4. Transport -- Data packet referred as Segment, it is responsible for the end-to-end delivery of complete message without any error/packet loss.
5. Session -- Responsible for the establishing the session,maintaining and also ensure the security
6. Presentation --- Data from application layer(layer 7) is extracted here and manipulate as per the required to transmit over network.
7. Application --- Used by the end user software such as web browser and email clients.
&lt;/code>&lt;/pre>
&lt;blockquote>
&lt;p>While Receiving the data from network model work from layer 1 &amp;ndash;&amp;gt; layer 7&lt;/p>
&lt;/blockquote>
&lt;blockquote>
&lt;p>While sending the data from machine model work from layer 7 &amp;ndash;&amp;gt; layer 1&lt;/p>
&lt;/blockquote>
&lt;hr>
&lt;h3 id="networks">Networks&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>IP address are work with the third layer of the OSI Model&lt;/p>
&lt;/li>
&lt;li>
&lt;p>There are two types of ip address&lt;/p>
&lt;ul>
&lt;li>IPv4 : 192.168.34.123&lt;/li>
&lt;li>IPv6 : 23:s3:3w:34:dw:23:2d&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>In IPv4 each section after delimeter(.) is contain the 8 bits each (0 &amp;amp; 1)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The total of complete ip address is 32 byte.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>the total in terms of the bits is 256 that is from 0 to 255.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>There are many network around you and your system and all are having the very specific identity number that is known as IP address.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Types of ip address in a network&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Class&lt;/th>
&lt;th>Start ip&lt;/th>
&lt;th>End ip&lt;/th>
&lt;th>Subnet Mask&lt;/th>
&lt;th>Netwroks(max)&lt;/th>
&lt;th>Hosts(max)&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>A&lt;/td>
&lt;td>0&lt;/td>
&lt;td>127&lt;/td>
&lt;td>255.0.0.0&lt;/td>
&lt;td>126&lt;/td>
&lt;td>16,646,144&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>B&lt;/td>
&lt;td>127&lt;/td>
&lt;td>191&lt;/td>
&lt;td>255.255.0.0&lt;/td>
&lt;td>16,383&lt;/td>
&lt;td>15,024&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>C&lt;/td>
&lt;td>192&lt;/td>
&lt;td>223&lt;/td>
&lt;td>255.225.255.0&lt;/td>
&lt;td>2097,151&lt;/td>
&lt;td>254&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/li>
&lt;li>
&lt;p>IP address in the binary format&lt;/p>
&lt;ul>
&lt;li>11111111.11111111.11111111.0 == 255.255.255.0&lt;/li>
&lt;li>== 192.168.15.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Some Standard Slash Network&lt;/p>
&lt;ul>
&lt;li>/24 Network
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>128&lt;/th>
&lt;th>64&lt;/th>
&lt;th>32&lt;/th>
&lt;th>16&lt;/th>
&lt;th>8&lt;/th>
&lt;th>4&lt;/th>
&lt;th>2&lt;/th>
&lt;th>1&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/li>
&lt;li>/25 Network
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>128&lt;/th>
&lt;th>64&lt;/th>
&lt;th>32&lt;/th>
&lt;th>16&lt;/th>
&lt;th>8&lt;/th>
&lt;th>4&lt;/th>
&lt;th>2&lt;/th>
&lt;th>1&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>1&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;td>0&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h3 id="links">Links&lt;/h3>
&lt;p>It is getting hard for me to write and draw the ahed so i am adding some link of my document go through them, Some link to internet resources&lt;/p>
&lt;ol>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=ZxAwQB8TZsM" target="_blank" rel="noopener">7_second_subnating&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://drive.google.com/file/d/1ETKH31-E7G-7ntEOlWGZcDZWuukmeHFe/view" target="_blank" rel="noopener">subnet_execl_sheet&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://drive.google.com/file/d/1tl052Kxro6GOT15H0YfHaA9-fhV8xZRa/view?usp=drivesdk" target="_blank" rel="noopener">my_hand_written_notes&lt;/a>&lt;/li>
&lt;/ol></description></item><item><title>Information Gathering, the First Step for Exploitation</title><link>https://ukantjadia.github.io/post/information-gathering-first-step-for-exploitatoin/</link><pubDate>Sat, 30 Dec 2023 14:20:17 +0530</pubDate><guid>https://ukantjadia.github.io/post/information-gathering-first-step-for-exploitatoin/</guid><description>&lt;h1 id="recon">Recon&lt;/h1>
&lt;p>There are two type of Reconnaissance&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Passive Reconnaissance :&amp;ndash; Doing the recon without coming in direct contact of the target. \&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Active Reconnaissance :&amp;ndash; Doing the active notecible action on the target site.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="passive-reconnaissance-includes">Passive Reconnaissance includes&lt;/h2>
&lt;ul>
&lt;li>local/Geo Information
&lt;ul>
&lt;li>Satellite Images&lt;/li>
&lt;li>Building layout&lt;/li>
&lt;li>Cabin location, fence, count of head in building, ways to exit, break areas, security fencing.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Job information&lt;/li>
&lt;li>Senior manager name, meeting routine, job title.&lt;/li>
&lt;li>Image from social sites like badge photo, cubical, desktop.&lt;/li>
&lt;/ul>
&lt;h2 id="web-and-network-information">Web and Network Information&lt;/h2>
&lt;h3 id="targe-validation">Targe Validation&lt;/h3>
&lt;p>First thing you have to do is, validate your target.&lt;/p>
&lt;p>Weather the description of given target is having the relating with the given ip&lt;/p>
&lt;h3 id="finding-subdomain">Finding Subdomain&lt;/h3>
&lt;p>Testing only one domain or some domain is decrease the chances of finding the flaw.&lt;/p>
&lt;p>Testing the all in-scope sub-domain is a good practice.&lt;/p>
&lt;p>Tool can be use for finding the subdomain are&lt;/p>
&lt;p>Google fu, dig, Nmap, sublist3r, bluto, crt.sh etc.&lt;/p>
&lt;h3 id="fingerprinting">Fingerprinting&lt;/h3>
&lt;p>We need to know which website running what on front or back.&lt;/p>
&lt;p>What&amp;rsquo;s running on the host.&lt;/p>
&lt;p>What&amp;rsquo;s web server, ssh, ftp, services.&lt;/p>
&lt;h3 id="data-breaches">Data Breaches&lt;/h3>
&lt;p>Just check if the credentials or account is pawned or not&lt;/p>
&lt;p>Use this to check&lt;/p>
&lt;p>havebeenpawned, Breach-prose, weleakinfo.&lt;/p>
&lt;p>&lt;strong>NOTE:&lt;/strong> Better Recon, enumeration makes you better pentester.&lt;/p>
&lt;h1 id="email-address-gathering-with-hunterio">Email Address gathering with Hunter.io&lt;/h1>
&lt;ul>
&lt;li>
&lt;p>You can use Hunter.io to find the people email address working or related to the domain you enter.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>In free plan it only provide the 20 searches as free, so do not abuse the searches.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>It also tell the where it get all emails written in source.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>You have to login with valid email id to have account.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>It also provide the category of email address, the department of the email owner.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h1 id="breach-phrase-from-github">Breach-Phrase from github&lt;/h1>
&lt;ul>
&lt;li>It is tool on the GitHub, it checks for the leaked credentials in its own in-build data of credentials&lt;/li>
&lt;li>This in build data is gather from the dark web store.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>NOTE:&lt;/strong> the gather email address are plays important role in further recon and enumeration.&lt;/p>
&lt;h1 id="utilizing-the-harvester">Utilizing the Harvester&lt;/h1>
&lt;ul>
&lt;li>It searches with the domain.&lt;/li>
&lt;li>It can gather the subdomain name, e-mail addresses, virtual hosts, open ports/banner, and employee name from different public sources like search engine, social site&lt;/li>
&lt;/ul>
&lt;h1 id="hunting-subdomain">Hunting Subdomain&lt;/h1>
&lt;p>We need see/identify what are the available or working subdomain out there.
use this&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Sublist3r&lt;/p>
&lt;ul>
&lt;li>Sometimes it only give the 3 level subdomain&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>crt.sh&lt;/p>
&lt;ul>
&lt;li>It give the all registered subdomain that can be 3 level or 4 level&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>OWASP Amass is more efficient tool than above mentioned&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Sublist3r is slow during to fast up increase the threads
&lt;strong>NOTE:&lt;/strong> Found subdomain may or may not alive.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h1 id="identifying-the-web-technologies">Identifying the Web Technologies&lt;/h1>
&lt;ul>
&lt;li>To Fingerprinting the web page or to get the services running in the background&lt;/li>
&lt;li>wappalyzer is browser extension which show the frontend and backend services.&lt;/li>
&lt;li>Terminal tool is whatweb
&lt;ul>
&lt;li>use &lt;code>whatweb -h&lt;/code> for more details of tool&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item><item><title>Basic Git Commands</title><link>https://ukantjadia.github.io/post/basic-git-commands/</link><pubDate>Sat, 30 Dec 2023 14:15:59 +0530</pubDate><guid>https://ukantjadia.github.io/post/basic-git-commands/</guid><description>&lt;h1 id="what-you-should-do-in-git">what you should do in git&lt;/h1>
&lt;ol>
&lt;li>git init -b main&lt;/li>
&lt;li>git remote add origin &amp;lt;repo_link&amp;gt;&lt;/li>
&lt;li>git remote -v&lt;/li>
&lt;/ol>
&lt;hr>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="nb">cd&lt;/span> to the root file of the project
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">echo&lt;/span> &lt;span class="s2">&amp;#34;+ Project &amp;#34;&lt;/span> &amp;gt;&amp;gt; README.md
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git init
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git add .
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git commit -m &lt;span class="s2">&amp;#34;README&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git branch -M Main
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git remote add origin &amp;lt;repo_link&amp;gt;
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">git push -u origin Main
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;ul>
&lt;li>pushing an existing repo from cli
git remote add origin &lt;a href="https://github.com/UserCtf777/Inkdrop.git" target="_blank" rel="noopener">https://github.com/UserCtf777/Inkdrop.git&lt;/a>
git branch -M Main
git push -u origin Main&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>after clonning any repo it have the address of origin, simply you cannot add your repo url for backup/project/ICR
for that you have to change the origin url follow the following command&lt;/p>
&lt;ul>
&lt;li>
&lt;p>to check the origin url try the remote verbose
git remote -v&lt;/p>
&lt;/li>
&lt;li>
&lt;p>to change the remote origin try
git remote set-url origin &amp;lt;repo_url&amp;gt;&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;ul>
&lt;li>
&lt;p>new error found&lt;/p>
&lt;/li>
&lt;li>
&lt;p>sometimes when we clone the repo we use depth=1 to remove it&amp;rsquo;s history&lt;/p>
&lt;/li>
&lt;li>
&lt;p>this give the error during pushing it to other origin&lt;/p>
&lt;/li>
&lt;li>
&lt;p>error looks like&lt;/p>
&lt;/li>
&lt;li>
&lt;pre>&lt;code> ![remote rejected] Main -&amp;gt; Main (shallow update not allowed)
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;pre>&lt;code> error: failed to push some refs to
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>to solve this try
git remote set-url &amp;lt;old_url&amp;gt;
git fetch &amp;ndash;unshallow old&lt;/p>
&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>git init -b main&lt;/li>
&lt;li>git remote add origin &amp;lt;repo_link&amp;gt;&lt;/li>
&lt;li>git remote -v&lt;/li>
&lt;/ol>
&lt;hr>
&lt;p>cd to the root file of the project
echo &amp;ldquo;+ Project &amp;quot; &amp;raquo; README.md
git init
git add .
git commit -m &amp;ldquo;README&amp;rdquo;
git branch -M Main
git remote add origin &amp;lt;repo_link&amp;gt;
git push -u origin Main&lt;/p>
&lt;hr>
&lt;ul>
&lt;li>pushing an existing repo from cli
git remote add origin &lt;a href="https://github.com/UserCtf777/Inkdrop.git" target="_blank" rel="noopener">https://github.com/UserCtf777/Inkdrop.git&lt;/a>
git branch -M Main
git push -u origin Main&lt;/li>
&lt;/ul>
&lt;hr>
&lt;p>after clonning any repo it have the address of origin, simply you cannot add your repo url for backup/project/ICR
for that you have to change the origin url follow the following command&lt;/p>
&lt;ul>
&lt;li>
&lt;p>to check the origin url try the remote verbose
git remote -v&lt;/p>
&lt;/li>
&lt;li>
&lt;p>to change the remote origin try
git remote set-url origin &amp;lt;repo_url&amp;gt;&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;ul>
&lt;li>
&lt;p>new error found&lt;/p>
&lt;/li>
&lt;li>
&lt;p>sometimes when we clone the repo we use depth=1 to remove it&amp;rsquo;s history&lt;/p>
&lt;/li>
&lt;li>
&lt;p>this give the error during pushing it to other origin&lt;/p>
&lt;/li>
&lt;li>
&lt;p>error looks like&lt;/p>
&lt;/li>
&lt;li>
&lt;pre>&lt;code> ![remote rejected] Main -&amp;gt; Main (shallow update not allowed)
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;pre>&lt;code> error: failed to push some refs to
&lt;/code>&lt;/pre>
&lt;/li>
&lt;li>
&lt;p>to solve this try
git remote set-url &amp;lt;old_url&amp;gt;
git fetch &amp;ndash;unshallow old
+!/bin/bash&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>cd ~/work/obs/Obsidian&lt;/p>
&lt;p>git add .
git commit -m &amp;lsquo;daily update&amp;rsquo;
git push&lt;/p>
&lt;p>+!/bin/bash&lt;/p>
&lt;ul>
&lt;li>
&lt;p>to make dir work as git repo
git init&lt;/p>
&lt;/li>
&lt;li>
&lt;p>to check the changes
git status&lt;/p>
&lt;/li>
&lt;li>
&lt;p>to sort/simplify the changes
git add .&lt;/p>
&lt;/li>
&lt;li>
&lt;p>git log shows the log of all commit done
git log&lt;/p>
&lt;/li>
&lt;li>
&lt;p>restore to discard the changes
git restore .&lt;/p>
&lt;/li>
&lt;li>
&lt;p>to commit the changes [with &amp;lsquo;-m&amp;rsquo; for successful commit/{-m =&amp;gt; metadata of changes}]
git commit -m &amp;ldquo;daily update&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>git push to add new file to the repo
git push&lt;/p>
&lt;/li>
&lt;li>
&lt;p>command to add remote repo / it skip the authentication part during git push
git remote add origin &lt;a href="mailto:git@github.com">git@github.com&lt;/a>:UserCtf777/Obsidian.git
git branch -M master
git push -m origin master&lt;/p>
&lt;/li>
&lt;li>
&lt;p>To solve the conflicts during rebasing
git rebase &amp;ndash;continue + fix conflicts and run this
git rebase &amp;ndash;skip + to skip this patch/changes
git rebase &amp;ndash;abort + to checkout the original branch&lt;/p>
&lt;/li>
&lt;li>
&lt;p>When we have unresolved conflicts before merging or having error related to add
git fetch + to gain the latest changes from server
git merge origin master + to give a try to automatice merging&lt;/p>
&lt;/li>
&lt;li>
&lt;p>it will only work if branch has to merge something&amp;ndash; it can be checked with git status
git merge &amp;ndash;abort + the unresolved conflicts will be cleared off&lt;/p>
&lt;/li>
&lt;li>
&lt;p>to edit the conflicts
git rebase &amp;ndash;edit-todo
git rebase &amp;ndash;continue&lt;/p>
&lt;/li>
&lt;li>
&lt;p>if conflicts dosen&amp;rsquo;t resolve then
git rebase &amp;ndash;abort&lt;/p>
&lt;/li>
&lt;li>
&lt;p>it will give the path of unresolved files&lt;/p>
&lt;/li>
&lt;li>
&lt;p>if you know how to edit then resolve them&lt;/p>
&lt;/li>
&lt;li>
&lt;p>OR you can remove that confict by
git rm &lt;file>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>if nothing is ahppening you can skip the commit wiht
git rebase &amp;ndash;skip&lt;/p>
&lt;/li>
&lt;/ul></description></item><item><title>Enumeration Second Step for Exploitation</title><link>https://ukantjadia.github.io/post/enumeration-second-step-for-explotation/</link><pubDate>Sat, 30 Dec 2023 14:15:39 +0530</pubDate><guid>https://ukantjadia.github.io/post/enumeration-second-step-for-explotation/</guid><description>&lt;h1 id="enumeration">Enumeration&lt;/h1>
&lt;h2 id="kioptrix-level-1">Kioptrix level 1&lt;/h2>
&lt;ul>
&lt;li>Now as beginner we should a have vulnerable machine to test&lt;/li>
&lt;li>Use &lt;a href="Vhttps://www.vulnhub.com/entry/kioptrix-level-1-1,22/">kioptrix level a&lt;/a> from vulnhub.&lt;/li>
&lt;li>This is used for beginner to develop there skill by testing the vulnerable machine.&lt;/li>
&lt;li>Download it, and set up it on your virtual software.&lt;/li>
&lt;li>Make sure the network connection is set to &lt;code>NAT&lt;/code>&lt;/li>
&lt;li>Open the root folder(which contain all configuration files) and open configuration file and change &lt;code>Bridge&lt;/code> to &lt;code>NAT&lt;/code>&lt;/li>
&lt;li>&lt;code>I Coppied&lt;/code> select this option form pop dialogue&lt;/li>
&lt;li>Once the setup is done do the &lt;code>arp-scan -l&lt;/code>&lt;/li>
&lt;li>On your system it will discover the available host in your ip CHIR&lt;/li>
&lt;li>Ignore the x.x.x.1 and x.x.x.254 because this are your network identity and broadcast ip, Rest all machine are lying in your ip range.&lt;/li>
&lt;/ul>
&lt;h2 id="nmap-stealthy-scan">Nmap stealthy scan&lt;/h2>
&lt;p>What normal two-way connection looks like&lt;/p>
&lt;blockquote>
&lt;p>SYN &amp;lt;-&amp;gt; SYNACK &amp;lt;-&amp;gt; ACK&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>Stealthy scan doesn&amp;rsquo;t establish the connection it ask for the open port on the serve as server reply the status it will take the step back without establishing the connection.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>SYN &amp;lt;-&amp;gt; SYNACK &amp;lt;-&amp;gt; RST&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>Use this Namp flags for better enumeration
&lt;code>nmap -T4 -p- -A &amp;lt;ip_address&amp;gt;&lt;/code>&lt;/li>
&lt;li>Go through the scan properly&lt;/li>
&lt;li>Visit ip/webpage, check weather there you can do anything like directory busting.&lt;/li>
&lt;li>Get all services running, also check the header and behaviour.&lt;/li>
&lt;li>Do whatever you can do.&lt;/li>
&lt;li>Then use nikto web vulnerability tool.&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>&lt;code>nikto -host &amp;lt;url&amp;gt;&lt;/code>&lt;/p>
&lt;/blockquote>
&lt;h2 id="directory-busting">Directory busting&lt;/h2>
&lt;ul>
&lt;li>dirbuster / birb / gobuster&lt;/li>
&lt;/ul>
&lt;h2 id="dirbuster">Dirbuster&lt;/h2>
&lt;ul>
&lt;li>start dirbuster from terminal&lt;/li>
&lt;li>fill the slot with information of your target&lt;/li>
&lt;li>for word file use &lt;code>/usr/share/wordlist/dirbuster&lt;/code>&lt;/li>
&lt;li>File extension depends on you or the time you have.&lt;/li>
&lt;li>Received/common url can be a information disclosure of anything like stats, user-data, server header, response.&lt;/li>
&lt;/ul></description></item><item><title>Networking Command Netstat</title><link>https://ukantjadia.github.io/post/networking-command-netstat/</link><pubDate>Sat, 30 Dec 2023 14:14:11 +0530</pubDate><guid>https://ukantjadia.github.io/post/networking-command-netstat/</guid><description>&lt;h1 id="learn-netstat">Learn Netstat&lt;/h1>
&lt;blockquote>
&lt;p>A basic &lt;code>Linux&lt;/code> network command&lt;/p>
&lt;/blockquote>
&lt;h2 id="netstat">NETSTAT&lt;/h2>
&lt;ul>
&lt;li>Prints the network connection and routing tables.&lt;/li>
&lt;li>Like an CCTV monitor for every connection come in and go out from your machine.&lt;/li>
&lt;li>MiniManual&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;ul>
&lt;li>&lt;code>netstat -ant&lt;/code> : &lt;code>a&lt;/code> for all connection, &lt;code>n&lt;/code> for numeric, &lt;code>t&lt;/code> for all TCP connection//&lt;code>u&lt;/code> for the UDP connection&lt;/li>
&lt;li>&lt;code>netstat -rnec&lt;/code> :&lt;code>r&lt;/code> for the route information, &lt;code>n&lt;/code> numeric, &lt;code>e&lt;/code> extend, &lt;code>c&lt;/code> continous prints the result&lt;/li>
&lt;li>&lt;code>netstat -stuw&lt;/code> : &lt;code>s&lt;/code> for statistics summary,&lt;code>t/u&lt;/code> for tcp/udp, &lt;code>w&lt;/code> prints raw data&lt;/li>
&lt;li>&lt;code>netstat -tulpn&lt;/code> : it shows the connectio with PID numbers&lt;/li>
&lt;li>&lt;code>lsof -i&lt;/code> : it establish the connection&lt;/li>
&lt;/ul>
&lt;/blockquote></description></item><item><title>Cloud Computing Basics</title><link>https://ukantjadia.github.io/post/cloud-computing-basics/</link><pubDate>Sat, 30 Dec 2023 14:13:52 +0530</pubDate><guid>https://ukantjadia.github.io/post/cloud-computing-basics/</guid><description>&lt;h1 id="cloud-computing">Cloud Computing&lt;/h1>
&lt;ol>
&lt;li>Types of cloud/ Cloud deployment model&lt;/li>
&lt;/ol>
&lt;h2 id="public-cloud">Public Cloud&lt;/h2>
&lt;img src="img1.jpg" alt="Example Image" width="300" height="200" align="right">
&lt;!-- + *[IMAGE](https://media.geeksforgeeks.org/wp-content/uploads/20211123123729/Group4-660x330.jpg) -->
&lt;ul>
&lt;li>Public cloud managed by third parties which provide cloud service over the enternet to the pubilc&lt;/li>
&lt;li>public cloud is the go-to option for the small enterprise, where they are able to start there businesse without large upfront investment.&lt;/li>
&lt;li>multitenacy :&amp;ndash;&amp;gt; meant to serve multiple user not a singel user&lt;/li>
&lt;/ul>
&lt;h2 id="private-cloud">Private Cloud&lt;/h2>
&lt;img src="img2.jpg" alt="Example Image" width="300" height="200" align="right">
&lt;!-- *[IMAGE](https://media.geeksforgeeks.org/wp-content/uploads/20211123123851/Group1-660x330.jpg)* -->
&lt;ul>
&lt;li>aka coprate cloud or internal cloud&lt;/li>
&lt;li>used by the organization to built and manage there own data centers internally or by the third party.&lt;/li>
&lt;li>private cloud distrubuted system that work on private infrastructure and provide the user with dynaminacally provisioning of computing resource&lt;/li>
&lt;li>Advantages&lt;/li>
&lt;li>better performance, improved speed, space complexity&lt;/li>
&lt;li>suitable for the organization that requires a separate cloud for there personal use and data security is the first priority.&lt;/li>
&lt;li>Coustomer information protection&lt;/li>
&lt;li>Infrastureture ensuring SLA&lt;/li>
&lt;li>Complience with standard procedures and operations&lt;/li>
&lt;/ul>
&lt;h2 id="hybrid-cloud">Hybrid Cloud&lt;/h2>
&lt;img src="img3.png" alt="Example Image" width="300" height="200" align="right">
&lt;!-- &lt;!- *[IMAGE](https://static.javatpoint.com/cloudpages/images/hybridcloud.png)* --> -->
&lt;ul>
&lt;li>it is a combination of public and private cloud&lt;/li>
&lt;li>Hybrid cloud is partially secure because the services which are running the public cloud can be access by anyone and service running by private cloud can be access by the organization user&amp;rsquo;s.&lt;/li>
&lt;li>Example : Google application gmail, gdrive, office 365&lt;/li>
&lt;/ul></description></item><item><title>Basics of Operating Sys</title><link>https://ukantjadia.github.io/post/basics-of-operating-sys/</link><pubDate>Mon, 21 Mar 2022 22:56:25 +0530</pubDate><guid>https://ukantjadia.github.io/post/basics-of-operating-sys/</guid><description>&lt;h1 id="1--operating-systemos">1. Operating System[OS]&lt;/h1>
&lt;img src="https://www.gatevidyalay.com/wp-content/uploads/2018/11/Translating-Logical-Address-into-Physical-Address-Diagram.png" alt="Example Image" width="300" height="200" align="right">
&lt;ol>
&lt;li>Paging :&amp;ndash;&amp;gt;&lt;/li>
&lt;/ol>
&lt;!-- ![IMAGE](https://www.gatevidyalay.com/wp-content/uploads/2018/11/Translating-Logical-Address-into-Physical-Address-Diagram.png) -->
&lt;ol>
&lt;li>it eleminates the need of contiguos memory allocation&lt;/li>
&lt;li>have two main component and parts&lt;/li>
&lt;li>component -&amp;gt; page number(p) and frame number(d)&lt;/li>
&lt;li>parts
+ Logical address -&amp;gt; addres generated by the CPU {represented in bits}
+ Physical address -&amp;gt; physical location of a required data in a memory&lt;/li>
&lt;li>In the process of accessing any data from memory, that will be done by accessing the memory location twice
to remove this double accessing of the memory we use the TLB{Translation Lockaside Buffer}.&lt;/li>
&lt;li>TLB &amp;ndash;&amp;gt; It contains the page table entries that have been most recently used. &lt;em>&lt;a href="https://media.geeksforgeeks.org/wp-content/uploads/20190225192626/tlb1.jpg" target="_blank" rel="noopener">IMAGE&lt;/a>&lt;/em>&lt;/li>
&lt;li>it is a kind of cache memory resister of memory with there physical address&lt;/li>
&lt;li>TLB stored the frequently used data for high speed accessing&lt;/li>
&lt;li>It consist of two parts
4. key or tag :: like page number
5. value :: like frame number&lt;/li>
&lt;li>It consist of few data that is { frequently/ recently used data}&lt;/li>
&lt;li>If data not found in the TLB table then it will search in the page table for that data {TLB miss}&lt;/li>
&lt;li>Advantages&lt;/li>
&lt;li>Disadvantages&lt;/li>
&lt;li>Terms
9. Hit Ratio{HR} &amp;ndash;&amp;gt; successful search / total searches doen
10. Miss Ratio{MR} &amp;ndash;&amp;gt; HR-total searches done
11. TLBT &amp;ndash;&amp;gt; Time( complete TLB search )
12. MAT &amp;ndash;&amp;gt; TIme( time to acces memory )
13. Effective Access Time
14. formula
EAT = HR*( TLBT + MAT ) + MR*( TLBT + 2*MAT)&lt;/li>
&lt;/ol></description></item></channel></rss>