<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dmitry</title>
    <description>The latest articles on Forem by Dmitry (@dskuratovich).</description>
    <link>https://forem.com/dskuratovich</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F98071%2F1d982eca-a15f-4d61-a512-7d14dd3e3643.jpeg</url>
      <title>Forem: Dmitry</title>
      <link>https://forem.com/dskuratovich</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dskuratovich"/>
    <language>en</language>
    <item>
      <title>DC++ Clients (Java, Kotlin)</title>
      <dc:creator>Dmitry</dc:creator>
      <pubDate>Wed, 02 Jan 2019 21:23:27 +0000</pubDate>
      <link>https://forem.com/dskuratovich/dc-clients-java-kotlin-4dkd</link>
      <guid>https://forem.com/dskuratovich/dc-clients-java-kotlin-4dkd</guid>
      <description>

&lt;p&gt;Hello everybody!&lt;/p&gt;

&lt;p&gt;I've decided to train my skills in Java/Kotlin; the topic for this purpose is DC++ client, so for now I'm wondering does anybody know whether it's possible to find any information about it?&lt;/p&gt;

&lt;p&gt;I was trying to google, but I didn't succeed, so I'd be glad if there are examples, articles, specifications!&lt;/p&gt;

&lt;p&gt;Thanks in advance&lt;/p&gt;


</description>
      <category>help</category>
      <category>dc</category>
      <category>java</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Killing many procs at one time</title>
      <dc:creator>Dmitry</dc:creator>
      <pubDate>Tue, 04 Sep 2018 11:05:07 +0000</pubDate>
      <link>https://forem.com/dskuratovich/killing-many-procs-at-one-time-5dbe</link>
      <guid>https://forem.com/dskuratovich/killing-many-procs-at-one-time-5dbe</guid>
      <description>&lt;p&gt;Sometimes I have a desire to kill many processes using just one line of my BASH console. All this stuff like finding out PIDs from &lt;code&gt;top&lt;/code&gt; or &lt;code&gt;ps&lt;/code&gt; commands, killing them manually makes me suffer!&lt;/p&gt;

&lt;p&gt;Deal, it has to be a shell-script in order to automate it!&lt;br&gt;
First of all we got to create an empty file to put commands into it, let us do it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;kill-all.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the file is created we have to make it executable, easily:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x ./kill-all.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have a script that could be run and we got to fill it with some helpful instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Defining a proc name&lt;/span&gt;
&lt;span class="nv"&gt;proc_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;

&lt;span class="c"&gt;# Clearing stdout&lt;/span&gt;
clear

&lt;span class="c"&gt;# Performing killing&lt;/span&gt;
ps &lt;span class="nt"&gt;-aux&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$proc_name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nb"&gt;grep&lt;/span&gt; | &lt;span class="nb"&gt;cut&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 10-15 | xargs &lt;span class="nb"&gt;sudo kill&lt;/span&gt; &lt;span class="nt"&gt;-9&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's done! Now if you are going to kill many processes with same name you just need to run this quite simple instruction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./kill-all.sh slack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will lead you to close all the processes with name &lt;code&gt;slack&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this article! You may follow me in order to be updated with most new articles from my side.&lt;/p&gt;

&lt;p&gt;As usual if you have anything just let me know about it in the comments!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ubuntu</category>
      <category>bash</category>
      <category>kill</category>
      <category>linux</category>
    </item>
    <item>
      <title>7zip archives under attack!</title>
      <dc:creator>Dmitry</dc:creator>
      <pubDate>Mon, 03 Sep 2018 15:55:22 +0000</pubDate>
      <link>https://forem.com/dskuratovich/7zip-archives-under-attack-3jb6</link>
      <guid>https://forem.com/dskuratovich/7zip-archives-under-attack-3jb6</guid>
      <description>&lt;p&gt;&lt;em&gt;Notice! This article is for folks who are familiar with BASH-console a bit.&lt;br&gt;
If you feel you do not realize how it works let me know in comments please!&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I think that one from my mind is correct, I just need to try all those two hundred ones! &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Does that remember you anything?&lt;/p&gt;

&lt;p&gt;Sometime people face situation they do not remember the password on an archive, but at the same time they remember that is sort of simple one.&lt;/p&gt;

&lt;p&gt;Sometime we know that the password is one of those couples in our mind, but we do not remember which exactly!&lt;br&gt;
For such cases it would be good to have some mechanism or practice to find out the correct one, so that means we need to think about it and produce a solution!&lt;/p&gt;

&lt;p&gt;In this article I will show you how an archive could be attacked using 7zip command-line interface without many efforts.&lt;/p&gt;

&lt;p&gt;The first thing we need to think about is how many passwords we remember.&lt;br&gt;
Let us say we remember ten of those, that means we need to arrange a list of those.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;password&lt;br&gt;
makemoneymonkey &lt;br&gt;
...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Okay, let us say we have needed file and it already contains all needed passwords you could remember.&lt;br&gt;
Then we have to use this file in conjunction with 7zip command-line interface.&lt;/p&gt;

&lt;p&gt;All what we got to do in this case is just running the following script from a folder you have an archive that is going to be attacked using that dictionary.&lt;br&gt;
Okay, let us see how it works in real life!&lt;/p&gt;

&lt;p&gt;I have already prepared a script that allows us to run 7zip command-line interface against each password, check it out here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;passwords_list&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"passwords-list"&lt;/span&gt;
&lt;span class="nv"&gt;archive&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Starting attacking"&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; line_data&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nv"&gt;result&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;7z t &lt;span class="nv"&gt;$archive&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$line_data&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; 2&amp;gt; /dev/null | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="s2"&gt;"is Ok"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nv"&gt;$result&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Excellent! Password is &lt;/span&gt;&lt;span class="nv"&gt;$line_data&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="nb"&gt;exit
    &lt;/span&gt;&lt;span class="k"&gt;fi
done&lt;/span&gt; &amp;lt; &lt;span class="nv"&gt;$passwords_list&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Sorry we didn't find any appropriate password :-("&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Please let me know whether this article has been helpful or not&lt;/em&gt;&lt;/p&gt;

</description>
      <category>7zip</category>
      <category>attack</category>
      <category>dictionary</category>
      <category>shell</category>
    </item>
  </channel>
</rss>
