Beispiel #1
0
def create_group(level=0):
    g = Group()
    g.group_id = crypto.randomize_int(4)
    g.title = "test"
    g.creation = utils.now()
    g.last_mod = utils.now()
    g.last_access = utils.now()
    g.image = 1
    g.level = level

    return g
Beispiel #2
0
def create_group(level=0):
    g = Group()
    g.group_id = crypto.randomize_int(4)
    g.title = "test"
    g.creation = utils.now()
    g.last_mod = utils.now()
    g.last_access = utils.now()
    g.image = 1
    g.level = level

    return g
Beispiel #3
0
def create_metaentry(group):
    now = utils.now()

    e = Entry()
    e.uuid = utils.generate_uuid()
    e.group_id = group.group_id
    e.image = 0
    e.title = "Meta-Info"
    e.url = "$"
    e.username = "******"
    e.password = ""
    e.comment = "KPX_CUSTOM_ICONS_4"
    e.creation = now + datetime.timedelta(minutes=10)
    e.last_mod = now + datetime.timedelta(minutes=20)
    e.last_access = now + datetime.timedelta(minutes=30)
    e.expire = now + datetime.timedelta(minutes=40)
    e.binary_desc = "bin-stream"
    e.binary = bytearray(b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00")

    return e
Beispiel #4
0
def create_entry(group):
    now = utils.now()

    e = Entry()
    e.uuid = utils.generate_uuid()
    e.group_id = group.group_id
    e.image = 1
    e.title = "test title"
    e.url = "http://www.example.com"
    e.username = "******"
    e.password = "******"
    e.comment = "test comment"
    e.creation = now + datetime.timedelta(minutes=10)
    e.last_mod = now + datetime.timedelta(minutes=20)
    e.last_access = now + datetime.timedelta(minutes=30)
    e.expire = now + datetime.timedelta(minutes=40)
    e.binary_desc = "test binary desc"
    e.binary = bytearray("test binary\x00")

    return e
Beispiel #5
0
def create_metaentry(group):
    now = utils.now()

    e = Entry()
    e.uuid = utils.generate_uuid()
    e.group_id = group.group_id
    e.image = 0
    e.title = "Meta-Info"
    e.url = "$"
    e.username = "******"
    e.password = ""
    e.comment = "KPX_CUSTOM_ICONS_4"
    e.creation = now + datetime.timedelta(minutes=10)
    e.last_mod = now + datetime.timedelta(minutes=20)
    e.last_access = now + datetime.timedelta(minutes=30)
    e.expire = now + datetime.timedelta(minutes=40)
    e.binary_desc = "bin-stream"
    e.binary = bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')

    return e
Beispiel #6
0
def create_entry(group):
    now = utils.now()

    e = Entry()
    e.uuid = utils.generate_uuid()
    e.group_id = group.group_id
    e.image = 1
    e.title = "test title"
    e.url = "http://www.example.com"
    e.username = "******"
    e.password = "******"
    e.comment = "test comment"
    e.creation = now + datetime.timedelta(minutes=10)
    e.last_mod = now + datetime.timedelta(minutes=20)
    e.last_access = now + datetime.timedelta(minutes=30)
    e.expire = now + datetime.timedelta(minutes=40)
    e.binary_desc = "test binary desc"
    e.binary = bytearray('test binary\x00')

    return e