当前位置: 首页>>代码示例>>Python>>正文


Python DBUtil.select_one_log方法代码示例

本文整理汇总了Python中DBUtil.select_one_log方法的典型用法代码示例。如果您正苦于以下问题:Python DBUtil.select_one_log方法的具体用法?Python DBUtil.select_one_log怎么用?Python DBUtil.select_one_log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DBUtil的用法示例。


在下文中一共展示了DBUtil.select_one_log方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: range

# 需要导入模块: import DBUtil [as 别名]
# 或者: from DBUtil import select_one_log [as 别名]
    # randon pick 45 logs and do injections

    ids = []
    for i in range(0, 45):
        ids.append(randint(1, log_count + 1))

    print ids

    # all random ids
    ids = [782646, 767402, 171206, 329690, 436102, 853455, 568442, 709924, 891034, 425445, 349647, 593099, 155354, 168514, 126931, 596548, 315300, 605358, 239982, 27978, 174194, 781837, 390737, 818783, 546082, 877560, 464808, 424398, 512913, 899854, 106033, 33012, 342636, 674911, 39162, 794296, 901763, 823964, 749323, 691157, 740987, 292924, 430652, 814821, 718571]

    # actually used ids
    # ids = [782646, 767402, 171206, 329690, 436102, 853455, 568442, 709924, 891034, 425445, 349647, 593099, 27978, 174194, 781837, 390737, 818783, 546082, 877560, 464808, 424398, 512913, 899854, 106033, 33012, 342636, 674911, 39162, 794296, 901763, 823964, 749323, 691157, 740987, 292924, 430652, 814821, 718571]

    print ids[0]
    log = DBUtil.select_one_log(ids[0])
    log.s_sitename = "DRUPAL"
    log.s_computername = "WWW4"
    log.s_ip = "202.168.12.11"
    log.cs_method = "HEAD"
    log.cs_uri = "http://www.sweetgeorgia.com/cgibin/af.cgi?_browser_out=| echo;id;exit"
    log.s_port = 443
    log.c_ip = "81.171.1.165"
    log.cs_version = "HTTP/1.1"
    log.cs_user_agent = "OC/15.0.4569.1503 (Microsoft Lync)"
    log.cs_host = "http://www.sweetgeorgia.com/cgibin/af.cgi?_browser_out=|echo;id;exit|"
    log.sc_status = 200
    log.sc_substatus = 0
    log.sc_win32_status = 0
    log.sc_bytes = 9749
    log.cs_bytes = 273
开发者ID:Hui-Li,项目名称:SLA,代码行数:33,代码来源:Injection.py


注:本文中的DBUtil.select_one_log方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。