View Single Post
Old 10-05-2020, 02:05 PM   #24
Hzj_jie
Member
Hzj_jie will become famous soon enoughHzj_jie will become famous soon enoughHzj_jie will become famous soon enoughHzj_jie will become famous soon enoughHzj_jie will become famous soon enoughHzj_jie will become famous soon enough
 
Posts: 21
Karma: 638
Join Date: Feb 2016
Device: kobo aura hd
Quote:
Originally Posted by trcm View Post
Also, as /etc/profile sets the path with /usr/local/bin/ prefixed, we can easily override some of the '/usr/bin/lipc-get-prop' results, for example :

Code:
# grep PATH /etc/profile
export PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin

# cat /usr/local/bin/lipc-get-prop
# lipc-get-prop override script
if [[ "$*" == "com.lab126.amazonRegistrationService isRegistered" ]]; then
	# Lets pretend we're registered
	echo 1
elif [[ "$*" == "com.lab126.legalComplianceService gdprValue" ]]; then
	# If either 0 or 1, then /etc/dem_heartbeat/record_gdpr_usage_collection_heartbeat.sh records metrics
	echo "-1"
elif [[ "$*" == "com.lab126.household activeProfileRole" ]]; then
	# If 'ADULT' then /etc/dem_heartbeat/record_dem_heartbeat.sh records metrics
	echo "NOT_ADULT"
else
	/usr/bin/lipc-get-prop $*
fi
Hzj_jie is offline   Reply With Quote