Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 58777aa

Browse files
committed
Updated Linux notes.
1 parent fff6d99 commit 58777aa

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

notes/linux.txt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,15 @@ chown -R kali:kali data Change owner permissions recursi
145145

146146
# File Transfer
147147

148-
curl Supports more protocols and APIs
149-
wget No APIs, supports recursive download
150-
151148
python3 -m http.server Starts a web sever on the default port 8000
152149
python3 -m http.server 80 Starts a web sever on port 80
153150

154-
curl 10.0.0.5/test.txt Dump a file to STDOUT
155-
curl -O 10.0.0.5/test.txt Download a file and keep the same filename
156-
curl 10.0.0.5/test.txt -o results.txt Download a file and rename it
157-
wget 10.0.0.5/test.txt Download a file and keep the same filename
151+
curl Supports more protocols and APIs
152+
curl -ikL 10.0.0.5/test.txt -O Download a file
153+
curl -ikL 10.0.0.5/test.txt -o results.txt Download a file and rename it
154+
155+
wget No APIs, supports recursive download
156+
wget 10.0.0.5/test.txt Download a file
158157
wget 10.0.0.5/test.txt -O results.txt Download a file and rename it
159158
------------------------------------------------------------------------------------------------------------------------------------------------------
160159

@@ -280,7 +279,7 @@ iface eth0 inet static
280279

281280
systemctl restart networking.service Restart networking
282281

283-
curl ifconfig.me Show external IP
282+
curl -ikL ifconfig.me Show external IP
284283
------------------------------------------------------------------------------------------------------------------------------------------------------
285284

286285
# Processes
@@ -415,18 +414,18 @@ ssh user@host -p 2222 Connect on a non-standard port
415414
ssh user@host -i <key> Connect using an identity file
416415

417416
- Local port forwarding
418-
ssh <gateway> -L <local port to listen>:<remote host>:<remote port>
417+
ssh <gateway> -L <local port>:<remote host>:<remote port>
419418
ssh user@host -L 5900:localhost:5900
420419

421420
- Remote port forwarding
422-
ssh <gateway> -R <remote port to bind>:<local host>:<local port>
423-
ssh user@host -R 2222:localhost:22 -f -N
424-
-f Force to background
425-
-N Do not execute a remote command
421+
ssh <gateway> -R <local host>:<local port>:<remote host>:<remote port>
422+
ssh user@host -R 0.0.0.0:22:127.0.0.1:22
423+
424+
Open a new tab in Terminal on the local host
425+
nc -lvnp 22
426426

427427
- Dynamic port forwarding
428-
ssh user@host -f -N -D 1080
429-
-D Create a SOCKS tunnel
428+
ssh user@host -f -N -D 1080 -D Create a SOCKS tunnel
430429
proxychains nmap <options>
431430

432431
Firefox Preferences > Advanced > Network > Settings > Manual proxy configuration

0 commit comments

Comments
 (0)