RSS

Posts in 2022

  • Use frida and objection to penetration test iOS app security

    Last Update: in iOS

    A quick and detail guide with examples about how to use frida and objection to penetration test your iOS app security without a jailbroken device. A quick cheat sheet of objection usage examples on iOS.

    Introduction What is frida frida is a dynamic code instrumentation toolkit. It lets you inject snippets of JavaScript or your own library into native apps on Windows, macOS, GNU/Linux, iOS, Android, and QNX. Frida also provides you with some simple …

    Read more

  • How to change Mac OS X network MAC address

    in Mac

    How to change Mac OS X network MAC address? How to solve “ifconfig: ioctl (SIOCAIFADDR): Can’t assign requested address” error on newer Mac OS X.

    What is MAC address A media access control address (MAC address) is a unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment. This use is common in most IEEE 802 …

    Read more

  • Switch Java Version with update-alternatives

    Last Update: in Linux

    In Debian/Unbutu, how to install different version of java and use update-alternatives/update-java-alternatives to switch different version of java

    In Linux, like Debian or Ubuntu system, want to install different version of java and can swith system java version easily, the easiest solution is use update-alternatives. update-alternatives creates, removes, maintains and displays information …

    Read more

  • OpenSSL CSR Examples: Self Signed Certificate and How to Start Test TLS/SSL Server/Client

    Last Update: in Security

    How to use openssl with examples to create CSR, self signed TLS/SSL certificate. View certificate detail, start TLS/SSL test server and client.

    Create TLS/SSL Certificate Use openssl req command to create a self signed SSL certificate or Certificate Signing Request (CSR) can be sent to a Certificate Authority (CA) which will then return an signed SSL certificate. $ openssl req -new -newkey …

    Read more

  • Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height

    Last Update: in iOS

    Troubleshooting: iOS auto layout warning about UIView-Encapsulated-Layout-Height. The UI layout correctly, sounds the warning is false but actually there is an error in code.

    Symptom In a table view cell layout, there is no layout constraints issue in xcode. However during run time, xcode console report following layout constraints issue: [LayoutConstraints] Unable to simultaneously satisfy constraints. Probably at least …

    Read more

  • Python: How to print literal curly brace { or } in f-string and format string

    in Python

    How to print literal curly brace “{” or “}” in f-string and format string. how to escape brace properly in python.

    Formatted string literals or f-string was introduced in Python 3.6. A formatted string literal or f-string is a string literal that is prefixed with ‘f’ or ‘F’. These strings may contain replacement fields, which are …

    Read more

  • Linux how to restart service automatically to avoid server downtime

    Last Update: in Linux

    Have a linux service running for a long time but quit accidentally due to crash, signal, kill etc. Want to restart it automatically to avoid/reduce service downtime, use systemd service restart policy to control it easily.

    Symptom I have nginx server running for months, suddenly got a alarm from monitor service indicate the nginx server is not providing service. I can ssh to server, so server is still online. Then check nginx server status use systemctl status nginx, I …

    Read more

  • Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath/...

    Last Update: in iOS

    Troubleshooting: loading carthage framework error: dyld: Library not loaded: @rpath. How to locate which carthage framework missing dependence?

    Symptom iOS project use carthage frameworks, compile successfully. However crash at run time with “Library not loaded” error. For example: dyld: Library not loaded: libswiftXCTest.dylib Referenced from: …

    Read more

  • NGINX access_log log the real client IP from X-Forwarded-For/X-Real-IP/cf-connecting-ip instead of the proxy IP

    Last Update: in nginx

    Have a nginx server receive requests from proxy or behind CDN, how to get client user’s real IP instead of proxy/CDN servers IP in access log? This article provide two solutions based on log_format and nginx realip module.

    Problem Have a nginx server receive requests from proxy or behind CDN, how to get client user’s real IP instead of proxy/CDN servers IP in access log? Use cloudflare argo tunnel and nginx log show client ip of 127.0.0.1 or ::1 access_log …

    Read more

Posts in 2021

  • Calculate file crypto hash (sha1, sha256, sha384 and sha512) in Flutter

    Last Update: in Flutter

    How to calculate to generate file sha1, sha256, sha384 and sha512 crypto hash in Flutter.

    Introduce crypto and ChunkedStreamReader crypto Flutter crypto package provides a set of cryptographic hashing functions implemented in pure Dart. The following hashing algorithms are supported: SHA-1 SHA-224 SHA-256 SHA-384 SHA-512 SHA-512/224 …

    Read more