Exemplo n.º 1
0
 def FirstFetch(self):
     targets = DarkNetWebSites.select().where(
         DarkNetWebSites.ismaster == self.usemaster)
     if not targets:
         return
     target = targets[0]
     try:
         self.warn(f'[{target.domain}]Getting PHPSESSID')
         resp = self.session.get(f'http://{target.domain}')
         target.ismaster = True
         target.title = jq(resp.text)('title').text()
         self.usemaster = True
         self.master = target
         self.domain = target.domain
         user = DarkNet_User.select().where(
             DarkNet_User.useful == True).order_by(fn.Rand()).limit(1)
         if not bool(user):
             self.Reg()
         else:
             self.usr = user[0].user
             self.pwd = user[0].pwd
             if random.choice([1, 0]):  # 佛系注册堆积账号池
                 self.Reg()
         return True
     except KeyboardInterrupt:
         pass
     except requests.Timeout:
         target.alive = False
         target.ismaster = False
         self.usemaster = False
     except Exception as e:
         raise
     finally:
         target.save()
Exemplo n.º 2
0
 def FirstFetch(self):
     try:
         last_domain = DarkNet_Domain.select().order_by(DarkNet_Domain.datetime).limit(1)
         self.domain = self.domain if not last_domain else last_domain[0].domain
         self.warn(f"[{self.domain}]Getting PHPSESSID")
         self.session.cookies.clear()
         self.info(f"Already Cleaned Session Cookies.")
         self.RefreshNewDomain(self.session.get(f"http://{self.domain}"))
         resp = self.session.get(f"http://{self.domain}/index.php")
         self.info(f"Current Cookie Nums: {len(self.session.cookies)}")
         user = (
             DarkNet_User.select()
             .where(DarkNet_User.useful == True)
             .order_by(fn.Rand())
             .limit(1)
         )
         if not bool(user):
             self.Reg()
         else:
             self.usr = user[0].user
             self.pwd = user[0].pwd
             if random.choice([1, 0, 0]):  # 佛系注册堆积账号池
                 self.Reg()
         return True
     except KeyboardInterrupt:
         pass
     except Exception as e:
         raise
Exemplo n.º 3
0
 def get_random_user(last_days=30):
     try:
         return (DarkNet_User.select().where(
             DarkNet_User.useful == True,
             DarkNet_User.intime >= moment.now().add(
                 days=-last_days).format("YYYY-MM-DD HH:mm:ss"),
         ).order_by(fn.Rand()).limit(10)[0])
     except Exception as e:
         error(f"[Cursor->get_random_user]: {e}")
Exemplo n.º 4
0
 def get_random_user():
     try:
         return (
             DarkNet_User.select()
             .where(DarkNet_User.useful == True)
             .order_by(fn.Rand())
             .limit(1)[0]
         )
     except Exception as e:
         error(f"[Cursor->get_random_user]: {e}")
Exemplo n.º 5
0
 def FirstFetch(self):
     targets = DarkNetWebSites.select().where(
         DarkNetWebSites.ismaster == self.usemaster)
     if not targets:
         return
     target = targets[0]
     try:
         self.warn(f"[{target.domain}]Getting PHPSESSID")
         self.session.cookies.clear()
         self.info(f"Already Cleaned Session Cookies.")
         resp = self.session.get(f"http://{target.domain}")
         resp = self.session.get(f"http://{target.domain}/index.php")
         self.info(f"Current Cookie Nums: {len(self.session.cookies)}")
         target.ismaster = True
         target.title = jq(resp.text)("title").text()
         self.usemaster = True
         self.master = target
         self.domain = target.domain
         user = (DarkNet_User.select().where(
             DarkNet_User.useful == True).order_by(fn.Rand()).limit(1))
         if not bool(user):
             self.Reg()
         else:
             self.usr = user[0].user
             self.pwd = user[0].pwd
             if random.choice([1, 0, 0]):  # 佛系注册堆积账号池
                 self.Reg()
         return True
     except KeyboardInterrupt:
         pass
     except requests.Timeout:
         target.alive = False
         target.ismaster = False
         self.usemaster = False
     except Exception as e:
         raise
     finally:
         target.save()