activity_start
parent
88ef3076e4
commit
f48e4363f5
|
@ -242,6 +242,13 @@ class Android < Extension
|
|||
response.get_tlv(TLV_TYPE_CHECK_ROOT_BOOL).value
|
||||
end
|
||||
|
||||
def activity_start(uri)
|
||||
request = Packet.create_request('activity_start')
|
||||
request.add_tlv(TLV_TYPE_URI_STRING, uri)
|
||||
response = client.send_request(request)
|
||||
response
|
||||
end
|
||||
|
||||
def send_sms(dest, body, dr)
|
||||
request = Packet.create_request('send_sms')
|
||||
request.add_tlv(TLV_TYPE_SMS_ADDRESS, dest)
|
||||
|
|
|
@ -76,8 +76,7 @@ TLV_TYPE_CELL_BASE_LONG = TLV_META_TYPE_UINT | (TLV_EXTENSIONS
|
|||
TLV_TYPE_CELL_NET_ID = TLV_META_TYPE_UINT | (TLV_EXTENSIONS + 9073)
|
||||
TLV_TYPE_CELL_SYSTEM_ID = TLV_META_TYPE_UINT | (TLV_EXTENSIONS + 9074)
|
||||
|
||||
|
||||
|
||||
TLV_TYPE_URI_STRING = TLV_META_TYPE_STRING | (TLV_EXTENSIONS + 9101)
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,7 +29,8 @@ class Console::CommandDispatcher::Android
|
|||
'device_shutdown' => 'Shutdown device',
|
||||
'send_sms' => 'Sends SMS from target session',
|
||||
'wlan_geolocate' => 'Get current lat-long using WLAN information',
|
||||
'interval_collect' => 'Manage interval collection capabilities'
|
||||
'interval_collect' => 'Manage interval collection capabilities',
|
||||
'activity_start' => 'Start an Android activity from a Uri string'
|
||||
}
|
||||
|
||||
reqs = {
|
||||
|
@ -41,7 +42,8 @@ class Console::CommandDispatcher::Android
|
|||
'device_shutdown' => ['device_shutdown'],
|
||||
'send_sms' => ['send_sms'],
|
||||
'wlan_geolocate' => ['wlan_geolocate'],
|
||||
'interval_collect' => ['interval_collect']
|
||||
'interval_collect' => ['interval_collect'],
|
||||
'activity_start' => ['activity_start']
|
||||
}
|
||||
|
||||
# Ensure any requirements of the command are met
|
||||
|
@ -528,6 +530,17 @@ class Console::CommandDispatcher::Android
|
|||
end
|
||||
end
|
||||
|
||||
def cmd_activity_start(*args)
|
||||
if (args.length < 1)
|
||||
print_line("Usage: activity_start <uri>\n")
|
||||
print_line("Start an Android activity from a uri")
|
||||
return
|
||||
end
|
||||
|
||||
uri = args[0]
|
||||
client.android.activity_start(uri)
|
||||
end
|
||||
|
||||
#
|
||||
# Name for this dispatcher
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue