forked from Winux-kaggle-club/winuxdroid
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.xml
909 lines (850 loc) · 74.2 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Winux Kaggle Club</title>
<link>https://winuxdroid.com/</link>
<description>Recent content on Winux Kaggle Club</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Thu, 04 Mar 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://winuxdroid.com/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>How to Import *.sql Files in MySQL + Download Sample Tables & Database</title>
<link>https://winuxdroid.com/post/how-to-import-.sql-in-mysql-sample-database-download/</link>
<pubDate>Thu, 04 Mar 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/how-to-import-.sql-in-mysql-sample-database-download/</guid>
<description>
<p>In this tutorial we will see how to import .sql (tables or databases) files in MySQL-CLI.</p>
<p>MariaDB and MySQL have some differences and similarities although both are commonly known as MySQL. We will use MariaDB as our database management system throughout this tutorial.</p>
<p>You can see below how the MySQL and MariaDB prompts look like :</p>
<ul>
<li>MySQL prompt:</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>mysql&gt;
</code></pre></div><ul>
<li>MariaDB prompt:</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [(none)]&gt;
</code></pre></div><h2 id="what-is-a-sql-file-">What is a .sql file ?</h2>
<p>The *.sql extension is a file which contains some sql statements like — Create - Select - Insert - View etc. in a proper order to perform the creation of databases and tables. It is also known as &quot;dump&quot; because it is basically a mysql export.</p>
<h2 id="creating-database">Creating Database</h2>
<p>First of all, we have to create a database in which we can import sql tables.</p>
<p>Let's create a database named &quot;<em>test</em>&quot; using the CREATE DATABASE statement :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [(none)]&gt; CREATE DATABASE test;
</code></pre></div><p>Select the &quot;<em>test</em>&quot; database as the default database using USE statement :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [(none)]&gt; USE test;
</code></pre></div><br>
<h2 id="importing-sql-sample-tables">Importing *.sql Sample Tables</h2>
<p>We have two sample tables here. We will import them in our &quot;<em>test</em>&quot; database :</p>
<ul>
<li>event table</li>
<li>pet table</li>
</ul>
<h3 id="event-table">Event table</h3>
<p>Download and extract the following zip file in your working directory : <a href="https://github.com/thetechnohack/files/raw/main/mysql%20samples/event-table.zip" class="buttonDownload">Download event-table.zip</a></p>
<p>You can see that there are two files in event-table folder :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>event-table
<span class="ln">2</span>├── cr_event_tbl.sql
<span class="ln">3</span>└── event.txt
</code></pre></div><p>But why do we need two separate files ??</p>
<p>It is because the sql file here is only containing the table structure and the text file is holding the values for that table structure.
But it is not necessary to use two different files, we can also hold table structure and values together in a sql file.</p>
<ol>
<li><strong>cr_event_tbl.sql</strong></li>
</ol>
<p>This file contains the table structure or table format.</p>
<p>Import this file using the SOURCE statement as shown below :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [test]&gt; SOURCE cr_event_tbl.sql
</code></pre></div><p>It will create an empty table &quot;<em>event</em>&quot; :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [test]&gt; SHOW TABLES;
<span class="ln">2</span>+---------------------+
<span class="ln">3</span>| Tables_in_test |
<span class="ln">4</span>+---------------------+
<span class="ln">5</span>| event |
<span class="ln">6</span>+---------------------+
<span class="ln">7</span>1 row in set (0.010 sec)
</code></pre></div><ol start="2">
<li><strong>event.txt</strong></li>
</ol>
<p>This file contains the data (values) for event table. We need to load this data in event table.</p>
<p>Use the below statement to load the event.txt in event table :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [test]&gt; LOAD DATA LOCAL INFILE &#39;event.txt&#39; INTO TABLE event;
</code></pre></div><p>Now we have the complete table. You can see the complete table using the SELECT statement:</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln"> 1</span>MariaDB [test]&gt; SELECT * FROM event;
<span class="ln"> 2</span>+----------+------------+----------+-----------------------------+
<span class="ln"> 3</span>| name | date | type | remark |
<span class="ln"> 4</span>+----------+------------+----------+-----------------------------+
<span class="ln"> 5</span>| Fluffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male |
<span class="ln"> 6</span>| Buffy | 1993-06-23 | litter | 5 puppies, 2 female, 3 male |
<span class="ln"> 7</span>| Buffy | 1994-06-19 | litter | 3 puppies, 3 female |
<span class="ln"> 8</span>| Chirpy | 1999-03-21 | vet | needed beak straightened |
<span class="ln"> 9</span>| Slim | 1997-08-03 | vet | broken rib |
<span class="ln">10</span>| Bowser | 1991-10-12 | kennel | NULL |
<span class="ln">11</span>| Fang | 1991-10-12 | kennel | NULL |
<span class="ln">12</span>| Fang | 1998-08-28 | birthday | Gave him a new chew toy |
<span class="ln">13</span>| Claws | 1998-03-17 | birthday | Gave him a new flea collar |
<span class="ln">14</span>| Whistler | 1998-12-09 | birthday | First birthday |
<span class="ln">15</span>+----------+------------+----------+-----------------------------+
<span class="ln">16</span>10 rows in set (0.012 sec)
</code></pre></div><h3 id="pet-table">Pet table</h3>
<p>Download and extract the following zip file in your working directory : <a href="https://github.com/thetechnohack/files/raw/main/mysql%20samples/pet-table.zip" class="buttonDownload">Download pet-table.zip</a></p>
<p>Follow the same procedure as we done above.</p>
<p>Folder structure of pet-table :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>pet-table
<span class="ln">2</span>├── cr_pet_tbl.sql
<span class="ln">3</span>└── pet.txt
</code></pre></div><ol>
<li><strong>cr_pet_tbl.sql</strong></li>
</ol>
<p>Importing <em>cr_pet_tbl.sql</em> in &quot;<em>test</em>&quot; database :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [test]&gt; SOURCE cr_pet_tbl.sql
</code></pre></div><p>This will create a new empty table as name &quot;<em>pet</em>&quot; :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [test]&gt; SHOW TABLES;
<span class="ln">2</span>+---------------------+
<span class="ln">3</span>| Tables_in_test |
<span class="ln">4</span>+---------------------+
<span class="ln">5</span>| event |
<span class="ln">6</span>| pet |
<span class="ln">7</span>+---------------------+
<span class="ln">8</span>2 rows in set (0.010 sec)
</code></pre></div><ol start="2">
<li><strong>pet.txt</strong></li>
</ol>
<p>Load data form pet.txt in pet table :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [test]&gt; LOAD DATA LOCAL INFILE &#39;pet.txt&#39; INTO TABLE pet;
</code></pre></div><p>Print the entire table using SELECT statement :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln"> 1</span>MariaDB [test]&gt; SELECT * FROM pet;
<span class="ln"> 2</span>+----------+--------+---------+------+------------+------------+
<span class="ln"> 3</span>| name | owner | species | sex | birth | death |
<span class="ln"> 4</span>+----------+--------+---------+------+------------+------------+
<span class="ln"> 5</span>| Fluffy | Harold | cat | f | 1993-02-04 | NULL |
<span class="ln"> 6</span>| Claws | Gwen | cat | m | 1994-03-17 | NULL |
<span class="ln"> 7</span>| Buffy | Harold | dog | f | 1989-05-13 | NULL |
<span class="ln"> 8</span>| Fang | Benny | dog | m | 1990-08-27 | NULL |
<span class="ln"> 9</span>| Bowser | Diane | dog | m | 1979-08-31 | 1995-07-29 |
<span class="ln">10</span>| Chirpy | Gwen | bird | f | 1998-09-11 | NULL |
<span class="ln">11</span>| Whistler | Gwen | bird | NULL | 1997-12-09 | NULL |
<span class="ln">12</span>| Slim | Benny | snake | m | 1996-04-29 | NULL |
<span class="ln">13</span>+----------+--------+---------+------+------------+------------+
<span class="ln">14</span>8 rows in set (0.011 sec)
</code></pre></div><h2 id="importing-sample-sql-database">Importing Sample .sql database</h2>
<p>Here, we have a .sql database dump, which means you don't need to create an empty table first and then import data into it. It will automatically create a database with some sample tables in it.</p>
<p>Download and extract the following zip file in your working directory : <a href="https://github.com/thetechnohack/files/raw/main/mysql%20samples/mydb.zip" class="buttonDownload">Download database</a></p>
<p>Now just use the SOURCE statement :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [(none)]&gt; SOURCE mysqlsampledatabase.sql;
</code></pre></div><p>It will create a database, <strong>classicmodels</strong> with some tables in it.</p>
<p>Select the <strong>classicmodels</strong> as default database :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>MariaDB [(none)]&gt; USE classicmodels;
</code></pre></div><p>There are different tables for practicing MySQL statements :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln"> 1</span>MariaDB [classicmodels]&gt; SHOW TABLES;
<span class="ln"> 2</span>+-------------------------+
<span class="ln"> 3</span>| Tables_in_classicmodels |
<span class="ln"> 4</span>+-------------------------+
<span class="ln"> 5</span>| customers |
<span class="ln"> 6</span>| employees |
<span class="ln"> 7</span>| offices |
<span class="ln"> 8</span>| orderdetails |
<span class="ln"> 9</span>| orders |
<span class="ln">10</span>| payments |
<span class="ln">11</span>| productlines |
<span class="ln">12</span>| products |
<span class="ln">13</span>+-------------------------+
<span class="ln">14</span>8 rows in set (0.001 sec)
</code></pre></div><p>Hope you liked this tutorial.
Comment your suggestions and queries. <strong>We always appreciate your feedback 😊</strong></p>
<br>
<style>
.buttonDownload {
display: inline-block;
position: relative;
padding: 10px 25px;
background-color: #4CC713;
color: white;
font-family: sans-serif;
text-decoration: none;
font-size: 0.9em;
text-align: center;
text-indent: 15px;
border-radius: 8px;
outline: none;
}
.buttonDownload:hover {
background-color: #333;
color: white;
}
.buttonDownload:before, .buttonDownload:after {
content: ' ';
display: block;
position: absolute;
left: 15px;
top: 52%;
}
/* Download box shape */
.buttonDownload:before {
width: 10px;
height: 2px;
border-style: solid;
border-width: 0 2px 2px;
}
/* Download arrow shape */
.buttonDownload:after {
width: 0;
height: 0;
margin-left: 3px;
margin-top: -7px;
border-style: solid;
border-width: 4px 4px 0 4px;
border-color: transparent;
border-top-color: inherit;
animation: downloadArrow 2s linear infinite;
animation-play-state: paused;
}
.buttonDownload:hover:before {
border-color: #4CC713;
}
.buttonDownload:hover:after {
border-top-color: #4CC713;
animation-play-state: running;
}
/* keyframes for the download icon anim */
@keyframes downloadArrow {
/* 0% and 0.001% keyframes used as a hackish way of having the button frozen on a nice looking frame by default */
0% {
margin-top: -7px;
opacity: 1;
}
0.001% {
margin-top: -15px;
opacity: 0;
}
50% {
opacity: 1;
}
100% {
margin-top: 0;
opacity: 0;
}
}
</style>
</description>
</item>
<item>
<title>How to Install MySQL Server and Client on Android</title>
<link>https://winuxdroid.com/post/how-to-install-mysql-server-and-client-on-android/</link>
<pubDate>Fri, 26 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/how-to-install-mysql-server-and-client-on-android/</guid>
<description>
<p>If you are still stucked in installation of MySQL (MariaDB) on your android — don't worry we have a quick and best solution for that.</p>
<p>We have already done a tutorial on this topic : <a href="https://winuxdroid.com/post/how-to-install-mysql-on-android-with-termux/">How to Install MySQL (MariaDB) on Android With Termux</a> <br>
But this tutorial on how to install mysql is going to be far more easy and straightforward than our old tutorial.</p>
<p>We made a simple tool (bash scripting) to solve this problem, which automates all the processes and you only need to use some easy instructions commands.</p>
<blockquote>
<p><strong>NOTE :</strong> This only works for android devices as termux is only available for android.</p>
</blockquote>
<h2 id="installation">Installation</h2>
<ol>
<li>
<p>Install Termux App (<a href="https://play.google.com/store/apps/details?id=com.termux">Click Here</a>)</p>
</li>
<li>
<p>Open Termux Application</p>
</li>
<li>
<p>Copy &amp; Paste The Below Command :</p>
</li>
</ol>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>apt update <span class="o">&amp;&amp;</span> apt upgrade<span class="p">;</span> pkg install wget<span class="p">;</span> <span class="nb">cd</span> ..<span class="p">;</span> wget -O mysql.tar.gz <span class="s2">&#34;https://github.com/sumit-buddy/mysql-for-termux-android/archive/v1.0.tar.gz&#34;</span><span class="p">;</span> tar -xzf mysql.tar.gz -C home --strip-components <span class="m">1</span> <span class="o">&amp;&amp;</span> rm mysql.tar.gz <span class="o">&amp;&amp;</span> <span class="nb">cd</span> home <span class="o">&amp;&amp;</span> rm -r images <span class="o">&amp;&amp;</span> rm README.md<span class="p">;</span> chmod u+x installer.sh<span class="p">;</span> ./installer.sh<span class="p">;</span> <span class="nb">source</span> ~/../usr/etc/bash.bashrc<span class="p">;</span> rm installer.sh
</code></pre></div><ol start="4">
<li>
<p>Now the installation will begin. <br>
(<strong>Please be patient as this may take some time depending on your internet speed</strong>)</p>
</li>
<li>
<p>You will be asked to answer
<ins><code>Do you want to continue? [Y/n]</code></ins>
upto three times. Each time type in '<em>y</em>' and press enter.</p>
</li>
<li>
<p>After that, the following pop-up will appear. You can simply allow because this app does not consume much battery at all :</p>
</li>
</ol>
<p><img src="https://raw.githubusercontent.com/sumit-buddy/mysql-for-termux-android/master/images/stop-optimizing-battery-usage.jpg#image" alt="stop optimizing battery usage?"></p>
<ol start="7">
<li>When the entire installation process is completed, a text saying &quot;<strong>MySQL installed successfully</strong>&quot; should appear. <br>
Now, the MySQL server has started on your machine and you are all set to use MySQL.</li>
</ol>
<h2 id="commands">Commands</h2>
<ul>
<li><ins>start-server</ins></li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>start-server
</code></pre></div><p>Run this command to start MySQL server. (<strong>First time during installation the server starts by default, so no need to run there</strong>)</p>
<ul>
<li><ins>setpass</ins></li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>setpass
</code></pre></div><p>Use this command to set a password for the user. (<strong>This can only be done while the server is running.</strong>)</p>
<ul>
<li><ins>start-client</ins></li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>start-client
</code></pre></div><p>Run this command to start the MySQL client.</p>
<ul>
<li><ins>stop-server</ins></li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>stop-server
</code></pre></div><p>Use this command to stop MySQL server (daemon). <br>
<strong>Must use this command to stop MySQL server after exiting mariadb, otherwise when you try to start the server again you will get the error : <code>Error 2002 (HY000)</code></strong></p>
<h2 id="troubleshooting-errors">Troubleshooting Errors</h2>
<ol>
<li>If you get any errors during or after installation, you can check the log file using the command:</li>
</ol>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>cat logs.log
</code></pre></div><ol start="2">
<li>If you get the following error — use the command <code>stop-server</code> and then restart using <code>start-server</code> command :</li>
</ol>
<div class="highlight"><pre class="chroma"><code class="language-shell" data-lang="shell"><span class="ln">1</span>Error <span class="m">2002</span> <span class="o">(</span>HY000<span class="o">)</span>: Can<span class="s1">&#39;t connect to local MySQL server through the socket &#39;</span>/data/data/com.termux/files/usr/tmp/mysqld.sock<span class="err">&#39;</span> <span class="o">(</span>111<span class="o">)</span>
</code></pre></div><p>If you're still finding it difficult or having some error, you can send a screenshot of your error and ask for help...</p>
<style>
img[src$="#image"] {
border-radius: 10px;
}
</style>
<br>
</description>
</item>
<item>
<title>Trojan Horse – What is it ?</title>
<link>https://winuxdroid.com/post/what-are-trojans/</link>
<pubDate>Tue, 23 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/what-are-trojans/</guid>
<description>
<h2 id="what-is-a-trojan-">What is a Trojan ?</h2>
<p>A Trojan horse, or Trojan, is a type of malicious code or software that looks legitimate but can take control of your computer. A Trojan is designed to damage, disrupt, steal, or in general inflict some other harmful action on your data or network.</p>
<p>A Trojan acts like a bona fide application or file to trick you. It seeks to deceive you into loading and executing the malware on your device. Once installed, a Trojan can perform the action it was designed for.</p>
<p>A Trojan is sometimes called a Trojan virus or a Trojan horse virus, but that’s a misnomer. Viruses can execute and replicate themselves. A Trojan cannot. A user has to execute Trojans. Even so, Trojan malware and Trojan virus are often used interchangeably.</p>
<p>Whether you prefer calling it Trojan malware or a Trojan virus, it’s smart to know how this infiltrator works and what you can do to keep your devices safe.</p>
<h2 id="how-do-trojans-work">How Do Trojans Work?</h2>
<p>Here’s a Trojan malware example to show how it works.</p>
<p>You might think you’ve received an email from someone you know and click on what looks like a legitimate attachment. But you’ve been fooled. The email is from a cybercriminal, and the file you clicked on — and downloaded and opened — has gone on to install malware on your device.</p>
<p>When you execute the program, the malware can spread to other files and damage your computer.</p>
<p>How? It varies. Trojans are designed to do different things. But you’ll probably wish they weren’t doing any of them on your device.</p>
<h2 id="common-types-of-trojan-malware-from-a-to-z">Common Types Of Trojan Malware, From A to Z</h2>
<p>Here’s a look at some of the most common types of Trojan malware, including their names and what they do on your computer:</p>
<h4 id="backdoor-trojan">Backdoor Trojan</h4>
<p>This Trojan can create a “backdoor” on your computer. It lets an attacker access your computer and control it. Your data can be downloaded by a third party and stolen. Or more malware can be uploaded to your device.</p>
<h4 id="distributed-denial-of-service-ddos-attack-trojan">Distributed Denial of Service (DDoS) attack Trojan</h4>
<p>This Trojan performs DDoS attacks. The idea is to take down a network by flooding it with traffic. That traffic comes from your infected computer and others.</p>
<h4 id="downloader-trojan">Downloader Trojan</h4>
<p>This Trojan targets your already-infected computer. It downloads and installs new versions of malicious programs. These can include Trojans and adware.</p>
<h4 id="fake-av-trojan">Fake AV Trojan</h4>
<p>This Trojan behaves like antivirus software, but demands money from you to detect and remove threats, whether they’re real or fake.</p>
<h4 id="game-thief-trojan">Game-thief Trojan</h4>
<p>The losers here may be online gamers. This Trojan seeks to steal their account information.</p>
<h4 id="infostealer-trojan">Infostealer Trojan</h4>
<p>As it sounds, this Trojan is after data on your infected computer.</p>
<h4 id="mailfinder-trojan">Mailfinder Trojan</h4>
<p>This Trojan seeks to steal the email addresses you’ve accumulated on your device.</p>
<h4 id="ransom-trojan">Ransom Trojan</h4>
<p>This Trojan seeks a ransom to undo damage it has done to your computer. This can include blocking your data or impairing your computer’s performance.</p>
<h4 id="remote-access-trojan">Remote Access Trojan</h4>
<p>This Trojan can give an attacker full control over your computer via a remote network connection. Its uses include stealing your information or spying on you.</p>
<h4 id="rootkit-trojan">Rootkit Trojan</h4>
<p>A rootkit aims to hide or obscure an object on your infected computer. The idea? To extend the time a malicious program runs on your device.</p>
<h4 id="sms-trojan">SMS Trojan</h4>
<p>This type of Trojan infects your mobile device and can send and intercept text messages. Texts to premium-rate numbers can drive up your phone costs.</p>
<h4 id="trojan-banker">Trojan banker</h4>
<p>This Trojan takes aim at your financial accounts. It’s designed to steal your account information for all the things you do online. That includes banking, credit card, and bill pay data.</p>
<h4 id="trojan-im">Trojan IM</h4>
<p>This Trojan targets instant messaging. It steals your logins and passwords on IM platforms.</p>
<p>That’s just a sample. There are a lot more.</p>
<h2 id="examples-of-trojan">Examples Of Trojan</h2>
<p>Examples of Trojan malware attacks
Trojan malware attacks can inflict a lot of damage. At the same time, Trojans continue to evolve. Here are three examples.</p>
<ol>
<li>
<p><ins><strong>Emotet banking Trojan</strong></ins> : After a long hiatus, Emotet’s activity increased in the last few months of 2017, according to the Symantec 2018 Internet Security Threat Report. Detections increased by 2,000 percent in that period. Emotet steals financial information, among other things.</p>
</li>
<li>
<p><ins><strong>Rakhni Trojan</strong></ins>: This malware has been around since 2013. More recently, it can deliver ransomware or a cryptojacker (allowing criminals to use your device to mine for cryptocurrency) to infected computers. “The growth in coin mining in the final months of 2017 was immense,” the 2018 Internet Security Threat Report notes. “Overall coin-mining activity increased by 34,000 percent over the course of the year.”</p>
</li>
<li>
<p><ins><strong>ZeuS/Zbot</strong></ins> : This banking Trojan is another oldie but baddie. ZeuS/Zbot source code was first released in 2011. It uses keystroke logging — recording your keystrokes as you log into your bank account, for instance — to steal your credentials and perhaps your account balance as well.</p>
</li>
</ol>
<h2 id="how-trojans-impact-mobile-devices">How Trojans Impact Mobile Devices?</h2>
<p>Trojans aren’t problems for only laptop and desktop computers. They can also impact your mobile devices, including cell phones and tablets.</p>
<p>In general, a Trojan comes attached to what looks like a legitimate program. In reality, it is a fake version of the app, loaded up with malware. Cybercriminals will usually place them on unofficial and pirate app markets for unsuspecting users to download.</p>
<p>In addition, these apps can also steal information from your device, and generate revenue by sending premium SMS texts.</p>
<p>One form of Trojan malware has targeted Android devices specifically, called <strong>Switcher Trojan</strong>, it infects users’ devices to attack the routers on their wireless networks.
The result?
Cybercriminals could redirect traffic on the Wi-Fi-connected devices and use it to commit various crimes.</p>
<h2 id="how-to-help-protect-against-trojans-">How To Help Protect Against Trojans ?</h2>
<h4 id="here-are-some-dos-and-donts-to-help-protect-against-trojan-malware">Here are some DOs and DON'Ts to help protect against Trojan malware.</h4>
<h4 id="first-the-dos-">First, the DOs :</h4>
<ul>
<li>
<p><input disabled="" type="checkbox"> Computer security begins with installing and running an internet security suite. Run periodic diagnostic scans with your software. You can set it up so the program runs scans automatically during regular intervals.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Update your operating system’s software as soon as updates are made available from the software company. Cybercriminals tend to exploit security holes in outdated software programs. In addition to operating system updates, you should also check for updates on other software that you use on your computer.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Protect your accounts with complex, unique passwords. Create a unique password for each account using a complex combination of letters, numbers, and symbols.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Keep your personal information safe with firewalls.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Back up your files regularly. If a Trojan infects your computer, this will help you to restore your data.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Be careful with email attachments. To help stay safe, scan an email attachment first. </p>
</li>
<li>
<p><input disabled="" type="checkbox"> A lot of things you should do come with a corresponding thing not to do — like, do be careful with email attachments and don’t click on suspicious email attachments.</p>
</li>
</ul>
<h4 id="here-are-some-donts">Here are some don’ts:</h4>
<ul>
<li>
<p><input disabled="" type="checkbox"> Don’t visit unsafe websites. Some internet security software will alert you that you’re about to visit an unsafe site, such as Norton Safe Web.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Don’t open a link in an email unless you’re confident it comes from a legitimate source. In general, avoid opening unsolicited emails from senders you don’t know.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Don’t download or install programs if you don’t have complete trust in the publisher.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Don’t click on pop-up windows that promise free programs that perform useful tasks.</p>
</li>
<li>
<p><input disabled="" type="checkbox"> Don’t ever open a link in an email unless you know exactly what it is.</p>
</li>
</ul>
</description>
</item>
<item>
<title>Hacking, Social Engineering and Types of Hackers</title>
<link>https://winuxdroid.com/post/hacking-social-engineer-and-types-of-hackers/</link>
<pubDate>Mon, 22 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/hacking-social-engineer-and-types-of-hackers/</guid>
<description>
<h2 id="what-is-hacking-">What is Hacking ?</h2>
<p>Hacking refers to activities that seek to compromise digital devices, such as computers, smartphones, tablets, and even entire networks. And while hacking might not always be for malicious purposes, nowadays most references to hacking, and hackers, characterize it/them as unlawful activity by cybercriminals—motivated by financial gain, protest, information gathering (spying), and even just for the “fun” of the challenge.</p>
<h2 id="what-is-social-engineering">What is Social Engineering?</h2>
<p>Hacking is typically technical in nature (like creating malvertising that deposits malware in a drive-by attack requiring no user interaction). But hackers can also use psychology to trick the user into clicking on a malicious attachment or providing personal data. These tactics are referred to as “social engineering.”</p>
<h2 id="different-type-of-hackershackings">Different Type of Hackers/Hackings</h2>
<h4 id="1-inswhite-hat-hackerins">1. <ins>White Hat Hacker</ins></h4>
<p>First up, we have the perfect type of hacker to break the stereotype. The white hat hacker is a good guy, as ironic as it may sound. White Hackers, white hat hackers or ethical hackers are the people who test existing internet infrastructures to research loopholes in the system. They create algorithms and perform multiple methodologies to break into systems, only to strengthen them.</p>
<p>Think of this as a lockpick, who would work his way around locks, only to inform the owners of how to make the locks work better.</p>
<p>Famous white hat hackers have historically been pivotal in ensuring that large corporations maintain a strong network framework so that it is unbreakable against all other types of hacking. From being employees of the Government to being private consultants, white hackers help internet be a better and safer place.</p>
<h4 id="2-insblack-hat-hackerins">2. <ins>Black Hat Hacker</ins></h4>
<p>Simply put, these are the bad guys. Black hat hackers are responsible for all that is wrong with hacking. These guys break into systems purely with negative intentions. From stealing credit card information, to altering public databases, a black hat hacker looks to gain fame or monetary benefits from exploiting the loopholes in internet frameworks. Famous black hat hackers have notoriously robbed banks and financial institutions of millions of dollars, and invaluable private data.</p>
<h4 id="3-insgrey-hat-hackerins">3. <ins>Grey Hat Hacker</ins></h4>
<p>A grey hat hacker usually has mixed intentions. As the color code implies, this hacker type does not have the good intentions of a white hat hacker, nor does he have the ill intentions of a black hacker. A grey hat would break into systems but never for his own benefit. Famous grey hat hackers have exploited systems only to make the information public, and to bring to limelight vast datasets of information that contains wrongdoings.</p>
<br>
<style>
img[src$="#image"] {
border-radius: 10px;
}
</style>
</description>
</item>
<item>
<title>The Best Book to Learn Python — Free Download</title>
<link>https://winuxdroid.com/post/the-best-book-to-learn-python-from-basics/</link>
<pubDate>Wed, 17 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/the-best-book-to-learn-python-from-basics/</guid>
<description>
<h2 id="python-crash-course-2nd-edition">Python Crash Course, 2nd Edition</h2>
<p><strong>According to No Starch Press :</strong>
Python Crash Course is the world’s best-selling guide to the Python programming language. This fast-paced, thorough introduction to programming with Python will have you writing programs, solving problems, and making things that work in no time.</p>
<p><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTFzaiTDGEPSh0FWZekc_ptqCgGT_UuccIfFA&amp;usqp=CAU" alt="Python Crash Course Book"></p>
<p><strong>Book :</strong> Python Crash Course, 2nd Edition</p>
<p><strong>Author :</strong> Eric Matthes</p>
<p><strong>Pages :</strong> 544</p>
<p><strong>Year :</strong> May 2019</p>
<p><strong>File format :</strong> PDF</p>
<p><strong>File size :</strong> 6.7 MB</p>
<h2 id="download">Download</h2>
<h4 id="1st-edition">1st Edition</h4>
<p><a href="https://github.com/sumit-buddy/books/raw/main/python_crash_course_1st_edition.pdf">Python Crash Course,1st Edition</a></p>
<h4 id="2nd-edition">2nd Edition</h4>
<p><a href="https://github.com/sumit-buddy/books/raw/main/python_crash_course_2nd_edition.pdf">Python Crash Course, 2nd Edition</a></p>
<p><a href="https://t.me/ComputerBuddy/70">Python Crash Course, 2nd Edition (telegram)</a></p>
<p>In the first half of the book, you’ll learn basic programming concepts, such as variables, lists, classes, and loops, and practice writing clean code with exercises for each topic. You’ll also learn how to make your programs interactive and test your code safely before adding it to a project. In the second half, you’ll put your new knowledge into practice with three substantial projects: a Space Invaders–inspired arcade game, a set of data visualizations with Python’s handy libraries, and a simple web app you can deploy online.</p>
<p><strong>As you work through the book, you’ll learn how to:</strong></p>
<ul>
<li>
<p>Use powerful Python libraries and tools, including Pygame, Matplotlib, Plotly, and Django</p>
</li>
<li>
<p>Make 2D games that respond to keypresses and mouse clicks, and that increase in difficulty</p>
</li>
<li>
<p>Use data to generate interactive visualizations
Create and customize web apps and deploy them safely online</p>
</li>
<li>
<p>Deal with mistakes and errors so you can solve your own programming problems</p>
</li>
</ul>
<br>
</description>
</item>
<item>
<title>Brutespray – Port Scanning and Automated Brute Forcing Tool</title>
<link>https://winuxdroid.com/post/brutespray-port-scanning-and-automated-bruteforcing-tool/</link>
<pubDate>Thu, 04 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/brutespray-port-scanning-and-automated-bruteforcing-tool/</guid>
<description>
<h1 id="brutespray">BruteSpray</h1>
<p>BruteSpray is an open source python tool which provides a combination of both port scanning and automated brute force attacks against scanned services.</p>
<p>It takes the <strong>GNMAP/XML</strong> output from an nmap scan and automatically brute forces the services running with default credentials using Medusa or use your dictionary to gain access.</p>
<h1 id="github-stats">GitHub Stats</h1>
<p><a href="https://github.com/x90skysn3k/brutespray"><img src="https://github-readme-stats.vercel.app/api/pin/?username=x90skysn3k&amp;repo=brutespray" alt="GitHub Status Card"></a></p>
<h1 id="installing-brutespray">Installing BruteSpray</h1>
<blockquote>
<p>Download the <code>.zip</code> file from GitHub and install it manually.</p>
</blockquote>
<p>Or</p>
<blockquote>
<p>Run the following command to install <code>brutespray</code> package on Kali:</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>apt install brutespray
</code></pre></div><p>The following screenshot shows the output of the preceding command:</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612603125/brutespray/brutespray_installation_d3zpb7.png" alt="Installing brutespray"></p>
<blockquote>
<p>Once it is installed, we can run the tool with the -h flag to view the list of all features and help.</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>brutespray -h
</code></pre></div><p>The following screenshot shows the output of the preceding command:</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612603445/brutespray/brutespray_help_c4j0ey.jpg" alt="BruteSpray help menu"></p>
<h1 id="how-to-do-it">How to do it...</h1>
<p>We are doing this in 2 steps :</p>
<ul>
<li>
<p>Scanning Target</p>
</li>
<li>
<p>Brute Forcing Targeted Services</p>
</li>
</ul>
<h2 id="scanning-target-">Scanning Target :</h2>
<blockquote>
<p>First of all we need a target device.</p>
</blockquote>
<blockquote>
<p>Here I'm using my own virtual machine as a target (IP: 192.168.1.5)</p>
</blockquote>
<blockquote>
<p>So, let's scan this target using nmap to find out which services are currently running.</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>nmap 192.168.1.5
</code></pre></div><p>In the following screenshot you can see running services of the victims machine:</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612603445/brutespray/nmap-services_xgqiw6.jpg" alt="nmap scanning"></p>
<blockquote>
<p>Now we need to save this nmap output as an <ins>XML or GNMAP</ins> file.</p>
</blockquote>
<blockquote>
<p>We are saving the nmap output as an XML file on our desktop using the following command:</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>nmap 192.168.1.5 -oX /root/Desktop/scan.xml
</code></pre></div><p>You can see how this command looks alike:</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612603444/brutespray/nmap-scan_iu3vag.jpg" alt="Saving scan output as xml file"></p>
<blockquote>
<p>Now we can see that there is a file created on our desktop as <strong>scan.xml</strong>.</p>
</blockquote>
<h2 id="brute-forcing-targeted-services-">Brute Forcing Targeted Services :</h2>
<blockquote>
<p>To run a default brute force on all of the services that were discovered by a previously run nmap scan, we can use the following command:</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>brutespray --file scan.xml --threads <span class="m">5</span>
</code></pre></div><p>The preceding command looks like this:</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612603222/brutespray/brutespray_command_e7xzts.png" alt="Bruteforcing using scanned output"></p>
<blockquote>
<p>To run the tool on one particular service, we can use the -s flag and
define the service we want to perform a brute force attack on. In the
following example, we will use the nmap scan that was done on a host
and only check the default credentials on the FTP service:</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>brutespray --file scan.xml -t <span class="m">5</span> -s ftp
</code></pre></div><p>The following screenshot shows the output of the preceding
command:</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612603445/brutespray/scanning_ftp_mgmjkn.jpg" alt="Bruteforcing specific services"></p>
<blockquote>
<p>In the screenshot, we can see that the FTP allows anonymous
login, which is why the tool gave a success output for the credentials that
were shown.</p>
</blockquote>
<blockquote>
<p>You can also use your custom user and password list to brute force.
For that you have to use -U and -P flags.</p>
</blockquote>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span>brutespray --file scan.xml -U username.txt -P passwords.txt -t <span class="m">5</span> -s ftp
</code></pre></div><h1 id="tutorial-video">Tutorial video</h1>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe src="https://www.youtube.com/embed/C-CVLbSEe_g" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video"></iframe>
</div>
<br>
<p>Practice and experiment on this tool on your own because the best ways to learn anything efficiently are – practicing and experimenting. <br>
If you are learning python take a deep dive and explore how this tool actually works.</p>
<br>
</description>
</item>
<item>
<title>How to Install MySQL (MariaDB) on Android With Termux</title>
<link>https://winuxdroid.com/post/how-to-install-mysql-on-android-with-termux/</link>
<pubDate>Wed, 03 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/how-to-install-mysql-on-android-with-termux/</guid>
<description>
<h2 id="introduction">Introduction</h2>
<p>Generally, smartphones are not for programming but with the rapid evolution of technology the capability of smartphone is also increasing. We can do many programming stuffs on smartphone using some applications.</p>
<p>In this blog, we are going to use a database management system in our smartphone using termux.</p>
<p>We cannot run Mysql effeciently on smartphone but alternatively we can use MariaDB as our database management system.
Mysql and mariadb have some similarities and differences.</p>
<p>MariaDB is an open-source database management system, commonly used as an alternative for the MySQL in the LAMP (Linux, Apache, MySQL, PHP/Python/Perl) stack. It is intended to be a drop-in replacement for MySQL.</p>
<p>This tutorial will explain how to install SQL(MariaDB) or MySQL command line Android.</p>
<p>This is a very beginner friendly guide with explanary images.</p>
<h2 id="requirements">Requirements</h2>
<ul>
<li>
<p>Install Termux app (<a href="https://play.google.com/store/apps/details?id=com.termux">CLICK HERE</a>)</p>
</li>
<li>
<p>Internet connection</p>
</li>
</ul>
<h2 id="insstep1ins-updating-packages"><ins>Step–1</ins> Updating packages</h2>
<p>Okay, so you have installed termux, what next?</p>
<p>Launch termux and this is how termux looks like :</p>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612006811/termux-mariadb/termux-home_amfpn1.jpg#image" alt="termux-home-screen"></p>
<p>First thing you need to do is to allow termux to use device disk storage. To do that run the following command and press allow :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>termux-setup-storage
</code></pre></div><p>Now we need to update its initial packages with the following apt command :</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>apt update &amp;&amp; apt upgrade
</code></pre></div><p>In between the updating process if it asks for storage permission or some other permission—just press <em>Y</em> or simply press enter to use defaults.</p>
<blockquote>
<p>You can clear the cluttery screen using <code>clear</code> command.</p>
</blockquote>
<hr>
<h2 id="insstep2ins-installing-mariadb-mysql"><ins>Step–2</ins> Installing MariaDB (MySQL)</h2>
<ul>
<li>Run the following command to install mariadb package :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>pkg install mariadb
</code></pre></div><p><img src="https://res.cloudinary.com/morphy/image/upload/v1612008282/termux-mariadb/install-mariadb_j0bps8.jpg#image" alt="installing-mariadb-package"></p>
<ul>
<li>Type <em>Y</em> and press enter to give storage permission :</li>
</ul>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612008593/termux-mariadb/termux-image-2_qhkags.jpg#image" alt="giving-storage-permission"></p>
<ul>
<li>Wait until the process completes.</li>
</ul>
<hr>
<h2 id="insstep3ins-runningstopping-mariadb-sessions"><ins>Step–3</ins> Running/Stopping MariaDB sessions</h2>
<blockquote>
<p>You have to use this step every time you need to run MariaDB.</p>
</blockquote>
<ul>
<li>Run the following command to start mariadb daemon :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>mysqld_safe -u $(whoami)@localhost
</code></pre></div><ul>
<li>After that your screen will look like this, which means mariadb daemon started successfully :</li>
</ul>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612011419/termux-mariadb/mariadb-start-cmd-2_gz3fhw.jpg#image" alt="starting-mariadb-daemon"></p>
<ul>
<li>
<p>Then, press <code>ctrl+z</code> or <ins>open a new session</ins> (it means the process will run in background)</p>
</li>
<li>
<p>Then, run <code>mariadb</code> or <code>mysql</code> command to start mariadb-cli :</p>
</li>
</ul>
<p><img src="https://res.cloudinary.com/morphy/image/upload/v1612012273/termux-mariadb/mariadb-home_rigrwh.jpg#image" alt="mariadb-home-screen"></p>
<p>After running mariadb-cli, do whatever you want — create databases, tables or connect it with python for your projects.</p>
<ul>
<li>
<p>To exit mariadb, type <em>exit</em> or <em>quit</em></p>
</li>
<li>
<p>After exiting MariaDB dont forget to kill the background process completely using the below command (you can also kill sessions using pid's) :</p>
</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>killall -u $(whoami)
</code></pre></div><hr>
<h2 id="summary">Summary</h2>
<ul>
<li>Update packages using the below command :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>apt update &amp;&amp; apt upgrade
</code></pre></div><ul>
<li>Install mariadb package using :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>pkg install mariadb
</code></pre></div><ul>
<li>Start mariadb daemon using :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>mysqld_safe -u $(whoami)@localhost
</code></pre></div><ul>
<li>Run mariadb using :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>mariadb
</code></pre></div><p>Or</p>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>mysql
</code></pre></div><ul>
<li>Exit mariadb and then kill all background processes (daemons) using :</li>
</ul>
<div class="highlight"><pre class="chroma"><code class="language-fallback" data-lang="fallback"><span class="ln">1</span>killall -u $(whoami)
</code></pre></div><h2 id="do-it-using-aliases">Do it using aliases</h2>
<p>Optionally, you can also define aliases for above commands in <em>bash.bashrc</em> file like this:</p>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span><span class="nb">alias</span> <span class="nv">run</span><span class="o">=</span><span class="s1">&#39;mysqld_safe -u $(whoami)@localhost &amp;&#39;</span>
</code></pre></div><div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"><span class="ln">1</span><span class="nb">alias</span> <span class="nv">stop</span><span class="o">=</span><span class="s1">&#39;killall -u $(whoami)&#39;</span>
</code></pre></div><p>You don't need to write those long commands every time after using aliases. You just need to type <ins>run, mysql &amp; stop</ins> commands instead.</p>
<h2 id="conclusion">Conclusion</h2>
<p>In this guide you installed MariaDB to act as an SQL server in android. Optionally, you also created a separate password-authenticated administrative user.</p>
<br>
<style>
img[src$="#image"] {
border-radius: 10px;
}
</style>
</description>
</item>
<item>
<title>What is Google Cloud Shell?</title>
<link>https://winuxdroid.com/post/what-is-google-cloud-shell/</link>
<pubDate>Tue, 02 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/what-is-google-cloud-shell/</guid>
<description>
<p>If you always hesitate to install different software packages on your local system — this blog is for you.</p>
<p>Yes, the best solution to this problem is a cloud based environment.</p>
<p>The cloud computing market is pretty huge but we are going to talk about <strong>Google Cloud Platform(GCP)</strong>, more specifically about Google Cloud Shell.</p>
<p>GCP is a very big deal that's why we are just focusing on cloud shell for now.</p>
<h2 id="what-is-google-cloud-shell-">What is Google Cloud Shell ?</h2>
<p>Cloud Shell is an online development environment based on Google Cloud Platform (GCP).</p>
<p>It runs on a Debian-Based virtual machine, that can be accessed with any browser, it makes it easy to manage your projects and resources without having to install them on your local system.</p>
<blockquote>
<p><strong>Basic features of google cloud shell are completely free for any user with a Google account.</strong></p>
</blockquote>
<h2 id="cloud-shell-console">Cloud Shell Console</h2>
<p>Cloud Shell provides you a console with two main utilities:</p>
<h3 id="1-cloud-shell-terminal">1. Cloud Shell Terminal</h3>
<p><img src="https://lh3.googleusercontent.com/bADt-LplQDbOD3LLXc8nB4zC5GUjV0MCieIWXOUd7j7gaHL2uDuPuZt3kYdl_KoclG4OHTQp26k=e14-w3004" alt="terminal preview"></p>
<ul>
<li>
<p>Cloud Shell Terminal is a linux-based command-line tool for accessing your VM instances.</p>
</li>
<li>
<p>It supports multiple terminal sessions and full <strong>tmux</strong> support.</p>
</li>
<li>
<p>It comes with tonnes of pre-installed tool &amp; google cloud sdk.</p>
</li>
<li>
<p>You have full root privileges on your allocated VM and can even run sudo commands, if you need to.</p>
</li>
</ul>
<table>
<thead>
<tr>
<th><code>TIP</code></th>
<th><em>You can also access the terminal form GCP mobile app(no billing needed)</em></th>
</tr>
</thead>
</table>
<p><span class="nowrap"><span class="emojify">👇</span><br>
<p><a href="https://play.google.com/store/apps/details?id=com.google.android.apps.cloudconsole">Download from playstore</a></p>
<h3 id="2-cloud-shell-editor">2. Cloud Shell Editor</h3>
<p><img src="https://lh3.googleusercontent.com/WhS3gyjmk-B3XGdOYtPsnCN6XWkbJPNk4WiTm6wF2RjjANdXcmKjzsPf6WPnvIYlWP_emz55lMYB=e14-w3004" alt="editor preview"></p>
<ul>
<li>
<p>Cloud Shell Editor has a GUI environment where you can develop, build, debug &amp; deploy your apps and projects</p>
</li>
<li>
<p>It also supports some useful vscode extensions.</p>
</li>
<li>
<p>It has an built-in git client. You can easily preview and commit to your repo.</p>
</li>
</ul>
<h2 id="features">Features</h2>
<h4 id="online-development">Online development</h4>
<p>Access Cloud Console from any web browser. No need to do anything locally.</p>
<h4 id="free-storage">Free storage</h4>
<p>It comes with free 5GB of persistent storage as <code>$HOME</code> directory.</p>
<h4 id="pre-installed-tools">Pre-installed tools</h4>
<p>It comes with many pre-installed tools such as python, java, mysql, nano, vim, emacs, gcloud SDK etc.</p>
<h4 id="up-to-date">Up-to-date</h4>
<p>All the pre-installed tools always stay up-to-date.</p>
<h4 id="built-in-git-client">Built-in git client</h4>
<p>Cloud Shell Editor has a built-in git client. You can manage your repository and project easily.</p>
<h2 id="limitations--restrictions">Limitations &amp; restrictions</h2>
<h4 id="custom-packages">Custom packages</h4>
<p>You can only install custom packages in <code>$HOME</code> directory. All the packages outside <code>$HOME</code> directory will lost after an hour of inactivity.</p>
<h4 id="vs-code-extensions">VS code extensions</h4>
<p>You can not install any additional vs code extension on cloud shell editor but it comes with all essential extensions.</p>
<h4 id="private-browsing--disabled-third-party-cookies">Private browsing &amp; disabled third-party cookies</h4>
<p>You can not use cloud console if you are using private browser or third-party cookies are disabled in your browser</p>
<h4 id="coin-mining--network-scanning">Coin mining &amp; network scanning</h4>
<p>Coin mining and network scanning using Cloud Shell are strictly prohibited. If you do such things your account may be disabled forever.</p>
<h4 id="weekly-usage-limit">Weekly usage limit</h4>
<p>Cloud Shell also has a weekly usage limit. If you reach your usage limit, you'll have to wait.</p>
<h4 id="cloud-shell-inactivity">Cloud shell inactivity</h4>
<p>If you do not access Cloud Shell for 120 days, your home disk will be deleted. You will be informed with email before resetting your <code>$HOME</code> directory.</p>
<p>I'm also a new user of GCP and still struggling to learn its features.</p>
<br>
</description>
</item>
<item>
<title>The History of 'Hello, world!'</title>
<link>https://winuxdroid.com/post/hello-world/</link>
<pubDate>Mon, 01 Feb 2021 00:00:00 +0000</pubDate>
<guid>https://winuxdroid.com/post/hello-world/</guid>
<description>
<h2 id="hello-world">Hello, world!</h2>
<p>Traditionally, 'Hello, world!' programs are used to illustrate how the process of coding works, as well as to ensure that a language or system is operating correctly.</p>
<p>They are usually the first programs that new coders learn, because even those with little or no experience can execute 'Hello, world!' both easily and correctly.</p>
<blockquote>
<p>'Hello, world!' is usually used as the first example for any programming language.</p>
</blockquote>
<p>The 'Hello, world!' program is used to check whether the codes are executing correctly or not.
If 'Hello, world!' does not work effectively within the framework, then it is likely that other, more complex programs will also fail.</p>
<h2 id="history">History</h2>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Hello_World_Brian_Kernighan_1978.jpg/220px-Hello_World_Brian_Kernighan_1978.jpg" alt="'Hello, World!' program by Brian Kernighan (1978)"></p>
<p>Though the origins of Hello World remain somewhat unclear, the tradition of using the phrase &quot;Hello, world!&quot; as a test message was influenced by an example program in the seminal 1978 book <a href="https://archive.org/details/TheCProgrammingLanguageFirstEdition/page/n143/mode/2up">The C Programming Language</a>.</p>
<p>The example program in that book prints &quot;Hello, world!&quot;, and was inherited from a 1974 Bell Laboratories internal memorandum by <strong>Brian Kernighan</strong>, Programming in C: A Tutorial.</p>
<h2 id="hello-world--in-different-programming-languages">'Hello, world! ' in different programming languages</h2>
<p>Here’s what the code for Hello World looks like in some of the most popular programming languages currently in use.</p>
<h3 id="python-3">Python 3</h3>
<div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class="ln">1</span><span class="k">print</span><span class="p">(</span><span class="s2">&#34;Hello, world!&#34;</span><span class="p">)</span>
</code></pre></div><h3 id="java">Java</h3>
<div class="highlight"><pre class="chroma"><code class="language-java" data-lang="java"><span class="ln">1</span><span class="kd">class</span> <span class="nc">HelloWorld</span> <span class="o">{</span>
<span class="ln">2</span><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>
<span class="ln">3</span><span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&#34;Hello, world!&#34;</span><span class="o">);</span>
<span class="ln">4</span><span class="o">}</span>
<span class="ln">5</span><span class="o">}</span>
</code></pre></div><h3 id="c">C#</h3>
<div class="highlight"><pre class="chroma"><code class="language-c#" data-lang="c#"><span class="ln">1</span><span class="k">using</span> <span class="nn">System</span><span class="p">;</span>
<span class="ln">2</span><span class="k">class</span> <span class="nc">Program</span>
<span class="ln">3</span><span class="p">{</span>
<span class="ln">4</span><span class="k">public</span> <span class="k">static</span> <span class="k">void</span> <span class="n">Main</span><span class="p">(</span><span class="kt">string</span><span class="p">[]</span> <span class="n">args</span><span class="p">)</span>
<span class="ln">5</span><span class="p">{</span>
<span class="ln">6</span><span class="n">Console</span><span class="p">.</span><span class="n">WriteLine</span><span class="p">(</span><span class="s">&#34;Hello, world!&#34;</span><span class="p">);</span>
<span class="ln">7</span><span class="p">}</span>
<span class="ln">8</span><span class="p">}</span>
</code></pre></div><h3 id="ruby">Ruby</h3>
<div class="highlight"><pre class="chroma"><code class="language-ruby" data-lang="ruby"><span class="ln">1</span><span class="nb">puts</span> <span class="s2">&#34;Hello, world!&#34;</span>
</code></pre></div><h3 id="scala">Scala</h3>
<div class="highlight"><pre class="chroma"><code class="language-scala" data-lang="scala"><span class="ln">1</span><span class="k">object</span> <span class="nc">HelloWorld</span> <span class="k">extends</span> <span class="nc">App</span> <span class="o">{</span>
<span class="ln">2</span><span class="n">println</span><span class="o">(</span><span class="s">&#34;Hello, world!&#34;</span><span class="o">)</span>
<span class="ln">3</span><span class="o">}</span>
</code></pre></div><p>With the increasing complexity of modern coding languages, Hello World is more important than ever. Both as a test and a teaching tool, it has become a standardized way of allowing programmers to configure their environment.</p>
<p>No one can be sure why Hello World has stood the test of time in an industry known for rapid-fire innovation, but it is here to stay.</p>
<p>By the way, in which program language you have written your first 'Hello, world!' program. Mine was <code>helloworld.py</code>.</p>
<br>
</description>
</item>
</channel>
</rss>