<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Notes on Samarthya</title><link>https://samarthya.me/tags/notes/</link><description>Recent content in Notes on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Wed, 23 Feb 2022 07:27:42 +0000</lastBuildDate><atom:link href="https://samarthya.me/tags/notes/index.xml" rel="self" type="application/rss+xml"/><item><title>Notes: For self</title><link>https://samarthya.me/posts/notes-1/</link><pubDate>Wed, 23 Feb 2022 07:27:42 +0000</pubDate><guid>https://samarthya.me/posts/notes-1/</guid><description>&lt;div&#10; class="tab__container w-full"&#10; &#10; &gt;&#10; &lt;div class="tab__nav" role="tablist"&gt;&#10; &lt;div class="flex flex-wrap gap-1"&gt;&lt;button&#10; class="tab__button px-3 py-2 text-sm font-semibold border-b-2 border-transparent rounded-t-md hover:bg-neutral-200 dark:hover:bg-neutral-700 tab--active"&#10; role="tab"&#10; aria-selected="true"&#10; data-tab-index="0"&#10; data-tab-label="bash"&gt;&#10; &lt;span class="flex items-center gap-1"&gt;&#10; &#10; bash&#10; &lt;/span&gt;&#10; &lt;/button&gt;&lt;button&#10; class="tab__button px-3 py-2 text-sm font-semibold border-b-2 border-transparent rounded-t-md hover:bg-neutral-200 dark:hover:bg-neutral-700 "&#10; role="tab"&#10; aria-selected="false"&#10; data-tab-index="1"&#10; data-tab-label="= &amp;amp; =="&gt;&#10; &lt;span class="flex items-center gap-1"&gt;&#10; &#10; = &amp;amp; ==&#10; &lt;/span&gt;&#10; &lt;/button&gt;&lt;button&#10; class="tab__button px-3 py-2 text-sm font-semibold border-b-2 border-transparent rounded-t-md hover:bg-neutral-200 dark:hover:bg-neutral-700 "&#10; role="tab"&#10; aria-selected="false"&#10; data-tab-index="2"&#10; data-tab-label="Brackets ["&gt;&#10; &lt;span class="flex items-center gap-1"&gt;&#10; &#10; Brackets [&#10; &lt;/span&gt;&#10; &lt;/button&gt;&lt;button&#10; class="tab__button px-3 py-2 text-sm font-semibold border-b-2 border-transparent rounded-t-md hover:bg-neutral-200 dark:hover:bg-neutral-700 "&#10; role="tab"&#10; aria-selected="false"&#10; data-tab-index="3"&#10; data-tab-label="bc"&gt;&#10; &lt;span class="flex items-center gap-1"&gt;&#10; &#10; bc&#10; &lt;/span&gt;&#10; &lt;/button&gt;&lt;button&#10; class="tab__button px-3 py-2 text-sm font-semibold border-b-2 border-transparent rounded-t-md hover:bg-neutral-200 dark:hover:bg-neutral-700 "&#10; role="tab"&#10; aria-selected="false"&#10; data-tab-index="4"&#10; data-tab-label="awk"&gt;&#10; &lt;span class="flex items-center gap-1"&gt;&#10; &#10; awk&#10; &lt;/span&gt;&#10; &lt;/button&gt;&lt;/div&gt;&#10; &lt;/div&gt;&#10; &lt;div class="tab__content mt-4"&gt;&lt;div class="tab__panel tab--active" data-tab-index="0"&gt;&#10; &lt;ul&gt;&#10;&lt;li&gt;Bash is a string oriented language&lt;/li&gt;&#10;&lt;li&gt;We do not write &lt;code&gt;step=$((step++))&lt;/code&gt; this expression will return a numeric value which the shell will then take as the command to to be executed.&lt;/li&gt;&#10;&lt;li&gt;No spaces are allowed around the equal sign for variable assignment.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;let &amp;quot;step++&amp;quot;&lt;/code&gt; is same as &lt;code&gt;(( step++ ))&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Use &lt;code&gt;declare&lt;/code&gt; to set variable values and attributes&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10; &lt;/div&gt;&lt;div class="tab__panel " data-tab-index="1"&gt;&#10; In bash &lt;code&gt;=&lt;/code&gt; and &lt;code&gt;==&lt;/code&gt; both mean the same thing&#10; &lt;/div&gt;&lt;div class="tab__panel " data-tab-index="2"&gt;&#10; &lt;blockquote&gt;&lt;p&gt;💬 What is the difference between &lt;code&gt;[&lt;/code&gt; and &lt;code&gt;[[&lt;/code&gt;?&lt;/p&gt;&#10;&lt;/blockquote&gt;&lt;ol class="not-prose my-10 space-y-5 border-s border-primary-200 ps-6 dark:border-primary-900"&gt;&#10;&lt;li class="relative"&gt;&#10; &lt;span class="absolute -start-10 top-0 flex h-8 w-8 items-center justify-center rounded-full bg-primary-600 text-sm font-black text-white ring-4 ring-neutral dark:ring-neutral-800"&gt;•&lt;/span&gt;&#10; &lt;h3 class="text-lg font-bold text-neutral-900 dark:text-white"&gt;if cd $dir; then&lt;/h3&gt;&#10; &lt;div class="mt-1 text-neutral-600 dark:text-neutral-400"&gt;&lt;p&gt;In this case the command &lt;code&gt;cd $dir&lt;/code&gt; will be executed and based on success or failure of the command executed the if or else part will be executed respectively.&lt;/p&gt;&#10;&lt;h3 class="relative group"&gt;&lt;code&gt;if [$dir]; then&lt;/code&gt;&#10; &lt;div id="if-dir-then" class="anchor"&gt;&lt;/div&gt;&#10;&lt;pre&gt;&lt;code&gt;&amp;lt;span&#10; class=&amp;quot;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&amp;quot;&amp;gt;&#10; &amp;lt;a class=&amp;quot;text-primary-300 dark:text-neutral-700 !no-underline&amp;quot; href=&amp;quot;#if-dir-then&amp;quot; aria-label=&amp;quot;Anchor&amp;quot;&amp;gt;#&amp;lt;/a&amp;gt;&#10;&amp;lt;/span&amp;gt;&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;/h3&gt;&#10;&lt;p&gt;Single bracket is equivalent to test command evaluate conditional expression&lt;/p&gt;&#10;&lt;ol class="not-prose my-10 space-y-5 border-s border-primary-200 ps-6 dark:border-primary-900"&gt;&#10;&lt;li class="relative"&gt;&#10; &lt;span class="absolute -start-10 top-0 flex h-8 w-8 items-center justify-center rounded-full bg-primary-600 text-sm font-black text-white ring-4 ring-neutral dark:ring-neutral-800"&gt;•&lt;/span&gt;&#10; &lt;h3 class="text-lg font-bold text-neutral-900 dark:text-white"&gt;&amp;lt; &amp;amp; &amp;gt;&lt;/h3&gt;&#10; &lt;div class="mt-1 text-neutral-600 dark:text-neutral-400"&gt;&lt;ul&gt;&#10;&lt;li&gt;Within &lt;code&gt;[&lt;/code&gt; compare using simple ASCII ordering &amp;amp; within &lt;code&gt;[[&lt;/code&gt; comparison is lexicographic.&lt;/li&gt;&#10;&lt;li&gt;Within &lt;code&gt;[&lt;/code&gt; you have to escape &lt;code&gt;\&amp;gt;&lt;/code&gt; to avoid redirection.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10; &lt;/div&gt;&lt;div class="tab__panel " data-tab-index="3"&gt;&#10; &lt;blockquote&gt;&lt;p&gt;💬 BC is a language?&lt;/p&gt;&#10;&lt;/blockquote&gt;&lt;div&#10; id="accordion-8263b81ba10c2527e53c5b24ef678386"&#10; class="border border-neutral-200 dark:border-neutral-700 rounded-lg overflow-hidden"&#10; data-accordion="collapse"&#10; data-accordion-separated="false"&#10;&gt;&#10;&lt;details&#10; class="group border-none"&#10; data-accordion-item&#10;&lt;blockquote&gt;&lt;/blockquote&gt; &lt;summary class="flex w-full cursor-pointer items-center justify-between gap-4 px-4 py-3 text-left text-lg font-semibold text-neutral-900 dark:text-neutral-100"&gt;&#10; &lt;span class="flex items-center gap-2"&gt;&#10;&lt;pre&gt;&lt;code&gt; &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&#10;&amp;lt;/span&amp;gt;&#10;&amp;lt;span class=&amp;quot;accordion-chevron ms-auto flex h-5 w-5 items-center justify-center print:hidden&amp;quot;&amp;gt;&#10; &amp;lt;span class=&amp;quot;relative block icon&amp;quot;&amp;gt;&amp;lt;svg&#10;&lt;/code&gt;&lt;/pre&gt;&#10;&lt;p&gt;xmlns=&amp;ldquo;&lt;a href="http://www.w3.org/2000/svg%22" target="_blank" rel="noreferrer"&gt;http://www.w3.org/2000/svg"&lt;/a&gt;&#10;viewBox=&amp;ldquo;0 0 20 20&amp;rdquo;&#10;fill=&amp;ldquo;currentColor&amp;rdquo;&#10;aria-hidden=&amp;ldquo;true&amp;rdquo;&lt;/p&gt;&#10;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;path&#10;fill-rule="evenodd"&#10;d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"&#10;clip-rule="evenodd"&#10;/&gt;&#10;&lt;/svg&gt;&#10;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/p&gt;&#10; &lt;/summary&gt;&#10;&lt;div class="px-4 pb-4 text-neutral-700 dark:text-neutral-300"&gt;&#10; &lt;/div&gt;&#10;&lt;/details&gt;&#10;&lt;/div&gt;&#10;&lt;style&gt;&#10; #accordion-8263b81ba10c2527e53c5b24ef678386 &gt; details + details {&#10; border-top: 1px solid rgb(var(--color-neutral-200));&#10; }&#10; .dark #accordion-8263b81ba10c2527e53c5b24ef678386 &gt; details + details {&#10; border-top-color: rgb(var(--color-neutral-700));&#10; }&#10;&lt;/style&gt;&#10;&lt;style&gt;&#10; #accordion-8263b81ba10c2527e53c5b24ef678386 details[data-accordion-item] &gt; summary .accordion-chevron {&#10; transform: rotate(-90deg);&#10; transition: transform 200ms ease-in-out;&#10; }&#10; #accordion-8263b81ba10c2527e53c5b24ef678386 details[data-accordion-item][open] &gt; summary .accordion-chevron {&#10; transform: rotate(0deg);&#10; }&#10;&lt;/style&gt;&#10;&lt;script&gt;&#10; (() =&gt; {&#10; const root = document.getElementById("accordion-8263b81ba10c2527e53c5b24ef678386");&#10; if (!root) return;&#10; const items = root.querySelectorAll("details[data-accordion-item]");&#10; items.forEach((item) =&gt; {&#10; item.addEventListener("toggle", () =&gt; {&#10; if (!item.open) return;&#10; items.forEach((other) =&gt; {&#10; if (other !== item) other.removeAttribute("open");&#10; });&#10; });&#10; });&#10; })();&#10;&lt;/script&gt;&#10;&lt;blockquote&gt;&lt;p&gt;💬 Supports arbitrary precision numbers with interactive execution of statements. (Command line)&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10; &lt;/div&gt;&lt;div class="tab__panel " data-tab-index="4"&gt;&#10; &lt;p&gt;&lt;code&gt;awk&lt;/code&gt; provides filtering capabilities&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;gt; printf &amp;#39;gate\napple\nwhat\nkite\n&amp;#39; | awk &amp;#39;/at/&amp;#39;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gate&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;what&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;printf &amp;#39;gate\napple\nwhat\nkite\n&amp;#39; | awk &amp;#39;!/e/&amp;#39;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;what&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;&lt;code&gt;awk&lt;/code&gt; is primarily used for field based processing&lt;/p&gt;&#10;&lt;p&gt;One liner structure &lt;code&gt;awk 'cond1{action1} cond2{action2} … condN{actionN}'&lt;/code&gt;&lt;/p&gt;&#10;&#10; &lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;</description></item><item><title>ISG: Information security governance</title><link>https://samarthya.me/posts/isg-information-security-governance/</link><pubDate>Thu, 20 May 2021 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/isg-information-security-governance/</guid><description>&lt;p&gt;Rules that run the organisation = Governance. ISG includes the element required to provide the Senior Management assurance that its direction and intent are reflected in the security posture of the organisation.&lt;/p&gt;</description></item><item><title>CISSP: Next target</title><link>https://samarthya.me/posts/cissp-next-target/</link><pubDate>Sat, 06 Mar 2021 18:08:34 +0000</pubDate><guid>https://samarthya.me/posts/cissp-next-target/</guid><description>&lt;p&gt;I just finished my upgrade to Safe Certification and now will be going for CISSP certification. Wish my luck guys!&lt;/p&gt;&#10;&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt="Illustration of a clipboard checklist and notebooks: study notes"&#10; width="300"&#10; height="98"&#10; src="https://samarthya.me/posts/cissp-next-target/notes.png"&#10; srcset="https://samarthya.me/posts/cissp-next-target/notes.png 800w, https://samarthya.me/posts/cissp-next-target/notes.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/cissp-next-target/notes.png"&gt;&lt;/figure&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Some quotes&#10; &lt;div id="some-quotes" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#some-quotes" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Effective security plans anticipates change, focuses on specific and achievable objectives, potential problems, and serves as the basis of decision making.&lt;/li&gt;&#10;&lt;li&gt;Operational plans are the shortest and most frequently updated&lt;/li&gt;&#10;&lt;li&gt;Tactical plans are mid term plans and supports strategical plans.&lt;/li&gt;&#10;&lt;li&gt;Strategic plans are the long term plans (usually 5 years) and usually includes risk assessment.&lt;/li&gt;&#10;&lt;li&gt;Data classification is the primary means by which data is protected based on its need for secrecy, sensitivity and confidentiality.&lt;/li&gt;&#10;&lt;li&gt;Data classification is the process of organizing objects, subjects, items into groups of similarities (value, cost, vulnerability, risk, power, privilege)&lt;/li&gt;&#10;&lt;li&gt;Stratify the process of organizing and securing data based on assigned labels of &lt;code&gt;importance and sensitivity&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Data classification also addresses how data is removed and destroyed.&lt;/li&gt;&#10;&lt;li&gt;Security policy is used to assign responsibilities, define acceptable risks, define roles, specify audit requirements and indicate compliance.&lt;/li&gt;&#10;&lt;li&gt;Security policy are not optional rather mandatory.&lt;/li&gt;&#10;&lt;li&gt;Three types of security policies are regulatory, advisory and informative.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item></channel></rss>