Having some spare time during Christmas, i spent sometime to install Redhat on my Imac 2011. I followed this guides: https://www.mimiz.fr/install-rhel7-virtualbox-macos.html It’s very straight forward, you don’t need to read all, but you might face some challenges like me. My issue was with internet connection, i do not have internet after the installation. It turned out that i haven’t turned on the network during the installation. To fix this i have to do this manually by run this command: ifup enp0s3 In order to install additional software, we normally use yum utility to install. Redhat require us to register with their subscription manager, it’s free.Read More →

Is your iMac 2011 working? is it too hot? You are so lucky. But you need to keep it cooler otherwise you will have the same problem as me. One day you might see that it’s not booting and you see some stripes in the screen. If you see that, that means your GPU (graphic card) is failed. It’s could be an easy/cheap fix if you can buy a used part on eBay. My original card is HD 6970M 2GB, it’s still now almost $200 on eBay. So I finally have to use an older card , it’s about $40. It’s 6770M 512MB. It’s originallyRead More →

I’m using Curl 7.5.x, but somehow when i use the –ntlm option, the server seems not accepted. After many tries, i finally make it worked by install the curl 7.46 cd ~ sudo apt-get build-dep curl wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2 tar -xvjf curl-7.46.0.tar.bz2 cd curl-7.46.0 ./configure –with-nghttp2 –with-ssl –with-libssl-prefix=/usr/local/ssl # This is the line I had the most trouble with, especially figure out –with-libssl-prefix make sudo make installRead More →

yum install gcc python3-devel yum install python3 pip3 install psutil Command: watch -n 2 python3 cpu.py def tell_system_status(): import psutil import platform import datetime os, name, version, _, _, _ = platform.uname() version = version.split(‘-‘)[0] cores = psutil.cpu_count() cpu_percent = psutil.cpu_percent() memory_percent = psutil.virtual_memory()[2] disk_percent = psutil.disk_usage(‘/’)[3] boot_time = datetime.datetime.fromtimestamp(psutil.boot_time()) running_since = boot_time.strftime(“%A %d. %B %Y”) response = “I am currently running on %s version %s. ” % (os, version) response += “\nThis system is named %s and has %s CPU cores. ” % (name, cores) response += “\nCurrent disk_percent is %s percent. ” % disk_percent response += “\nCurrent CPU utilization is %s percent. ”Read More →

I was trying to install Adobe CS5 in my Imac 2011 – running High Sierra. When i clicked on the installation icon, i always got “install” can’t be opened. you should eject the disk image.” , i verified my security setting, there is nothing blocked there. This is the error i got:   Root cause: it’s something with Apple certificate expiration. It revokes Adobe from installing correctly. This is how i fixed Open “Terminal” appĀ  and run 2 commands below: cd /Volumes/Adobe\ Photoshop\ CS5/Adobe\ Photoshop\ CS5/Install.app/Contents/MacOS/ install      Read More →

Smokeping is a great tool for network monitoring, we recently adopted smokeping to use it for URL monitoring. We use the Curl probe for this purpose. Everything seems working fine until the number of URL goes over a thousand, whenever we restart the service, we see a gap in the graph , this gap means Smokeping did nothing at that time. We did some analysis and make some change: – changing the forks parameter from 5 to 100 – changing the pings from 5 to 3 (if you do this you have to delete all your rrds first otherwise smokeping will not be able toRead More →

Mitmproxy is a python proxy, it’s very light. Basically it’s like a normal proxy but it offers some advanced features that most developer/ hacker like to have: – Watching your internet traffic – Decrypt https (SSL) traffic – It’s the middle man, it allows you to inject python code to change the request/response header between the client and the server. I have a use case to use it: I need to use Chrome in Linux and it must pass the NTLM authentication by windows server , Chrome can do it in Windows but In Linux , there is no way it can pickup credential andRead More →

nmap –script ssl-enum-ciphers -p 443 www.google.com you can test your script to see the difference. Here are some url that only support a specific tls version. This subdomain and port only supports TLSv1.2 https://tls-v1-2.badssl.com:1012/ This subdomain and port only supports TLSv1.1 https://tls-v1-1.badssl.com:1011/ This subdomain and port only supports TLSv1.0 https://tls-v1-0.badssl.com:1010/Read More →

$pfx_file=”mywindows_cert.pfx”; $password=”dailyithlep”; $pem_file=”mypem_cert.pem”; convert_pfx_file_to_pem($pfx_file,$password,$pem_file,true); function convert_pfx_file_to_pem($pfx_file,$password,$pem_file,$remove_password=true) { $CERT_FILE=”/tmp/certificate.crt”; $CA_CERT_FILE=”/tmp/ca-cert.crt”; $PRIVATE_KEY=”/tmp/private.key”; $PRIVATE_KEY_NOPASSWORD=”/tmp/private_nopassword.key”; //get the certificate file from pfx file $cmd=”openssl pkcs12 -clcerts -nokeys -in \”$pfx_file\” -out $CERT_FILE -passin pass:$password”; shell_exec($cmd); //get the ca-certificate file from pfx file $cmd=”openssl pkcs12 -cacerts -nokeys -in \”$pfx_file\” -out $CA_CERT_FILE -passin pass:$password”; shell_exec($cmd); ////get the private key from pfx file $cmd=”openssl pkcs12 -nocerts -in \”$pfx_file\” -out $PRIVATE_KEY -passin pass:$password -passout pass:$password”; shell_exec($cmd); if($remove_password) { //remove the password in private key $cmd=”openssl rsa -in $PRIVATE_KEY -out $PRIVATE_KEY_NOPASSWORD -passin pass:$password “; shell_exec($cmd); //put all 3 files into one file again $cmd=”cat $CERT_FILE $CA_CERT_FILE $PRIVATE_KEY_NOPASSWORD > $pem_file “; shell_exec($cmd); }else{ //put all 3 filesRead More →

Curl can provide us the following time report: time_namelookup time_redirect time_connect time_appconnect time_pretransfer time_starttransfer time_total To get these report time, you need to use the option -w , here is an example: curl -L –output /dev/null –silent –show-error –w ‘lookup: %{time_namelookup}\nconnect: %{time_connect}\nappconnect: %{time_appconnect}\npretransfer: %{time_pretransfer}\nredirect: %{time_redirect}\nstarttransfer: %{time_starttransfer}\ntotal: %{time_total}\n’ ‘google.com’ By default Smokeping Curl probe only fetch the load time – that is total_time – dns resolution. There are many occasions we have with DNS lookup, so we can’t find that issue. That’s why we have “AnotherCurl” probe , the big difference is the “write_out” option , AnotherCurl allows us to specify which the probe will report.Read More →