Skip to content

Commit

Permalink
Update Documentation Page Fri Sep 8 20:19:35 +07 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
j3ssie committed Sep 8, 2023
1 parent 260a723 commit 980fc1d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 78 deletions.
94 changes: 30 additions & 64 deletions docs/premium/git-setup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1141,61 +1141,10 @@



<label class="md-nav__link md-nav__link--active" for="__toc">
Git Setup for Premium Package
<span class="md-nav__icon md-icon"></span>
</label>

<a href="./" class="md-nav__link md-nav__link--active">
Git Setup for Premium Package
</a>



<nav class="md-nav md-nav--secondary" aria-label="Table of contents">






<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#setup-storages" class="md-nav__link">
Setup Storages
</a>

<nav class="md-nav" aria-label="Setup Storages">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#1-modify-the-content-of-storages-config-file-at-osmedeus-basetokenosm-varyaml" class="md-nav__link">
1. Modify the content of Storages Config file at ~/osmedeus-base/token/osm-var.yaml
</a>

</li>

<li class="md-nav__item">
<a href="#2-reload-the-config-to-clone-repo" class="md-nav__link">
2. Reload the config to clone repo
</a>

</li>

</ul>
</nav>

</li>

</ul>

</nav>

</li>


Expand Down Expand Up @@ -1303,40 +1252,57 @@ <h1 id="git-setup-for-premium-package"><img alt="☁" class="twemoji" src="https
<div class="admonition help">
<p>Note that this setup is <strong>Optional</strong>. You can still use the tool perfectly fine without it!</p>
</div>
<h2 id="setup-storages">Setup Storages<a class="headerlink" href="#setup-storages" title="Permanent link">&para;</a></h2>
<h1 id="setup-storages">Setup Storages<a class="headerlink" href="#setup-storages" title="Permanent link">&para;</a></h1>
<p>Check out <strong>the Private Playlist</strong> on the <strong>#backer</strong> channel in Discord to see a Video Instruction.</p>
<h3 id="1-modify-the-content-of-storages-config-file-at-osmedeus-basetokenosm-varyaml">1. Modify the content of Storages Config file at <code>~/osmedeus-base/token/osm-var.yaml</code><a class="headerlink" href="#1-modify-the-content-of-storages-config-file-at-osmedeus-basetokenosm-varyaml" title="Permanent link">&para;</a></h3>
<h2 id="1-modify-the-storages-section-in-the-token-file-at-osmedeus-basetokenosm-varyaml">1. Modify the <code>storages:</code> section in the token file at <code>~/osmedeus-base/token/osm-var.yaml</code><a class="headerlink" href="#1-modify-the-storages-section-in-the-token-file-at-osmedeus-basetokenosm-varyaml" title="Permanent link">&para;</a></h2>
<div class="admonition warning">
<p class="admonition-title">Run these commands below if you not using git before</p>
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>config<span class="w"> </span>--global<span class="w"> </span>user.name<span class="w"> </span><span class="s2">&quot;your_gitlab_user&quot;</span>
git<span class="w"> </span>config<span class="w"> </span>--global<span class="w"> </span>user.email<span class="w"> </span><span class="s2">&quot;[email protected]&quot;</span>
</code></pre></div>
</div>
<p>Please change your username and repository name from <code>your_gitlab_username</code> is your gitlab username and <code>dosm-*</code> are your Gitlab repo names.</p>
<h3 id="the-content-of-storages-looks-like-below">The content of storages looks like below<a class="headerlink" href="#the-content-of-storages-looks-like-below" title="Permanent link">&para;</a></h3>
<div class="highlight"><pre><span></span><code><span class="nt">storages</span><span class="p">:</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SECRET_KEY</span>
<span class="w"> </span><span class="nt">assets_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ASSETS_REPO</span>
<span class="w"> </span><span class="nt">assets_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/assets</span>
<span class="w"> </span><span class="nt">http_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">HTTP_REPO</span>
<span class="w"> </span><span class="nt">http_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/http</span>
<span class="w"> </span><span class="nt">mics_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">MICS_REPO</span>
<span class="w"> </span><span class="nt">mics_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/mics</span>
<span class="w"> </span><span class="nt">paths_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]:your_gitlab_username/dosm-paths.git</span>
<span class="w"> </span><span class="nt">paths_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">PATHS_REPO</span>
<span class="w"> </span><span class="nt">paths_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/paths</span>
<span class="w"> </span><span class="nt">ports_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]:your_gitlab_username/dosm-ports.git</span>
<span class="w"> </span><span class="nt">ports_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">PORTS_REPO</span>
<span class="w"> </span><span class="nt">ports_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/ports</span>
<span class="w"> </span><span class="nt">subdomain_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]:your_gitlab_username/dosm-subdomain.git</span>
<span class="w"> </span><span class="nt">secret_key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SECRET_KEY</span>
<span class="w"> </span><span class="nt">subdomain_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">SUBDOMAIN_REPO</span>
<span class="w"> </span><span class="nt">subdomain_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/subdomain</span>
<span class="w"> </span><span class="nt">summary_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]:your_gitlab_username/dosm-summary.git</span>
<span class="w"> </span><span class="nt">summary_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/summary</span>
<span class="w"> </span><span class="nt">vuln_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">[email protected]:your_gitlab_username/dosm-vuln.git</span>
<span class="w"> </span><span class="nt">vuln_repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">VULN_REPO</span>
<span class="w"> </span><span class="nt">vuln_storage</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">~/.osmedeus/storages/vuln</span>
</code></pre></div>
<p>Change the <code>SECRET_KEY</code> to the path of your secret key that can do the push/pull to your git repo.</p>
<h3 id="2-reload-the-config-to-clone-repo">2. Reload the config to clone repo<a class="headerlink" href="#2-reload-the-config-to-clone-repo" title="Permanent link">&para;</a></h3>
<div class="highlight"><pre><span></span><code><span class="c1">#reload config to cloning the repo</span>

osmedeus<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--threads-hold<span class="o">=</span><span class="m">10</span>
<div class="admonition info">
<p class="admonition-title">Kindly note that you are not required to configure all the repositories and destinations for this. Typically, I only utilize three repositories: summary_repo, paths_repo, and vuln_repo.</p>
</div>
<p>You'll be required to make adjustments to certain values listed below.
- [x] Change the <code>SECRET_KEY</code> to the path of your secret key that can do the push/pull to your git repo.
- [x] Change the <code>your_gitlab_username</code> to your Gitlab user name
- [x] Change the <code>SUMMARY_REPO</code> or <code>[email protected]:your_gitlab_username/dosm-summary.git</code> to your Gitlab repo.</p>
<hr />
<h3 id="understand-the-storages-config-pair">Understand the storages config pair<a class="headerlink" href="#understand-the-storages-config-pair" title="Permanent link">&para;</a></h3>
<p>The <code>summary_repo</code> and <code>summary_storage</code> are closely linked, and the same concept applies to the other pairs, such as <code>vuln_repo</code> and <code>vuln_storage</code>.
- <code>summary_storage</code> is a local folder in your instance and in this case it will be <code>~/.osmedeus/storages/summary</code>
- <code>summary_repo</code> is your gitlab repository and in this case <code>[email protected]:your_gitlab_username/dosm-summary.git</code>. This repo will be clone to the your local machine and after you put everything in that folder </p>
<p>Once you've configured the Git storages, the workflow will manage how data is copied/appended to the local folder and subsequently push the latest changes to your repository.</p>
<div class="highlight"><pre><span></span><code><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">scripts</span><span class="p">:</span>
<span class="w"> </span><span class="c1"># This will copy the the output of probing module to </span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ExecCmd(&quot;cp {{Output}}/probing/dns-{{Workspace}}.txt {{Storages}}/summary/{{Workspace}}/dns-{{Workspace}}.txt&quot;)</span>
<span class="w"> </span><span class="c1"># This will do a git push to `[email protected]:your_gitlab_username/dosm-summary.git` repository</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">PushFolder(&quot;{{Storages}}/summary/&quot;)</span>
</code></pre></div>
<h2 id="2-reload-the-config-to-clone-repo">2. Reload the config to clone repo<a class="headerlink" href="#2-reload-the-config-to-clone-repo" title="Permanent link">&para;</a></h2>
<div class="highlight"><pre><span></span><code><span class="c1"># reload config to cloning the repo</span>
osmedeus<span class="w"> </span>config<span class="w"> </span>check

<span class="c1"># then check out your storages folder at `~/.osmedeus/storages/summary`</span>
ls<span class="w"> </span>~/.osmedeus/storages/summary/<span class="w"> </span>
Expand Down
2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

Binary file modified docs/sitemap.xml.gz
Binary file not shown.
49 changes: 36 additions & 13 deletions src/premium/git-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
!!! help ""
Note that this setup is **Optional**. You can still use the tool perfectly fine without it!

## Setup Storages
# Setup Storages

Check out **the Private Playlist** on the **#backer** channel in Discord to see a Video Instruction.

### 1. Modify the content of Storages Config file at `~/osmedeus-base/token/osm-var.yaml`

## 1. Modify the `storages:` section in the token file at `~/osmedeus-base/token/osm-var.yaml`

!!! warning "Run these commands below if you not using git before"

Expand All @@ -19,37 +18,61 @@ Check out **the Private Playlist** on the **#backer** channel in Discord to see
git config --global user.email "[email protected]"
```

Please change your username and repository name from `your_gitlab_username` is your gitlab username and `dosm-*` are your Gitlab repo names.
### The content of storages looks like below

```yaml
storages:
secret_key: SECRET_KEY
assets_repo: ASSETS_REPO
assets_storage: ~/.osmedeus/storages/assets
http_repo: HTTP_REPO
http_storage: ~/.osmedeus/storages/http
mics_repo: MICS_REPO
mics_storage: ~/.osmedeus/storages/mics
paths_repo: [email protected]:your_gitlab_username/dosm-paths.git
paths_repo: PATHS_REPO
paths_storage: ~/.osmedeus/storages/paths
ports_repo: [email protected]:your_gitlab_username/dosm-ports.git
ports_repo: PORTS_REPO
ports_storage: ~/.osmedeus/storages/ports
subdomain_repo: [email protected]:your_gitlab_username/dosm-subdomain.git
secret_key: SECRET_KEY
subdomain_repo: SUBDOMAIN_REPO
subdomain_storage: ~/.osmedeus/storages/subdomain
summary_repo: [email protected]:your_gitlab_username/dosm-summary.git
summary_storage: ~/.osmedeus/storages/summary
vuln_repo: [email protected]:your_gitlab_username/dosm-vuln.git
vuln_repo: VULN_REPO
vuln_storage: ~/.osmedeus/storages/vuln
```

Change the `SECRET_KEY` to the path of your secret key that can do the push/pull to your git repo.
!!! info "Kindly note that you are not required to configure all the repositories and destinations for this. Typically, I only utilize three repositories: summary_repo, paths_repo, and vuln_repo."

You'll be required to make adjustments to certain values listed below.
- [x] Change the `SECRET_KEY` to the path of your secret key that can do the push/pull to your git repo.
- [x] Change the `your_gitlab_username` to your Gitlab user name
- [x] Change the `SUMMARY_REPO` or `[email protected]:your_gitlab_username/dosm-summary.git` to your Gitlab repo.

***

### Understand the storages config pair

The `summary_repo` and `summary_storage` are closely linked, and the same concept applies to the other pairs, such as `vuln_repo` and `vuln_storage`.
- `summary_storage` is a local folder in your instance and in this case it will be `~/.osmedeus/storages/summary`
- `summary_repo` is your gitlab repository and in this case `[email protected]:your_gitlab_username/dosm-summary.git`. This repo will be clone to the your local machine and after you put everything in that folder

Once you've configured the Git storages, the workflow will manage how data is copied/appended to the local folder and subsequently push the latest changes to your repository.

```yaml
- scripts:
# This will copy the the output of probing module to
- ExecCmd("cp {{Output}}/probing/dns-{{Workspace}}.txt {{Storages}}/summary/{{Workspace}}/dns-{{Workspace}}.txt")
# This will do a git push to `[email protected]:your_gitlab_username/dosm-summary.git` repository
- PushFolder("{{Storages}}/summary/")
```


### 2. Reload the config to clone repo
## 2. Reload the config to clone repo

```shell
#reload config to cloning the repo

osmedeus config set --threads-hold=10
# reload config to cloning the repo
osmedeus config check

# then check out your storages folder at `~/.osmedeus/storages/summary`
ls ~/.osmedeus/storages/summary/
Expand Down

0 comments on commit 980fc1d

Please sign in to comment.