예제 #1
0
    def load(self):
        if not self.cfg.load():
            print >> sys.stderr, "Unable to load InputDB configuration!"
            return False

        if self.inputprops is not None:
            # not .props as Properties!
            self.props = inputprops.InputPropsCfg(self.inputprops, self)
            if not self.props.load():
                print >> sys.stderr, "Unable to load InputProps"
                return False

            # add any new properties specified by inputprops into the
            # correct inputs
            inputprops.apply_props(self.cfg.objects.itervalues(), self.props)

        # get all inputs specified by inputdb and wrap into an Input
        # object
        self.inputdb = [Input(i, self) for i in self.cfg]
        self.inpnames = set([i.get_id() for i in self.inputdb])

        # setup the name -> Input map; note an input can have multiple
        # formats...
        self.n2i = dict([(n, list()) for n in self.inpnames])
        for i in self.inputdb:
            self.n2i[i.get_id()].append(i)

        return True
예제 #2
0
    def __init__(self):

        # initialize the pygame display and OpenGL context
        pygame.display.init()
        pygame.font.init()

        # load a custom icon
        pygame.display.set_icon(pygame.image.load("images/icon.png"))

        # initialize buffers to perform antialiasing
        pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLEBUFFERS, 1)
        pygame.display.gl_set_attribute(pygame.GL_MULTISAMPLESAMPLES, 4)

        self.setWindowTitle("   ")
        self.setWindowSize(640, 640)

        self.clock = pygame.time.Clock()
        self.deltaTime = 0
        self.input = Input()
        self.running = True
예제 #3
0
파일: liffy.py 프로젝트: 5l1v3r1/liffy-1
def main():
    if not len(sys.argv):
        print("[!] Not Enough Arguments!")
        # TODO: Add usage
        sys.exit(0)

    parser = argparse.ArgumentParser()
    parser.add_argument("url", help="URL to test for LFI")
    parser.add_argument("-d", "--data", help="Use data:// technique", action="store_true")
    parser.add_argument("-i", "--input", help="Use input:// technique", action="store_true")
    parser.add_argument("-e", "--expect", help="Use expect:// technique", action="store_true")
    parser.add_argument("-f", "--filter", help="Use filter:// technique", action="store_true")
    parser.add_argument("-p", "--proc", help="Use /proc/self/environ technique", action="store_true")
    parser.add_argument("-a", "--access", help="Apache access logs technique", action="store_true")
    parser.add_argument("-ns", "--nostager", help="execute payload directly, do not use stager", action="store_true")
    parser.add_argument("-r", "--relative", help="use path traversal sequences for attack", action="store_true")
    parser.add_argument("--ssh", help="SSH auth log poisoning", action="store_true")
    parser.add_argument("-l", "--location", help="path to target file (access log, auth log, etc.)")
    parser.add_argument("--cookies", help="session cookies for authentication")

    args = parser.parse_args()

    url = args.url
    nostager = args.nostager
    relative = args.relative
    cookies = args.cookies

    parsed = urllib.parse.urlsplit(url)

    print(colors("[~] Checking Target: {0}".format(parsed.netloc), 93))

    # if ping(parsed.netloc):
    #     print(colors("[+] Target looks alive ", 92))
    # else:
    #     print(colors("[!] Target irresponsive ", 91))
    #     sys.exit(1)

    if not parsed.query:
        print(colors("[!] No GET parameter Provided ", 91))

    # TODO: Find a better way to do these checks
    if args.data:
        print(colors("[~] Testing with data:// ", 93))
        d = data.Data(url, nostager, cookies)
        d.execute_data()
    elif args.input:
        print(colors("[~] Testing with input:// ", 93))
        i = Input.Input(url, nostager, cookies)
        i.execute_input()
    elif args.expect:
        print(colors("[~] Testing with expect:// ", 93))
        e = Expect.Expect(url, nostager, cookies)
        e.execute_expect()
    elif args.proc:
        print(colors("[~] /proc/self/environ Technique Selected!", 93))
        i = proc.Environ(url, nostager, relative, cookies)
        i.execute_environ()
    elif args.access:
        print(colors("[~] Testing for Apache access.log poisoning", 93))
        if not args.location:
            print(colors("[~] Log Location Not Provided! Using Default", 93))
            l = '/var/log/apache2/access.log'
        else:
            l = args.location
        a = accesslog(url, l, nostager, relative, cookies)
        a.execute_logs()
    elif args.ssh:
        print(colors("[~] Testing for SSH log poisoning ", 93))
        if not args.location:
            print(colors("[~] Log Location Not Provided! Using Default", 93))
            l = '/var/log/auth.log'
        else:
            l = args.location
        a = sshlog.SSHLogs(url, l, relative, cookies)
        a.execute_ssh()
    elif args.filter:
        print(colors("[~] Testing with expect://", 93))
        f = Filter.Filter(url, cookies)
        f.execute_filter()
    else:
        print(colors("[!] Please select atleast one technique to test", 91))
        sys.exit(0)
예제 #4
0
from core import GraphicsController
from core import GameController
from core import Input

#internal variables
sys_graphicsController = GraphicsController()
sys_gameController = GameController()
sys_inputController = Input()

def drawRectangle(x, y, width, height):
	global sys_graphicsController
	sys_graphicsController.drawRectangle(x, y, width, height)

def drawCircle(x, y, radius):
	global sys_graphicsController
	sys_graphicsController.drawCircle(x, y, radius)

def drawLine(x1, y1, x2, y2):
	global sys_graphicsController
	sys_graphicsController.drawLine(x1, y1, x2, y2)

def drawPoint(x, y):
	global sys_graphicsController
	sys_graphicsController.drawPoint(x, y)

def drawString(x, y, string):
	global sys_graphicsController
	sys_graphicsController.drawString(x, y, string)

def useColour(r, g, b, a):
	global sys_graphicsController
예제 #5
0
import geopandas as gpd
from datetime import datetime as dt

# configure server
app = Wrapper(__name__, meta_tags=const.meta_tags)
app.config["suppress_callback_exceptions"] = True
app.title = const.title
server = app.server

# credentials
mapbox_access_token = const.credentials['mapbox']

app.layout = Div([Location(id='url', refresh=False), Div(id='page-content')])


@app.callback(Output('page-content', 'children'), [Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/abi':
        return build_abi_page()
    elif pathname == '/aquisition':
        return build_download_page()
    else:
        return build_glm_page(app)


@app.callback(
    [
        Output("states-mapview", "figure"),
        Output("histogram", "figure"),
        Output("lightnings", "figure"),
        Output("lightning-by-state", "figure"),