def clip_dump(request):
 print '\n[INFO] Starting Clipboard Dump Service in VM/Device'
 try:
  data = {}
  if (request.method == 'POST'):
   tools_dir = os.path.join(settings.BASE_DIR, 'DynamicAnalyzer/tools/')
   adb = getADB(tools_dir)
   args = [adb, '-s', getIdentifier(), 'shell', 'am', 'startservice', 'opensecurity.clipdump/.ClipDumper']
   try:
    subprocess.call(args)
    data = {'status': 'success'}
   except:
    PrintException('[ERROR] Dumping Clipboard')
    data = {'status': 'error'}
  else:
   data = {'status': 'failed'}
  return HttpResponse(json.dumps(data), content_type='application/json')
 except:
  PrintException('[ERROR] Dumping Clipboard')
  return HttpResponseRedirect('/error/')

def clip_dump ( request ) : print '\n[INFO] Starting Clipboard Dump Service in VM/Device' try : data = { } if ( request . method == 'POST' ) : tools_dir = os . path . join ( settings . BASE_DIR , 'DynamicAnalyzer/tools/' ) adb = getADB ( tools_dir ) args = [ adb , '-s' , getIdentifier ( ) , 'shell' , 'am' , 'startservice' , 'opensecurity.clipdump/.ClipDumper' ] try : subprocess . call ( args ) data = { 'status' : 'success' } except : PrintException ( '[ERROR] Dumping Clipboard' ) data = { 'status' : 'error' } else : data = { 'status' : 'failed' } return HttpResponse ( json . dumps ( data ) , content_type = 'application/json' ) except : PrintException ( '[ERROR] Dumping Clipboard' ) return HttpResponseRedirect ( '/error/' )
dump android clipboard .