Author: isayeter

How I Reverse-Engineered one of the biggest GSM Operator’s application.

This is a story of how I found a critical bug of one of the biggest GSM Operator in our country. That bug allows me to log in any user account that I want, without a password. After logging an account there is endless possibility what you can do, like forwarding all calls, reading his messages, fetching all invoices etc. So, that was a serious BUG and reported to the company immediately. This blog post will not make any disclosure about the company, about the application itself etc. All variable names and method names in the post are changed. So, how...

Read More

About importance of MySQL’s index sequences.

Let’s assume blabla table has millions of rows, look this query; SELECT * FROM blabla WHERE ends_at <= 1506668369 and is_processed = 0   If you have a 2 column index AS ABOVE,  ‘is_processed‘ at first place and ‘ends_at‘ at second place in the index sequence, then it takes 0.0004 seconds in my server to retrieve rows. If you have a 2 column index AS ABOVE,  ‘ends_at‘ at first place and ‘is_processed‘ at second place in the index sequence, then it takes 1.0733 seconds in my server to retrieve rows. That’s a huge difference! Think your tables as a book...

Read More

IFNULL does not return the default_val everytime.

SELECT IFNULL(field, 'default_val') FROM bla WHERE blabla You might think that you will get ‘field‘ OR ‘default_val‘ from this query every time. But it is not true. If this query returns no row because of the WHERE condition, then you will not get ‘default_val‘ too. If you want to receive ‘field‘ OR ‘default_val‘ in every condition, change your query to this: SELECT IF(count(id), field, 'default_val') FROM bla WHERE blabla...

Read More

How to learn your server’s HDD performance.

If you want to see your server’s harddisk’s write and read speed, Install hdparm first; yum install hdparm Then you can check the speed of your HDD’s by pointing their locations like; hdparm -Tt /dev/vda1 The output will be like that: /dev/vda1: Timing cached reads: 18038 MB in 1.99 seconds = 9052.72 MB/sec Timing buffered disk reads: 5498 MB in 3.00 seconds = 1832.66 MB/sec That means my /dev/vda1 HDD has the ability to read around 9GB/sec and to write...

Read More

How to enable ipv6 for Centos and Nginx

After we submit our iOS application to AppReview team, they rejected our application and wrote : We discovered one or more bugs in your app when reviewed on iPad running iOS 11.2.6 on Wi-Fi connected to an IPv6 network. In order to solve the problem, we started to enable ipv6 on our servers. This is how we did: 1) First of all, enable ipv6 network on your digitalocean droplet panel. More info: https://www.digitalocean.com/community/tutorials/how-to-enable-ipv6-for-digitalocean-droplets After that, you must enable ipv6 network on your droplet itself. sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 IPV6INIT=yes IPV6ADDR=YOUR_IPv6_ADDRESS/64 IPV6_DEFAULTGW=YOUR_IPv6_GATEWAY IPV6_AUTOCONF=no DNS1=YOUR_IPv6_DNS_SERVER1 DNS2=YOUR_IPv6_DNS_SERVER2 DNS3=YOUR_IPv6_DNS_SERVER3   2) After this configuration, reboot the...

Read More
  • 1
  • 2