-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlesser.html
28 lines (28 loc) · 2.01 KB
/
lesser.html
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
<p style="text-align: center;"><span style="font-size: 24px;"><strong><span style="color: rgb(97, 189, 109);">Lesser Known Hacks</span></strong></span></p>
<p style="text-align: left;"><span style="font-size: 24px;"><strong><span style="color: rgb(84, 172, 210);">Using Python to start a web server:</span></strong></span></p>
<ul>
<li style="text-align: left;"><span style="font-size: 24px;">create dummy index.html </span></li>
<li style="text-align: left;"><span style="font-size: 24px;">echo "hi" index.html</span></li>
<li style="text-align: left;"><span style="font-size: 24px;">python -m SimpeHTTPserver 80 </span></li>
<li style="text-align: left;"><span style="font-size: 24px;">test by: nc -tpln or curl http://<ip></span></li>
</ul>
<p><span style="font-size: 24px;"><strong><span style="color: rgb(147, 101, 184);">View bash command history:</span></strong></span></p>
<ul>
<li><span style="font-size: 24px;">history</span></li>
</ul>
<p><span style="font-size: 24px;"><strong><span style="color: rgb(71, 85, 119);">Hide a command so not caputured in history:</span></strong></span></p>
<ul>
<li><span style="font-size: 24px;"><space> command</span></li>
</ul>
<p><span style="font-size: 24px;"><strong><span style="color: rgb(65, 168, 95);">Delete all contents of file:</span></strong></span></p>
<p><span style="font-size: 24px;">simple blank input redirection can blank a file > filename.txt</span></p>
<p><span style="font-size: 24px;"><strong><span style="color: rgb(41, 105, 176);">Write output of command to multiple files simutaneously:</span></strong></span></p>
<ul>
<li><span style="font-size: 24px;">ps -ef | tee file 1 file2 file3</span></li>
</ul>
<p><span style="font-size: 24px;"><strong><span style="color: rgb(235, 107, 86);">Generate hash of a file:</span></strong></span></p>
<ul>
<li><span style="font-size: 24px;">md5sum</span></li>
<li><span style="font-size: 24px;">sha1sum</span></li>
</ul>
<p><br></p>