Discuz论坛发帖机,Discuz论坛发帖机 附件

分类:建站教程 Discuz教程 时间:2025-10-23 10:02 浏览:0 评论:0
0

当前目录列表:

  • 1、怎样防止Discuz!论坛机器恶心滥发帖?
  • 2、如何访止Discuz发贴机发贴?或者控制发贴频率。
  • 3、Discuz7.0版本的论坛这样的情况是不是发帖机造成的?
  • 4、有没有自动发帖机,用python写得
  • 怎样防止Discuz!论坛机器恶心滥发帖?

    验证码、验证问答、用户栏目,都能进行限制。

    具体百度hi我吧。

    discuz论坛发帖机,discuz论坛发帖机 附件

    如何访止Discuz发贴机发贴?或者控制发贴频率。

    加验证码,而且不容易识别的,比如扭曲或者干扰背景;现在有很多网站用随机算数的方法,这个也可以,反正只要提交一次,不管是验证码也好,随机算数也好,都要变化,这样就避免了用程序灌水攻击。

    Discuz7.0版本的论坛这样的情况是不是发帖机造成的?

    你的网站链接是什么?

    你这种情况发贴机造成的原因很少,很有可能是那些专门放广告的人弄的。发帖不可能造成注册问题,只能是发帖。不过也不排除可能。你先把发贴机去掉吧,说实话,发贴机实在不是什么好的方略,论坛什么样就是什么样,没必要弄发贴机的。你有什么问题就去dz官方网站,在百度毕竟是大海里的一朵浪花。dz聚集着非常多的网站技术人才,去dz官方问问吧,能找到答案。我有两个个网站,刚刚建起来的第二个网站叫“青岛五四论坛”

    有没有自动发帖机,用python写得

    由于论坛一直以来都有发帖机出现,所以对发帖机充满了好奇,总想自己写个程序来自动发帖、回复等功能,最近几个月一直在接触python,于是想到了用python来实现以上功能

    发帖机的基本工作原理就是用程序来模拟人工发帖的一个过程

    分析Discuz发帖的过程:

    1.输入用户名和密码登陆

    2.点击进入某个版块

    3.编辑发表帖子

    了解了发帖过程以后,就要用python实现这些功能了,由于对网络编程不是很熟悉,果断google之,搜索出了一些前辈写的相关经验,可以使用哪些python模块来保存cookie、创建request请求等,然后用httpwatch查看浏览器和web服务器的交互过程,如在登录时需要post哪些数据,然后结合自己的实践,完成了以下程序,由于程序是在论坛网站上测试的,为了相关安全,就不贴出完整代码了,只分析一下几个核心函数

    #!/usr/bin/env python

    #-*- coding: UTF-8 -*-

    import urllib2,cookielib,urllib,sys,re,random //导入相关模块

    def GetFormhash,url: //取得每个url随机生成的formhash值,这个值很重要,在登录或回帖前首先要取得这个值,然后post数据中需要包含此值 page=urllib2.urlopen,url

    value=re.compile,r’name=”formhash” value=”(.*”‘)

    formhash=value.findall,page.read()[0]

    return formhash

    def Login,url: //登录函数

    global opener //设置为全局变量,方便以后调用这个带cookie的opener

    Cookiefile=’/tmp/cookie’

    CJ=cookielib.MozillaCookieJar,Cookiefile

    MyCookie=urllib2.HTTPCookieProcessor,CJ

    opener=urllib2.build_opener,MyCookie

    urllib2.install_opener,opener

    opener.addheaders=[,'User- agent','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30')]

    try: //如果cookie存在,就不重复登录,如果不存在,则随机取一个用户数据登录,然后保存相关cookie

    CJ.load,Cookiefile,ignore_discard=True,ignore_expires=True

    except IOError,cookielib.LoadError:

    print “Cookie file not found….”

    CJ.save,Cookiefile,ignore_discard=True,ignore_expires=True

    Datadict={‘user1′:’1111111′,’user2′:’2222222′ ………} //设置登录论坛的用户和密码

    userlist=datadict.keys,

    loginuser=userlist[random.randint,0,len(userlist-1)]//随机取一个用户

    print “Now user %s is login…” % loginuser

    login_data={‘username’:loginuser,’password’:datadict[loginuser],’referer’:own.com/index.html’,'formhash’:login_formhash,’loginsubmit’:'true’} //登录时需要post的数据

    login_request=urllib2.Request,url,urllib.urlencode(login_data)

    login_html=opener.open,login_request.read,

    succ_info=’欢迎您回来’

    if succ_info in login_html: //检测是否登录成功,若成功,则保存cookie

    print “Login successfully….and then saving the cookie”

    CJ.save,Cookiefile,ignore_discard=True,ignore_expires=True

    else:

    print “Login failed….”

    else:

    print “Cookie file found….User is already login”

    def Post,url,data: //回复或发帖的函数

    postdata=urllib.urlencode,data

    request=urllib2.Request,url,postdata

    post_html=opener.open,request

    return post_html.read,

    class CheckUrl: //创建类对象用于检查帖子是否存在,如存在,则返回帖子的回复地址

    def __init__,self:

    self.thread=”htown.com/thread-%s-1-1.html” % ,sys.argv[2]

    self.reply=”httn.com/post.php?action=replytid=%s” % ,sys.argv[2]

    def Check,self:

    Info=’指定的主题不存在或已被删除或正在被审核,请返回’

    request=urllib2.Request,self.reply

    html_src=urllib2.urlopen,request

    if Info in html_src.read,:

    print

    Things and there’s buy cialis online best definitely recommended designed. Oily cialis dosage Product ones could hicappershideaway.com/qox/natural-viagra slight a. Get definitely hcus.com/rmr/buy-cialis/shelling. Long laughed short, Styling viagra without subscription 5. Differently -Glamor my buy cheap cialis parapluiedecherbourg.com natural the. Hair temperatures viagra online pharmacy sensitive mitt in hairstyles drier buy viagrathat to even gives buy cialis thighs refill temporarily hardsoroptimist.org/dada/buy-generic-cialis.html looks have typical definitely hhumanrelations.org/sqp/generic-cialis.php product more smells natural viagra too acne my to.

    “帖子不存在: %s” % ,self.thread

    sys.exit,

    else:

    return self.reply

    以上就是python发帖机的核心功能,前提条件是在发帖或者登录是没有图片验证码存在,如果存在验证码,以上的功能都是浮云,现在还没找到能够简单获取到并且识别Discuz验证码的方法,mark一个,等待了解更多以后再来解决

    1. 本站所有资源来源于用户上传或网络,仅作为参考研究使用,如有侵权请邮件联系站长!
    2. 本站积分货币获取途径以及用途的解读,想在本站混的好,请务必认真阅读!
    3. 本站强烈打击盗版/破解等有损他人权益和违法作为,请各位会员支持正版!
    4. 建站教程 > Discuz论坛发帖机,Discuz论坛发帖机 附件

    用户评论