Upgraded to OSX 10.12 and many problems pop up

There are many things going on wrong after I upgraded to OSX 10.12. For example, the Latex issue logged here. Here I plan to log stuff that went wrong and how to fix them. As I kept updating, it could be long.

Published
Categorized as inHacking Tagged

Quickly create a large dummy file

Use the following to create a large dummy file containing all zeroes. Below we assume 1GB size file. You can change it to something else. dd if=/dev/zero of=bigfile count=1 bs=1 seek=$((1024 * 1024 * 1024 - 1)) Learned from here.

Published
Categorized as inHacking Tagged

Recently I need to quickly scan the local network and find my other device's IP address. I do not have access to the access point, and my device does not report its IP so I cannot directly get what I want. But using another device (laptop specifically), I can quickly find out the IP address of that device.

Just simply do:

for ip in $(seq 1 254); do echo $ip; nmap -sP --max-retries=1 --host-timeout=10ms 10.0.0.$ip | grep "Host is up"; done

Since we are under the same network (assuming my IP is 10.0.0.xx), we will have very low latency (so we can set low timeout). And then this prints:

1
Host is up (xxxs latency).
2
3
...
61
Host is up (xxxs latency).
...
206
Host is up (xxxs latency).
...

That means:

  • 10.0.0.1 is my gateway (access point)
  • 10.0.0.61 is me
  • And of course the one left is 10.0.0.206, which is my device's IP

✌️

Weird issue fixed: favicon not showing up

So I encounter this weird issue where favicon.ico does not show up on my browser. No matter if I cleared my browser or restarted the browser, it doesn't work. And the trick below saves me some troubles.

Published
Categorized as inHacking Tagged