This file is indexed.

/usr/bin/create-online-accounts is in ubuntu-touch-session 0.108+16.04.20160407-0ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash

################################################################################
# Copyright 2012-2013 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it 
# under the terms of the GNU General Public License version 3, as published 
# by the Free Software Foundation.
# 
# This program is distributed in the hope that it will be useful, but 
# WITHOUT ANY WARRANTY; without even the implied warranties of 
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
# PURPOSE.  See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along 
# with this program.  If not, see <http://www.gnu.org/licenses/>.
################################################################################

FB_USERNAME=$1
FB_PASSWORD=$2
TWITTER_USERNAME=$3
TWITTER_PASSWORD=$4
 
CREATION_PARAMS_FB=('--print-id' \
        -s 'auth/method=oauth2' \
        -s 'auth/mechanism=user_agent' \
        -s 'u:auth/oauth2/user_agent/WindowId=2341' \
        -s 'auth/oauth2/user_agent/Host=www.facebook.com' \
        -s 'auth/oauth2/user_agent/AuthPath=/dialog/oauth' \
        -s 'auth/oauth2/user_agent/ClientId=302061903208115' \
        -s 'auth/oauth2/user_agent/RedirectUri=https://www.facebook.com/connect/login_success.html' \
        -s 'auth/oauth2/user_agent/ResponseType/item0=token' \
        -s "as:auth/oauth2/user_agent/Scope=["\
"'publish_stream',"\
"'read_stream',"\
"'status_update',"\
"'user_photos',"\
"'friends_photos',"\
"'xmpp_login']" \
        -s 'auth/oauth2/user_agent/Display=popup' \
)

CREATION_PARAMS_TWITTER=('--print-id' \
        -s 'auth/method=oauth2' \
        -s 'auth/mechanism=HMAC-SHA1' \
        -s 'u:auth/oauth2/HMAC-SHA1/WindowId=2341' \
        -s 'auth/oauth2/HMAC-SHA1/RequestEndpoint=https://api.twitter.com/oauth/request_token' \
        -s 'auth/oauth2/HMAC-SHA1/TokenEndpoint=https://api.twitter.com/oauth/access_token' \
        -s 'auth/oauth2/HMAC-SHA1/AuthorizationEndpoint=https://api.twitter.com/oauth/authorize' \
        -s 'auth/oauth2/HMAC-SHA1/ConsumerKey=NGOB5S7sICsj6epjh0PhAw' \
        -s 'auth/oauth2/HMAC-SHA1/ConsumerSecret=rbUEJCBEokMnGZd8bubd0QL2cSmoCjJeyiSJpnx3OM0' \
        -s 'auth/oauth2/HMAC-SHA1/Callback=https://wiki.ubuntu.com/' \
)

account-console list | grep "provider"

if [ ${?} -ne "0" ]; then
    ID_FACEBOOK="$(account-console create facebook ${CREATION_PARAMS_FB[@]})"
    account-console edit "$ID_FACEBOOK" --username $FB_USERNAME --password $FB_PASSWORD 
     
    ID_TWITTER="$(account-console create twitter ${CREATION_PARAMS_TWITTER[@]})"
    account-console edit "$ID_TWITTER" --username $TWITTER_USERNAME --password $TWITTER_PASSWORD
else
    fb_array=( $(account-console list | grep facebook) )
    ID_FACEBOOK=${fb_array[2]%?}
    tw_array=( $(account-console list | grep twitter) )
    ID_TWITTER=${tw_array[2]%?}
    echo "Accounts already present"
fi
 
no_network=true

while [ $no_network == true ]; do
    ip addr show wlan0 | grep "inet " &> /dev/null
    if [ $? -eq 0 ]; then
        no_network=false
    else
        sleep 5
    fi
done

pkill signon-ui
signon-ui & 
sleep 4

account-console login "${ID_FACEBOOK}" --service facebook-microblog
account-console login "${ID_TWITTER}" --service twitter-microblog

account-console edit "${ID_FACEBOOK}" --enable --service facebook-microblog
account-console edit "${ID_TWITTER}" --enable --service twitter-microblog

pkill friends-service
friends-service -do &