Warning: Use of undefined constant fb_replace_wp_version - assumed 'fb_replace_wp_version' (this will throw an Error in a future version of PHP) in /usr/home/heximal/data/www/heximal.ru/public/blog/wp-content/plugins/replace-wp-version/fb-re_wpversion.php on line 39
heximal blog

How to disable a restriction for mobile internet sharing

January 13th, 2020 No comments

Warning: count(): Parameter must be an array or an object that implements Countable in /usr/home/heximal/data/www/heximal.ru/public/blog/wp-content/plugins/wp-syntax/wp-syntax.php on line 83

title='Notabene: disable a restriction for mobile internet sharingNowadays some of cell operators have a practice of restricting internet sharing function for smartphones. Usually it’s an attribute of family tariffs which also propose home internet and digital TV. This article will describe how to disable this restriction. The article is only for educational purpose of course, the author takes no responsibility for what you’re going to do with this information.

So, what will we need? First of all is smartphone with internet sharing function and second is macOS based laptop. We will not need to get root access to our smartphone. It’s all can be done with single terminal command.
A little bit of theory for the beginning. How do cell providers detect we’re sharing the internet? The packet structure of IP (Internet Protocol) contains a TTL attribute (Time To Live) which is integer. When the packet leaves its device, TTL value is set to some particular value, e.g. 128. When the packet goes through another router TTL value decreases by 1. This is how cell operator detects we’re using internet sharing. So all we need to do is to make initial TTL value bigger for 1 from its normal value.
Fortunately we can make it with single command in macOS.
But first we need to determine initial TTL value.

The recipe
1. Connect your laptop to smartphone hotspot.
2. Go to System preferences -> Network

Find your current IP address. Let it be 172.20.10.7.
Then the gate IP address in most cases will be 172.20.10.1 (change last number to 1).
3. Next we do ping of this gate

$ ping 172.20.10.1
PING 172.20.10.1 (172.20.10.1): 56 data bytes
64 bytes from 172.20.10.1: icmp_seq=0 ttl=64 time=2.165 ms
64 bytes from 172.20.10.1: icmp_seq=1 ttl=64 time=10.146 ms
64 bytes from 172.20.10.1: icmp_seq=2 ttl=64 time=3.050 ms
64 bytes from 172.20.10.1: icmp_seq=3 ttl=64 time=1.994 ms

and get TTL value.

4. Increase it by 1 and run the following command:

sudo sysctl net.inet.ip.ttl=65 net.inet.ip.ttl: 65 -> 65

The command requires admin password.

Categories: Apple, Misc Tags:

Chess piece shortest path algorithm

January 11th, 2018 4 comments

Recently I had to solve the problem of finding the shortest path from A to B and implement it programmatically. “There exists tons of solutions for sure”, – that what I thought… I was wrong. Few days of searching didn’t give any relevant result. The maximum I have found is some mentions that this problem can be solved by using graphs theory and so called BFS algorithm (breadth first search). In this article I’ll try to analyze this method of finding chess pieces shortest path in details with code examples and explanations.
Read more…

Categories: Coding Tags: , , , ,

Cocos2d-JS: load external audio assets and javascript codes

November 6th, 2016 No comments

Today I would like to tell about a quite complicated problem, which I have recently managed to resolve. The major sense of it can be found in the title of the post. One may as a question: what is the way this feature can be useful? It seems like no one was wondering this problem before, because Google was extremely poor for the answers. It is very logical and obvious: this is so much easier to debug, isn’t it? In order to try out new sounds or changes in the level logic, you do not need to recompile the entire project each time, you don’t even need to restart the application instead. Let me tell you how I managed to do it.

Read more…

Categories: Coding Tags: , , ,

Готовим вкусняшки. Часть 4

November 6th, 2016 No comments

Продолжим тему о вкусной и здоровой пище. Сегодняшний рецепт приготовления вкусного и быстрого блюда. Нам понадобится: филе курицы — 1000 гр., грибы — 500 гр., лук — 2 шт., сливки — 250 мл., масло, соль и специи. Мне больше нравится филе бедра курицы, но с филе грудки полезнее. Сливки можно брать с небольшим процентом жирности. Нарезаем филе небольшими кусочкам. Лук и грибы мелко крошим. Обжариваем филе и грибы с луком, почти до полной готовности, немного солим. После обжаривания добавляем сливки. Кипятим 5-6 минут. Вкусное блюдо готово! Можно подавать с салатом из капусты. Приятного аппетита. В продолжении поста немного фотографий процесса приготовления. Read more…

Categories: Misc Tags: ,

OS X: Show desktop (Win-D equivalent)

May 28th, 2016 4 comments

It’s been a long time I was suffering from lack of “Hide all windows” feature in Mac OS X. Why is it so important to me? I feel discomfort when there are so many windows on the screen, or tabs in browser, or shortcuts on Desktop, it invokes a panic in me. In order to focus on some problem I need there not more than three windows on the screen. Ideally just one. Five years passed away since I’ve migrated from Windows and all this time I’ve been using very inconvenient workaround – Hide others (Option-Cmd-H) in applications menu. Today I’ve finally found quite acceptable way to hide all windows by one mouse click or keyboard shortcut. Let me tell you how to make it.

Read more…

Categories: Apple, Coding Tags:

Convert binary plist to XML

January 27th, 2016 No comments


From time to time there I face a problem how to convert the plist file from binary representation back to XML. This problem usually occurs when you need to extract project plist file from IPA archive and see what’s inside. This is complicated by the fact that the IPA builder (xcrun utility) compresses everything possible to reduce the size of the application, and probably this accelerates application launch. So after I painfully searched the solution for fifth time I’ve decided to store it to my blog.

Read more…

Categories: Apple, Coding Tags: , , , , ,

HexLauncher: quick apps launch in Mac OS X

April 5th, 2015 9 comments

The story of this project is taking me back to 5 years to the times when I’ve been just getting started to enter to Apple technologies world, to be more prescice when I was migrating to Mac OS X. As a lot of people I was feeling not too good about a lack of habitual programs and system interface elements. One of such confusion was a miss of Start button equivalent. To be honest I’m still not sure wether the way I’m launching an OS X programs is most traditional (I’m using a Spotlight). So, after few years I deciced to get rid of this disadvantage. Read more…

Categories: Apple, Coding, Creativity Tags: ,

+(AppStore *) Timera: make your window in time

March 14th, 2014 No comments

It’s time to tell the story about my contribution to very interesting and perspective project with a quite unique name Timera (origins from time and camera). Project founders have been looking a person for iOS developer position exactly at the same time when I’ve been looking new self-education frontiers for myself. The idea of project is quite simple. Its visual representation can be seen on featured post picture (the image is clickable). The user is provided with tool for making a time tunnel by combining two photos made on the same place in different time moments: first from past and second must be taken by user’s mobile device. The idea seemed interesting for me so I immediately integrated myself to the development process which promised a lot of difficult and interesting challenges. Read more…

Categories: Coding, News, Creativity Tags: ,

Goodbye, Hackintosh

March 7th, 2014 5 comments

A number of unpleasant moments associated with the malfunction of my Mac computer forced me to write this post. After the planned Maverick system update my Macbook has failed to boot. Gray screen with Apple logo and load indicator and nothing more. I thought I would never run into this problem again since hakintosh times has passed away long ago. For a while I was very depressed and could not realize the reality. I instantly remembered about the verbal boot mode (Cmd-V when power on). I’ve launched the Mac in this verbose-mode and that’s what I’ve seen at the end:
Read more…

Categories: Apple Tags: ,

Duck Hunt: unraveling the mysteries

November 13th, 2013 1 comment

It’s long time I did not update my blog. There a lot of materials as always, it’s hard to find the time to compile them all together for complete blog article. Today I would like to write a sort of mini-post with elements momoirs that recently one thing has lost its mistery for me. It’s about the Duck Hunt application for legendary device named Dendy.
Dendy is an eight-bit tvset console, a clone of the japane Nintendo Entertainment System. It is connected to the TV-set usually with coaxial cable, after which the video signal is tuned up on one of the channels. Applications launche by means of removable cartridges that in fact represents the circuit board with chip ROM, storing the application code. Read more…

Categories: Coding, Misc Tags: ,