Exemplo n.º 1
0
    def close(self):
        if not hasattr(self, "_files"):
            return

        for re, im in self._files.itervalues():
            re.close()
            im.close()

        self._files.clear()
Exemplo n.º 2
0
    def unfollower(self):
        push = 10

        pathFile = "{}-(following)_new.csv".format(self.username)
        with open(pathFile, "r") as re:
            rd = csv.reader(re)
            next(rd)

            for line in rd:
                user = line[0]
                situation = pushDate(line[1], date_today, push)

            re.close()
Exemplo n.º 3
0
def searchRv(txtnumber):
    try:
       
        name = str(txtnumber) + ".txt"
        if os.path.exists(name):
            #print(name+" FOUND  --------------DATA Have Installed")
            re = open(name, 'r', encoding='ascii', errors='ignore')
            datareview = re.read();
            re.close()
        else:
            datareview = "NULL"
            #print("review txt file  [" + name + "]  does not exist") 
    except:
        print("Can't get Data")       
    return datareview      
Exemplo n.º 4
0
    def unfollower(self):
        push = 10
        date_from_started = date_today

        pathFile = "{}-(following)_new.csv".format(self.username)
        with open(pathFile, "r") as re:
            rd = csv.reader(re)
            next(rd)

            # for line in rd:
            #     user = line[0]
            #     situation = pushDate(line[1], date_today, push)
            #     print(situation)

            re.close()
def Modifysetting():
    clear_screen()
    with open("token.json", "r") as re:
        data = json.loads(re.read())
        re.close()
    print('APP_KEY :', data['Plurk']['APP_KEY'])
    print('APP_SECRET :', data['Plurk']['APP_SECRET'])
    print('ACCEESS_TOKEN :', data['Plurk']['ACCEESS_TOKEN'])
    print('ACCESS_TOKEN_SECRET :', data['Plurk']['ACCESS_TOKEN_SECRET'])
    print('Token :', data['Discord']['Token'])
    print('ServerID :', data['Discord']['ServerID'])
    print('ChannelID :', data['Discord']['ChannelID'])
    print('Prefix :', data['Discord']['Prefix'])
    print('BlockedWord :', data['BlockedWord'])
    print(modt)
    print(modif)
    choice = user_choice()
    if not choice == "0":
        print('\n' + userinputs[int(choice) - 1])
        instr = input("> ").replace(' ', '')
    if choice == "1":
        data['Plurk']['APP_KEY'] = instr
    elif choice == "2":
        data['Plurk']['APP_SECRET'] = instr
    elif choice == "3":
        data['Plurk']['ACCEESS_TOKEN'] = instr
    elif choice == "4":
        data['Plurk']['ACCESS_TOKEN_SECRET'] = instr
    elif choice == "5":
        data['Discord']['Token'] = instr
    elif choice == "6":
        data['Discord']['ServerID'] = instr
    elif choice == "7":
        data['Discord']['ChannelID'] = instr
    elif choice == "8":
        data['Discord']['Prefix'] = instr
    elif choice == "9":
        data = ModifysettinBlockedWord(data)
    elif choice == "0":
        with open("token.json", "w") as write_file:
            json.dump(data, write_file)
            write_file.close
        return True
    with open("token.json", "w") as write_file:
        json.dump(data, write_file)
        write_file.close
Exemplo n.º 6
0
 def room_enter(self, url_room):
     re = self.session.get(url_room, headers={'User-Agent': 'Bot'})
     re.close()
Exemplo n.º 7
0
 def room_enter(self, url_room):
     re = self.session.get(url_room)
     re.close()
     room = self.session.get('https://drrr.com/json.php?fast=1')
     # talks = re.findall('{"id".*?"message":".*?"}', re.search('"talks":.*', room).group(0))
     return room.text
Exemplo n.º 8
0
                result.append('%s has iis_put vlun at %s\r\n' %(ip,port))
        except Exception,e:
            print e
            pass


        #webfilescan
        try:
            header={'X-FORWARDED-FOR': '61.135.169.121', 'Referer': 'http://www.baidu.com','User-Agent':'baidupaida'}
            d=open('conf/dir.conf','r')
            data=d.readline().strip('\r\n')
            url404="http://%s:%s/Iamstall404hahah" %(ip,port)
            #print url404
            re=requests.get(url404,headers=header,verify=False,timeout=10)
            conten404=re.content
            re.close()
            while(data):
                url="http://%s:%s/%s" %(ip,port,data)
                #print url
                url=my_urlencode(url)
                #print url
                r=requests.get(url,headers=header,verify=False,timeout=10)
                if r.status_code ==200:
                    if r.content ==conten404:
                        pass
                    else:
                        lock.acquire()
                        print '%s  is exist' %url
                        lock.release()
                        url200.append(url)
                        result.append('%s  is exist\r' %url)
Exemplo n.º 9
0
        pass

    #webfilescan
    try:
        header = {
            'X-FORWARDED-FOR': '61.135.169.121',
            'Referer': 'http://www.baidu.com',
            'User-Agent': 'baidupaida'
        }
        d = open('conf/dir.conf', 'r')
        data = d.readline().strip('\r\n')
        url404 = "http://%s:%s/Iamstall404hahah" % (ip, port)
        #print url404
        re = requests.get(url404, headers=header, verify=False, timeout=10)
        conten404 = re.content
        re.close()
        while (data):
            url = "http://%s:%s/%s" % (ip, port, data)
            #print url
            url = my_urlencode(url)
            #print url
            r = requests.get(url, headers=header, verify=False, timeout=10)
            if r.status_code == 200:
                if r.content == conten404:
                    pass
                else:
                    lock.acquire()
                    print '%s  is exist' % url
                    lock.release()
                    url200.append(url)
                    result.append('%s  is exist\r' % url)
Exemplo n.º 10
0
 def room_enter(self, url_room):
     re = self.session.get(url_room)
     re.close()
     room = self.session.get('https://drrr.com/json.php?fast=1')
     return room.text
Exemplo n.º 11
0
 def room_enter(self, url_room):
     re = self.session.get(url_room,headers={'User-Agent': 'Bot'})
     re.close()
     room = self.session.get('https://drrr.com/json.php?fast=1')
     return room.text