zoukankan      html  css  js  c++  java
  • python编写小字典

    因为我们渗透时,有些用户名是员工的编号,大致都是000000-999999,所以我们就可以写一个简单py脚本来遍历

    代码如下

    for i in range(999999):
    if i<10:
    i = '00000'+str(i)
    print(i)
    elif 10<=i and i<100:
    i ='0000'+str(i)
    #print(i)
    elif 100<=i and i<1000:
    i = '000'+str(i)
    #print(i)
    elif 1000<=i and i<10000:
    i = '00'+str(i)
    #print(i)
    elif 10000<=i and i<100000:
    i = '0'+str(i)
    #print(i)
    else:
    i = str(i)
    with open('1a1.txt', 'a') as f:
    f.write(i + " ")
     

      然后我直接将字典放上来,大家以后就不用每次生成了

    https://github.com/xinxin999/mytools/blob/master/%E7%BC%96%E5%8F%B7.txt

  • 相关阅读:
    P4999 烦人的数学作业
    P3413 SAC#1
    P2657 [SCOI2009]windy数
    P2602 [ZJOI2010]数字计数
    JSOI2007 建筑抢修
    CF161B Discounts
    Description
    Street Numbers
    Pizza Cutting
    Supermean
  • 原文地址:https://www.cnblogs.com/xinxin999/p/13723321.html
Copyright © 2011-2022 走看看