2.15.0-Beta3 - Many Bug Fixes

- Fixed log file path not being recognized with quotes around it #571
- Fixed crash when unable to encode certain unicode characters #568
- Fixed crash when writing JSON log #563
- Improve Filters #556
- Update default included spam lists
- Change default log format from rtf to plaintext
This commit is contained in:
ThioJoe
2022-02-05 14:45:29 -07:00
parent f42e365a49
commit 4c3943296d
7 changed files with 37 additions and 12 deletions

View File

@@ -851,6 +851,7 @@ def parse_comment_list(config, recovery=False, removal=False, returnFileName=Fal
if str(listFileName).lower() == "x":
return "MainMenu", None
listFileName = listFileName.strip("\"").strip("'") # Remove quotes, if added by dragging and dropping or pasting path
if len(listFileName) > 0:
if os.path.exists(listFileName):
pass

View File

@@ -4,6 +4,7 @@ from Scripts.shared_imports import *
import Scripts.utils as utils
import Scripts.auth as auth
from Scripts.utils import choice
from unicodedata import category as unicode_category
import rtfunicode
import os
@@ -287,7 +288,14 @@ def print_prepared_comments(current, commentsContents, scanVideoID, comments, j,
# Takes in a string that contains unicode, and returns a string with properly escaped unicode format for use in rtf files
# Uses 'rtfunicode' module to encode with proper rtf-compatible unicode escapes, then decode back to utf-8 so it can be written to file and read by wordpad or whatever
def make_rtf_compatible(text):
return text.encode('rtfunicode').decode('utf-8')
try:
return text.encode('rtfunicode').decode('utf-8')
except:
intermediate = "".join(char for char in text if unicode_category(char) not in ["Mn", "Cc", "Cf", "Cs", "Co", "Cn"])
try:
return intermediate.encode('rtfunicode').decode('utf-8')
except:
return intermediate
# Writes properly to rtf file, also can prepare with necessary header information and formatting settings
def write_rtf(fileName, newText=None, firstWrite=False, fullWrite=False):
@@ -512,7 +520,7 @@ def get_extra_json_data(channelIDs, jsonSettingsDict):
remainder = total % 50
numDivisions = int((total-remainder)/50)
for i in range(numDivisions):
fetch_data(channelIDs[i*50:i*50+50])
fetch_data(channelIDs[i*50:i*50+50])
if remainder > 0:
fetch_data(channelIDs[numDivisions*50:])
else:

View File

@@ -315,7 +315,7 @@ def prepare_filter_mode_smart(scanMode, config, miscData, sensitive=False):
# General Spammer Criteria
#usernameBlackChars = ""
spamGenEmoji_Raw = b'@Sl-~@Sl-};+UQApOJ|0pOJ~;q_yw3kMN(AyyC2e@3@cRnVj&SlB@'
usernameBlackWords_Raw = [b'aA|ICWn^M`', b'aA|ICWn>^?c>', b'Z*CxTWo%_<a$#)', b'c4=WCbY*O1XL4a}', b'Z*CxIZgX^DXL4a}', b'Z*CxIX8', b'V`yb#YanfTAY*7@', b'b7f^9ZFwMLXkh', b'c4>2IbRcbcAY*7@', b'X>N0LVP|q-Z8`', b'Z*CxIZgX^D', b'Z*CxIZgX^DAZK!6Z2', b'c4=WCX>N0LVP|q-Z2', b'b9G`gb9G_', b'b9G`MG$3<zVg', b'Z*CxMc_3qGVE', b'XKx^MZy;@XAY*7@']
usernameBlackWords_Raw = [b'aA|ICWn^M`', b'aA|ICWn>^?c>', b'Z*CxTWo%_<a$#)', b'c4=WCbY*O1XL4a}', b'Z*CxIZgX^DXL4a}', b'Z*CxIX8', b'V`yb#YanfTAY*7@', b'b7f^9ZFwMLXkh', b'c4>2IbRcbcAY*7@', b'X>N0LVP|q-Z8`', b'Z*CxIZgX^D', b'Z*CxIZgX^DAZK!6Z2', b'c4=WCX>N0LVP|q-Z2', b'b9G`gb9G_', b'b9G`MG$3<zVg', b'Z*CxMc_3qGVE', b'XKx^MZy;@XAY*7@', b'X(w$UY-ML@bRcteVq$4-X8', b'W^!d^AZKZ2bN']
usernameNovidBlackWords_Raw = [b'cWHEJATS_yX=D', b'cWHEJAZ~9Uc4=e', b'cWHEJZ*_DaVQzUKc4=e']
usernameObfuBlackWords_Raw = [b'c4Bp7YjX', b'b|7MPV{3B', b'a&KaFcm', b'a&KaFV{3B']
usernameRedWords = ["whatsapp", "telegram"]

View File

@@ -36,7 +36,7 @@
### IMPORTANT: I OFFER NO WARRANTY OR GUARANTEE FOR THIS SCRIPT. USE AT YOUR OWN RISK.
### I tested it on my own and implemented some failsafes as best as I could,
### but there could always be some kind of bug. You should inspect the code yourself.
version = "2.15.0-Beta2"
version = "2.15.0-Beta3"
configVersion = 26
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
@@ -1513,8 +1513,8 @@ def main():
print("\nWriting JSON log file...")
if config['json_extra_data'] == True:
if current.errorOccurred == False:
jsonDataDict = logging.get_extra_json_data(list(combinedCommentDict.keys()), jsonSettingsDict)
logging.write_json_log(jsonSettingsDict, combinedCommentDict.keys(), jsonDataDict)
jsonDataDict = logging.get_extra_json_data(list(current.matchSamplesDict.keys()), jsonSettingsDict)
logging.write_json_log(jsonSettingsDict, combinedCommentDict, jsonDataDict)
else:
print(f"\n{F.LIGHTRED_EX}NOTE:{S.R} Extra JSON data collection disabled due to error during scanning")
else:
@@ -1524,10 +1524,10 @@ def main():
### ---------------- Reporting / Deletion Begin ----------------
if returnToMenu == False:
if proceedWithDeletion == True:
operations.delete_found_comments(list(combinedCommentDict.keys()), banChoice, deletionMode)
operations.delete_found_comments(list(combinedCommentDict), banChoice, deletionMode)
if deletionMode != "reportSpam":
if config['check_deletion_success'] == True:
operations.check_deleted_comments(list(combinedCommentDict.keys()))
operations.check_deleted_comments(list(combinedCommentDict))
elif config['check_deletion_success'] == False:
print("\nSkipped checking if deletion was successful.\n")

View File

@@ -1,5 +1,5 @@
#!! NOTE: THESE ARE SCAM / MALICIOUS DOMAINS - DO NOT VISIT THEM
#version=[2022.1.24]
#version=[2022.2.6]
diva.bond
vbucks22.com
snapgirls.today
@@ -108,3 +108,17 @@ trojanarticle.com
astratech.pro
smarthackerstech.org
universehackworld.org
netpayjob.com
cashend.me
dollarbrite.com
xbritclone.net
247hacks.net
orxhacks.com
everyday.cf
beautygirls.online
younggirls.today
bestdate.top
youtuuu.tokyo
bigbooty.online
vum.ngo
nmnm.lol

View File

@@ -1,6 +1,6 @@
#!! NOTE: ALL OF THESE USERNAMES ARE BELIEVED TO BE USED BY SCAMMERS - DO NOT CONTACT THEM
# ANY NAMES OF PEOPLE ARE PRESUMED TO BE FICTITIOUS OR MISAPPROPRIATED: ANY REFERENCE TO A REAL PERSON IS COMPLETELY COINCIDENTAL AND THE EXISTENCE OF SUCH NAMES IN THIS LIST IS ONLY BECAUSE THOSE NAMES ARE USED IN SPAM COMMENTS, AND NOT TO IMPLY THAT EVERYONE WITH THAT NAME IS MALICIOUS
#version=[2022.1.20]
#version=[2022.2.6]
mr williams charles
mr patrick smith
mr dieter schwartz
@@ -38,3 +38,5 @@ alexandera davis
mrs gladys wood
mrs gladys fx
mr charles r schwab
mr lawrence tom
mr steve miley

View File

@@ -228,8 +228,8 @@ enable_logging = Ask
log_path = logs
# Set whether to create log files as plain text, or Rich Text Format with colors
# Default = rtf | Possible Values: rtf | plaintext
log_mode = rtf
# Default = plaintext | Possible Values: rtf | plaintext
log_mode = plaintext
# Allows you to ALSO create a json version of the logged match data (in addition to normal log file)
# Note: If enable_logging is False, that also disables json logging regardless of this setting