python编写小字典

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

代码如下

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

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

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

posted @   z珠穆朗玛鑫  阅读(306)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示