code
stringlengths
1
1.72M
language
stringclasses
1 value
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' from message import Message class State(object): ''' Classe que mantém o estado entre a máquina em questão e uma outra. Nesse sentido, o State mantém o estado de uma comunicação cliente-servidor. Sendo assim, é necess...
Python
# -*- coding: utf-8 -*- ''' Created on 12/07/2010 @author: Douglas ''' from messenger import Messenger import coordinator import sys from consts import Consts from state import State from message import Message class Servidor(object): ''' classdocs ''' def __init__(self, isPassiv...
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' from message import Message from messenger import Messenger from consts import Consts from threading import Timer from state import State def init_FenixSD(messenger,coordinator): ''' Função para fazer as classes se conhecere...
Python
''' Created on 13/07/2010 @author: Rondon ''' import unittest from messenger import Messenger from message import Message class Test(unittest.TestCase): def testMessenger(self): msg = Message(None,None,None,None,None) if __name__ == "__main__": #import sys;sys.argv = ['', 'Tes...
Python
# -*- coding: utf-8 -*- ''' Created on Jul 12, 2010 @author: Giulio ''' from messenger import Messenger from consts import Consts import coordinator import sys import random import time from message import Message from state import State class Cliente(object): ''' classdocs ''' ...
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' class Message(object): ''' classdocs ''' #Tipos de mensagem NORMAL_MESSAGE = 0 #a mensagem deve ser repassada para a aplicação STATE_MESSAGE = 1 #a mensagem carrega um State em data ACK_MESSAGE = 2 #...
Python
''' Created on Jul 12, 2010 @author: Giulio ''' class Consts(object): GROUPS = {'Rodrigo':'226.0.0.1','Vinicius':'226.0.0.2','Giulio':'226.0.0.3','Douglas':'226.0.0.4',\ 'Matheus':'226.0.0.5','Carlos':'226.0.0.6','Server':'225.0.0.1'} TIMEOUT_ACTIVE = 15 TIMEOUT_PASSIVE = 25 S...
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' class Controller(object): ''' classdocs ''' def __init__(self): ''' Constructor '''
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' import sys, socket, struct from message import Message from state import State import exceptions from consts import Consts from threading import Timer from threading import Lock class Messenger(object): ''' Classe estática...
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' class State(object): ''' Classe que mantém o estado entre a máquina em questão e uma outra. Nesse sentido, o State mantém o estado de uma comunicação cliente-servidor. Sendo assim, é necessário guardar o id do cliente o ...
Python
# -*- coding: utf-8 -*- ''' Created on 12/07/2010 @author: Douglas ''' from messenger import Messenger import coordinator import sys from consts import Consts from state import State from message import Message class Servidor(object): ''' classdocs ''' def __init__(self, isPassiv...
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' from message import Message from messenger import Messenger from consts import Consts from threading import Timer def init_FenixSD(messenger,coordinator): ''' Função para fazer as classes se conhecerem ''' messenger...
Python
''' Created on 13/07/2010 @author: Rondon ''' import unittest from messenger import Messenger from message import Message class Test(unittest.TestCase): def testMessenger(self): msg = Message(None,None,None,None,None) if __name__ == "__main__": #import sys;sys.argv = ['', 'Tes...
Python
# -*- coding: utf-8 -*- ''' Created on Jul 12, 2010 @author: Giulio ''' from messenger import Messenger from consts import Consts import coordinator import sys import random import time from message import Message from state import State class Cliente(object): ''' classdocs ''' ...
Python
# -*- coding: utf-8 -*- ''' Created on 11/07/2010 @author: Rondon ''' class Message(object): ''' classdocs ''' #Tipos de mensagem NORMAL_MESSAGE = 0 #a mensagem deve ser repassada para a aplicação STATE_MESSAGE = 1 #a mensagem carrega um State em data ACK_MESSAGE = 2 #...
Python
''' Created on Jul 12, 2010 @author: Giulio ''' class Consts(object): GROUPS = {'Rodrigo':'226.0.0.1','Vinicius':'226.0.0.2','Giulio':'226.0.0.3','Douglas':'226.0.0.4',\ 'Matheus':'226.0.0.5','Carlos':'226.0.0.6','Server':'225.0.0.1'} TIMEOUT_ACTIVE = 5 TIMEOUT_PASSIVE = 15
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
# Copyright 2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
#!/usr/bin/env python # # Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
"""Route and Mapper core classes.""" import re import sys import urllib from util import _url_quote as url_quote from util import controller_scan, RouteException from routes import request_config if sys.version < '2.4': from sets import ImmutableSet as frozenset import threadinglocal def strip_slashes(name): ...
Python
try: import threading except ImportError: # No threads, so "thread local" means process-global class local(object): pass else: try: local = threading.local except AttributeError: # Added in 2.4, but now we'll have to define it ourselves import thread class loc...
Python
"""Utility functions for use in templates / controllers *PLEASE NOTE*: Many of these functions expect an initialized RequestConfig object. This is expected to have been initialized for EACH REQUEST by the web framework. """ import os import re import urllib from routes import request_config def _screenargs(kargs): ...
Python
"""Provides common classes and functions most users will want access to.""" import threadinglocal, sys class _RequestConfig(object): """ RequestConfig thread-local singleton The Routes RequestConfig object is a thread-local singleton that should be initialized by the web framework that is utilizin...
Python
"""Routes WSGI Middleware""" import re import urllib import logging try: from paste.wsgiwrappers import WSGIRequest except: pass from routes.base import request_config log = logging.getLogger('routes.middleware') class RoutesMiddleware(object): """Routing middleware that handles resolving the PATH_INFO ...
Python
maxVf = 200 # Generating the header head = """// Copyright qiuc12@gmail.com // This file is generated autmatically by python. DONT MODIFY IT! #pragma once #include <OleAuto.h> class FakeDispatcher; HRESULT DualProcessCommand(int commandId, FakeDispatcher *disp, ...); extern "C" void DualProcessCommandWrap()...
Python
#!/usr/bin/env python # This file is part of Elsim # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ver...
Python
""" Implementation of Charikar similarity hashes in Python. Most useful for creating 'fingerprints' of documents or metadata so you can quickly find duplicates or cluster items. Part of python-hashes by sangelone. See README and LICENSE. """ from hashtype import hashtype class simhash(hashtype): def create_hash...
Python
# This file is part of Elsim # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, ...
Python
# This file is part of Elsim # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, ...
Python
#!/usr/bin/env python # This file is part of Elsim. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ve...
Python
#!/usr/bin/env python import sys PATH_INSTALL = "./libelsign" sys.path.append(PATH_INSTALL) from libelsign import libelsign #from libelsign import libelsign2 as libelsign SIGNS = [ [ "Sign1", "a", [ [ 4.4915299415588379, 4.9674844741821289, 4.9468302726745605, 0.0 ],...
Python
# This file is part of Elsim. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License,...
Python
#!/usr/bin/env python # This file is part of Elsim # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ver...
Python
#!/usr/bin/env python # This file is part of Elsim # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ver...
Python
# This file is part of Elsim # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, ...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python # This file is part of Elsim. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Elsim is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ve...
Python
#!/usr/bin/env python # This file is part of Elsim. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, eith...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software ...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software ...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software ...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2010, Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software ...
Python
# This file is part of Androguard. # # Copyright (C) 2011, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# Radare ! from r2 import r_bin from r2 import r_asm from r2 import r_anal from r2 import r_core from miasm.arch.arm_arch import arm_mn from miasm.core.bin_stream import bin_stream from miasm.core import asmbloc class ARM2 : def __init__(self) : b = r_bin.RBin () b.load("./apks/exploits/617efb2...
Python
# This file is part of Androguard. # # Copyright (C) 2012 Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
DVM_PERMISSIONS_BY_PERMISSION = { "BIND_DEVICE_ADMIN" : { "Landroid/app/admin/DeviceAdminReceiver;" : [ ("C", "ACTION_DEVICE_ADMIN_ENABLED", "Ljava/lang/String;"), ], "Landroid/app/admin/DevicePolicyManager;" : [ ("F", "getRemoveWarning", "(Landroid/content/ComponentName; Landroid/os/RemoteCallback;)"), ("F", ...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2010, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
Python
#!/usr/bin/env python from setuptools import setup, find_packages setup( name = 'androguard', version = '1.2', packages = find_packages(), scripts = ['androaxml.py', 'androcsign.py', 'androdiff.py', 'androgexf.py', 'androlyze.py', 'andromercury.py', 'androrisk.py', 'androsign.py', ...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python f = open("permi", "r") b = f.readlines() f.close() for i in b : v = i.split(" ") if len(v) > 2 : buff = ' '.join( j for j in v[3:] ) buff = buff[:-1] j = 0 while j < len(buff) and buff[j] == ' ' : j += 1 buff = buff[j:] if ...
Python
#!/usr/bin/env python from xml.dom import minidom MANIFEST = "tools/permissions/AndroidManifest.xml" STRINGS = "tools/permissions/strings.xml" manifest_document = minidom.parse( MANIFEST ) strings_document = minidom.parse( STRINGS ) dstrings = {} for i in strings_document.getElementsByTagName( "string" ) : try ...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2010, Anthony Desnos <desnos at t0t0.org> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation...
Python
PERMISSIONS_BY_HAND = { "SEND_SMS" : { "android.telephony.SmsManager" : [ [ "F", "getDefault()", "static SmsManager" ], [ "F", "sendDataMessage(java.lang.String, java.lang.String, short, byte[], PendingIntent, PendingIntent)", "void" ], # [ "F",...
Python
PERMISSIONS = { "BIND_DEVICE_ADMIN" : { "android.app.admin.DeviceAdminReceiver" : [ ["C","ACTION_DEVICE_ADMIN_ENABLED","public static final String"], ], }, "FACTORY_TEST" : { "android.content.pm.ApplicationInfo" : [ ["C","FLAG_FACTORY_TEST","public static final i...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2010, Anthony Desnos <desnos at t0t0.org> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation...
Python
#!/usr/bin/env python import sys, hashlib PATH_INSTALL = "./" sys.path.append(PATH_INSTALL) from androguard.core.androgen import AndroguardS from androguard.core.analysis import analysis #TEST = 'examples/java/test/orig/Test1.class' #TEST = 'examples/java/Demo1/orig/DES.class' #TEST = 'examples/java/Demo1/orig/U...
Python
#!/usr/bin/env python import sys, os import cProfile # http://code.activestate.com/recipes/286222-memory-usage/ _proc_status = '/proc/%d/status' % os.getpid() _scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, 'KB': 1024.0, 'MB': 1024.0*1024.0} def _VmB(VmKey): global _proc_status, _scale # get pseudo ...
Python
#!/usr/bin/env python import sys, random, string PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "/core") sys.path.append(PATH_INSTALL + "/core/bytecodes") import jvm TEST = "./examples/java/test/orig/Test1.class" TEST_REF = "./examples/java/Hello.class" TEST_OUTPUT = "./examples/java/test/new/Test1.class" j = ...
Python
#!/usr/bin/env python import sys PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "./") from androguard.core.androgen import AndroguardS TEST = [ './examples/java/Hello.class' ] _a = AndroguardS( TEST[0] ) _a.show() for field in _a.gets("fields") : print field.get_name(), field.get_descriptor() for method ...
Python
#!/usr/bin/env python import hashlib import sys PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "./") from androguard.core.androgen import Androguard def hexdump(src, length=8, off=0): result = [] digits = 4 if isinstance(src, unicode) else 2 for i in xrange(0, len(src), length): s = src[i:i+...
Python
#!/usr/bin/env python import sys, random, string PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "/core") sys.path.append(PATH_INSTALL + "/core/bytecodes") import jvm TEST = "./examples/java/test/orig/Test1.class" TEST_REF = "./examples/java/Hello.class" TEST_OUTPUT = "./examples/java/test/new/Test1.class" j = ...
Python
#!/usr/bin/env python import sys import hashlib import pyDes PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "./") sys.path.append(PATH_INSTALL + "/core") sys.path.append(PATH_INSTALL + "/core/bytecodes") sys.path.append(PATH_INSTALL + "/core/analysis") from androguard import * import analysis TEST = "./geinimi...
Python
#!/usr/bin/env python import sys, hashlib PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "./") from androguard.core.androgen import AndroguardS from androguard.core.analysis import analysis OUTPUT = "./output/" #TEST = 'examples/java/test/orig/Test1.class' #TEST = 'examples/java/Demo1/orig/DES.class' #TEST = ...
Python
#!/usr/bin/env python import sys, hashlib PATH_INSTALL = "./" sys.path.append(PATH_INSTALL) from androguard.core.androgen import AndroguardS from androguard.core.analysis import analysis #TEST = 'examples/java/test/orig/Test1.class' #TEST = 'examples/java/Demo1/orig/DES.class' #TEST = 'examples/java/Demo1/orig/...
Python
#!/usr/bin/env python import sys PATH_INSTALL = "./" sys.path.append(PATH_INSTALL) from androguard.core.bytecodes import dvm from androguard.core.analysis import analysis TEST = "examples/android/TestsAndroguard/bin/classes.dex" j = dvm.DalvikVMFormat( open(TEST).read() ) x = analysis.VMAnalysis( j ) j.set_vmanaly...
Python
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation,...
Python
#!/usr/bin/env python import sys, random, string PATH_INSTALL = "./" sys.path.append(PATH_INSTALL + "/core") sys.path.append(PATH_INSTALL + "/core/bytecodes") import jvm TEST = "./examples/java/test/orig/Test1.class" TEST_OUTPUT = "./examples/java/test/new/Test1.class" j = jvm.JVMFormat( open(TEST).read() ) # Mod...
Python