sysctl -w net.ipv4.ip_local_port_range="15000 61000"
sysctl -w net.ipv4.tcp_fin_timeout=30
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_tw_reuse=1
sysctl -w net.ipv4.icmp_ratelimit=0
nmap -A -sS -sU -Pn -p- -T4 address
picoCTF The Factory’s Secret
Cos this question is just plain tiring to do
picoCTF{zerozerozerozero}
How to add printers in NUS
Something that I do often, so I’m keeping them here for easy access.
Windows
SOC Printers
- Right click My Computer > Map Network Drive.
- Map a drive letter to \nts27\pc
- Key in NUSNET account and password.
- Go to Devices and Printers in the Control Panel
- Choose Add a printer.
- Click on The printer that I want isn’t listed.
- Choose Select a shared printer by name.
- Type in \nts27\
Printer on Level 1 Technical Services: psts, pstsb, pstsc
Printer on B1: psc011, psc008
- *note: if you want to print double sided, add “-dx” suffix to the printer name, for single sided, add “-sx” suffix to the printer name.
- Click on Install Driver.
USP Printers
- Press Windows Key + R
- Type \172.16.29.84
- Key in NUSNET account and password.
- Go to Devices and Printers in the Control Panel
- Choose Add a printer.
- Click on The printer that I want isn’t listed.
- Choose Select a shared printer by name.
- Type in \172.16.29.84
- Send print jobs to printer
- Release at the print release station with your NUSNET id
UTown Printers
Same as USP printers, but choose the correct IP address.
How to prevent hotlinking in AWS S3
Simple way to prevent hotlinking via referer fields in the HTTP Request.
(Does not block crafted requests)
- Go to AWS S3 Console
- Go to your bucket name -> Permissions -> Bucket Policy
- Enter the following policy (with replacement at the correct places)
{ "Version": "2008-10-17", "Id": "", "Statement": [ { "Sid": "Allow in my domains", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::imsj-wordpress/*", "Condition": { "StringLike": { "aws:Referer": "https://imsj.dev/*" } } }, { "Sid": "Deny access if referer is not my sites", "Effect": "Deny", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::imsj-wordpress/*", "Condition": { "StringNotLike": { "aws:Referer": "https://imsj.dev/*" } } } ] }
Removing Cygwin on Windows
Since Cygwin doesn’t come with an uninstaller, we need to use commands to remove it.
- Stop and uninstall all programs dependent on Cygwin
- Run the following commands on cmd
takeown /r /d y /f C:\cygwin64 icacls C:\cygwin64 /t /grant Everyone:F
- Run the following commands on powershell
Remove-Item "C:\cygwin64" -Recurse -Force