diff --git a/bin/CreditCard.py b/bin/CreditCard.py index 430c6d7a..04ce9c62 100755 --- a/bin/CreditCard.py +++ b/bin/CreditCard.py @@ -66,7 +66,7 @@ if __name__ == "__main__": publisher.warning('{}Checked {} valid number(s)'.format( to_print, len(creditcard_set))) #Send to duplicate - p.populate_set_out(filepath, 'Duplicate') + p.populate_set_out(filename, 'Duplicate') #send to Browse_warning_paste p.populate_set_out('creditcard;{}'.format(filename), 'BrowseWarningPaste') else: diff --git a/bin/Helper.py b/bin/Helper.py index 124083b3..66d7766a 100755 --- a/bin/Helper.py +++ b/bin/Helper.py @@ -134,7 +134,7 @@ class Process(object): self.r_temp.hset('queues', self.subscriber_name, int(self.r_temp.scard(in_set))) message = self.r_temp.spop(in_set) - timestamp = int(time.mktime(datetime.datetime.utcnow().timetuple())) + timestamp = int(time.mktime(datetime.datetime.now().timetuple())) dir_name = os.environ['AIL_HOME']+self.config.get('Directories', 'pastes') if message is None: @@ -142,7 +142,6 @@ class Process(object): else: try: - #path = message[message.index(dir_name)+len(dir_name):message.index(".gz")] path = message.split(".")[-2].split("/")[-1] value = str(timestamp) + ", " + path self.r_temp.set("MODULE_"+self.subscriber_name, value) diff --git a/bin/ModuleInformations.py b/bin/ModuleInformations.py index f63099eb..b6b22504 100755 --- a/bin/ModuleInformations.py +++ b/bin/ModuleInformations.py @@ -29,7 +29,8 @@ if __name__ == "__main__": while True: - table = PrettyTable(['#', 'Queue', 'Amount', 'Paste start time', 'Processing time for current paste (H:M:S)', 'Paste hash'], sortby="Processing time for current paste (H:M:S)", reversesort=True) + table1 = PrettyTable(['#', 'Queue', 'Amount', 'Paste start time', 'Processing time for current paste (H:M:S)', 'Paste hash'], sortby="Processing time for current paste (H:M:S)", reversesort=True) + table2 = PrettyTable(['#', 'Queue', 'Amount', 'Paste start time', 'Time since idle (H:M:S)', 'Last paste hash'], sortby="Time since idle (H:M:S)", reversesort=True) num = 0 for queue, card in server.hgetall("queues").iteritems(): key = "MODULE_" + queue @@ -38,10 +39,14 @@ if __name__ == "__main__": timestamp, path = value.split(", ") if timestamp is not None and path is not None: num += 1 - startTime_readable = datetime.datetime.utcfromtimestamp(int(timestamp)) + startTime_readable = datetime.datetime.fromtimestamp(int(timestamp)) processed_time_readable = str((datetime.datetime.now() - startTime_readable)).split('.')[0] - table.add_row([num, queue, card, startTime_readable, processed_time_readable, path]) + if int(card) > 0: + table1.add_row([num, queue, card, startTime_readable, processed_time_readable, path]) + else: + table2.add_row([num, queue, card, startTime_readable, processed_time_readable, path]) os.system('clear') - print table - time.sleep(1) + print table1 + print table2 + time.sleep(5)