From 210086900fdd5a280faef8e7ec86cb7ad2036677 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 6 Sep 2025 12:36:07 +0000 Subject: [PATCH 1/4] feat: Expand tool to support more platforms This commit expands the social media analyzer tool to support a wider range of platforms, including social media, communication, and e-commerce sites. The following platforms have been added: - Telegram - Twitter - Pinterest - LinkedIn - Line - Discord - Teams - Zoom - Amazon - Alibaba The changes include: - Updating the platform list in `main.py` to make the new platforms selectable. - Adding legitimate domains for the new platforms to `heuristics.py` and updating the suspicious URL patterns. - Providing platform-specific advice for identifying fake profiles or scams on the new platforms in `fake_profile_detector.py`. --- .../__pycache__/__init__.cpython-312.pyc | Bin 135 -> 135 bytes .../__pycache__/heuristics.cpython-312.pyc | Bin 4182 -> 4900 bytes .../__pycache__/scam_detector.cpython-312.pyc | Bin 7178 -> 7178 bytes .../fake_profile_detector.py | 49 ++++++++++++++++++ social_media_analyzer/heuristics.py | 16 ++++-- social_media_analyzer/main.py | 2 +- 6 files changed, 63 insertions(+), 4 deletions(-) diff --git a/social_media_analyzer/__pycache__/__init__.cpython-312.pyc b/social_media_analyzer/__pycache__/__init__.cpython-312.pyc index 4155aeb3607a0d22e5a2f6982298879fd12564bd..7a2ea8085a8c6399a9ed13c06500587ab1d835c8 100644 GIT binary patch delta 19 ZcmZo?Y-i*?&CAQh00eECdnR(%001e;1dadz delta 19 ZcmZo?Y-i*?&CAQh00c7Ec2DH40RSqh1keBg diff --git a/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc b/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc index ea37fce82fb4c55fd74b14d79432fe198eeaa0be..0e14feab3b38432423169216e261b54a23473771 100644 GIT binary patch delta 1292 zcmb_ayKmb@7{8N5JxGy~tXO_Tc4RvbJ9T9zO`0_CwCH4{do?tm^<5Z35^0bOoE(T~ z)l|sfkPID+pj{H6OSU3IJ9i;61ObZ%Ufb!?zo2&~(Lnb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.cpython-312.pyc b/social_media_analyzer/__pycache__/scam_detector.cpython-312.pyc index cfb3a2adfd036115702c52d28c06dcf59b7c23b6..a4fcdd85e2505f43984e451c6ab9d4f3102ad428 100644 GIT binary patch delta 20 acmeCO=(6BG&CAQh00eECdp2_amj(bhCI!F% delta 20 acmeCO=(6BG&CAQh00c7Ec5meVFAV@WNd^J{ diff --git a/social_media_analyzer/fake_profile_detector.py b/social_media_analyzer/fake_profile_detector.py index fc14416..e8dfd32 100644 --- a/social_media_analyzer/fake_profile_detector.py +++ b/social_media_analyzer/fake_profile_detector.py @@ -33,6 +33,55 @@ "Check the 'About' section for inconsistencies or lack of information.", "Look at the age of the account and the history of posts.", "Be suspicious of friend requests from people you don't know, especially if you have no mutual friends." + ], + "telegram": [ + "Be wary of unsolicited messages from users or bots, especially those promoting investments or crypto.", + "Check the username for slight misspellings of official channels or known contacts.", + "Never share personal codes or login information with anyone on Telegram." + ], + "twitter": [ + "Look for newly created accounts with very few tweets but high follower counts (often bots).", + "Be suspicious of accounts that primarily tweet suspicious links or participate in crypto scams.", + "Check the bio and tweets for poor grammar or generic content." + ], + "pinterest": [ + "Be cautious of pins that lead to suspicious websites unrelated to the pin's content.", + "Look for profiles with very few boards or pins but a high number of followers.", + "Be wary of accounts that leave spammy comments with links." + ], + "linkedin": [ + "Be suspicious of profiles with generic job titles and descriptions.", + "Check for inconsistencies in work history or education.", + "Be wary of connection requests from individuals with no mutual connections or a sparse profile." + ], + "line": [ + "Be cautious of messages from unknown accounts, especially those with links or QR codes.", + "Scammers may impersonate official accounts; check for the green shield icon for verified accounts.", + ], + "discord": [ + "Be wary of direct messages from users you don't share a server with.", + "Never click on suspicious links or download files from unknown users.", + "Be cautious of friend requests from users with no mutual friends or servers in common." + ], + "teams": [ + "Be wary of messages from external accounts you don't recognize.", + "Do not share sensitive company information with unverified contacts.", + "Report any suspicious activity to your IT department." + ], + "zoom": [ + "Be cautious of unexpected meeting invitations or links.", + "Ensure the meeting host is someone you know and trust.", + "Do not share personal information in public chat during a meeting." + ], + "amazon": [ + "Be wary of seller profiles with little to no feedback or very new accounts.", + "Check product reviews for signs of being fake or paid.", + "Be suspicious of sellers who ask you to complete a transaction outside of Amazon's official platform." + ], + "alibaba": [ + "Verify the seller's credentials, such as their 'Gold Supplier' status and business license.", + "Be cautious of prices that are significantly lower than the market average.", + "Use Alibaba's Trade Assurance for secure payments and to protect against fraud." ] } diff --git a/social_media_analyzer/heuristics.py b/social_media_analyzer/heuristics.py index 13d0218..23cd78b 100644 --- a/social_media_analyzer/heuristics.py +++ b/social_media_analyzer/heuristics.py @@ -11,7 +11,17 @@ "tinder": ["tinder.com", "gotinder.com"], "snapchat": ["snapchat.com"], "wechat": ["wechat.com"], - "general": ["google.com", "twitter.com", "linkedin.com"] # Other common safe domains + "telegram": ["telegram.org", "t.me"], + "twitter": ["twitter.com", "x.com"], + "pinterest": ["pinterest.com"], + "linkedin": ["linkedin.com"], + "line": ["line.me"], + "discord": ["discord.com", "discord.gg"], + "teams": ["teams.microsoft.com", "microsoft.com"], + "zoom": ["zoom.us"], + "amazon": ["amazon.com"], + "alibaba": ["alibaba.com"], + "general": ["google.com"] } @@ -100,8 +110,8 @@ # These patterns aim to catch URLs that impersonate legitimate domains. SUSPICIOUS_URL_PATTERNS = [ # Impersonation using subdomains or hyphens - r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat)\.com\.[a-z0-9\-]+\.[a-z]+", - r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat)-[a-z0-9\-]+\.[a-z]+", + r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba)\.com\.[a-z0-9\-]+\.[a-z]+", + r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba)-[a-z0-9\-]+\.[a-z]+", # Common URL shorteners r"https?://bit\.ly", r"https?://goo\.gl", diff --git a/social_media_analyzer/main.py b/social_media_analyzer/main.py index b036030..18cc783 100644 --- a/social_media_analyzer/main.py +++ b/social_media_analyzer/main.py @@ -6,7 +6,7 @@ def main(): print("--- Social Media Analyzer ---") print("This tool helps you analyze social media profiles and messages for potential scams.") - platforms = ["facebook", "instagram", "whatsapp", "tiktok", "tinder", "snapchat", "wechat"] + platforms = ["facebook", "instagram", "whatsapp", "tiktok", "tinder", "snapchat", "wechat", "telegram", "twitter", "pinterest", "linkedin", "line", "discord", "teams", "zoom", "amazon", "alibaba"] while True: print("\nSelect the social media platform you want to analyze:") From 1417aee091111deead6a3774b50dcdd73fd694fc Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 6 Sep 2025 12:46:32 +0000 Subject: [PATCH 2/4] feat: Add support for more platforms and email analysis This commit further expands the social media analyzer tool to support a wider range of platforms and introduces email analysis capabilities. The following platforms have been added: - YouTube - Skype - VK - Reddit - Email The changes include: - Updating the platform list in `main.py` to make the new platforms and email analysis selectable. - Adding legitimate domains for the new platforms to `heuristics.py` and updating the suspicious URL patterns. - Providing platform-specific advice for the new platforms in `fake_profile_detector.py`. - Adding specific advice for analyzing emails, focusing on sender details and content. --- .../__pycache__/heuristics.cpython-312.pyc | Bin 4900 -> 5105 bytes .../fake_profile_detector.py | 26 ++++++++++++++++++ social_media_analyzer/heuristics.py | 9 ++++-- social_media_analyzer/main.py | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc b/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc index 0e14feab3b38432423169216e261b54a23473771..ab862b9ec9b7ec219aa8f71cb9c5aaade567b23a 100644 GIT binary patch delta 808 zcmZ{g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a7(!}`Vt!@ux#a2x=)o@(qrt5 pCxOfUJYhK*XM!&$`}wG?D@<3I?CAa3RU!q2KMS$&PtA4uv46;mnqdF{ diff --git a/social_media_analyzer/fake_profile_detector.py b/social_media_analyzer/fake_profile_detector.py index e8dfd32..1e3141b 100644 --- a/social_media_analyzer/fake_profile_detector.py +++ b/social_media_analyzer/fake_profile_detector.py @@ -82,6 +82,32 @@ "Verify the seller's credentials, such as their 'Gold Supplier' status and business license.", "Be cautious of prices that are significantly lower than the market average.", "Use Alibaba's Trade Assurance for secure payments and to protect against fraud." + ], + "youtube": [ + "Be wary of comments with suspicious links, especially on popular videos.", + "Check the 'About' page of a channel for contact information and creation date.", + "Look for channels with high subscriber counts but low video views or engagement." + ], + "skype": [ + "Be cautious of contact requests from people you don't know.", + "Never send money or share personal information with unknown contacts.", + "Scammers may impersonate Microsoft or Skype support to gain access to your account." + ], + "vk": [ + "Be suspicious of profiles with very little personal information or photos.", + "Check for a large number of 'friends' but low engagement on posts.", + "Be wary of messages with links to third-party sites, especially for games or prizes." + ], + "reddit": [ + "Check a user's post and comment history for signs of spam or bot-like activity.", + "Be cautious of unsolicited private messages with investment opportunities or suspicious links.", + "Look at the age of the Reddit account (cake day) and their karma score." + ], + "email": [ + "Carefully examine the sender's email address for any misspellings or unusual domains.", + "Be suspicious of emails that create a sense of urgency or pressure.", + "Never click on links or download attachments from unsolicited or unexpected emails.", + "Check for generic greetings like 'Dear Customer' instead of your name." ] } diff --git a/social_media_analyzer/heuristics.py b/social_media_analyzer/heuristics.py index 23cd78b..a1b8830 100644 --- a/social_media_analyzer/heuristics.py +++ b/social_media_analyzer/heuristics.py @@ -21,6 +21,11 @@ "zoom": ["zoom.us"], "amazon": ["amazon.com"], "alibaba": ["alibaba.com"], + "youtube": ["youtube.com", "youtu.be"], + "skype": ["skype.com"], + "vk": ["vk.com"], + "reddit": ["reddit.com", "old.reddit.com"], + "email": [], "general": ["google.com"] } @@ -110,8 +115,8 @@ # These patterns aim to catch URLs that impersonate legitimate domains. SUSPICIOUS_URL_PATTERNS = [ # Impersonation using subdomains or hyphens - r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba)\.com\.[a-z0-9\-]+\.[a-z]+", - r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba)-[a-z0-9\-]+\.[a-z]+", + r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba|youtube|skype|vk|reddit)\.com\.[a-z0-9\-]+\.[a-z]+", + r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba|youtube|skype|vk|reddit)-[a-z0-9\-]+\.[a-z]+", # Common URL shorteners r"https?://bit\.ly", r"https?://goo\.gl", diff --git a/social_media_analyzer/main.py b/social_media_analyzer/main.py index 18cc783..8dfc7ae 100644 --- a/social_media_analyzer/main.py +++ b/social_media_analyzer/main.py @@ -6,7 +6,7 @@ def main(): print("--- Social Media Analyzer ---") print("This tool helps you analyze social media profiles and messages for potential scams.") - platforms = ["facebook", "instagram", "whatsapp", "tiktok", "tinder", "snapchat", "wechat", "telegram", "twitter", "pinterest", "linkedin", "line", "discord", "teams", "zoom", "amazon", "alibaba"] + platforms = ["facebook", "instagram", "whatsapp", "tiktok", "tinder", "snapchat", "wechat", "telegram", "twitter", "pinterest", "linkedin", "line", "discord", "teams", "zoom", "amazon", "alibaba", "youtube", "skype", "vk", "reddit", "email"] while True: print("\nSelect the social media platform you want to analyze:") From 17543d47b1efac5cb46508f30c34afc59deb6be7 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 6 Sep 2025 12:56:05 +0000 Subject: [PATCH 3/4] feat: Add support for more platforms and enhance scam detection This commit expands the social media analyzer tool to support a wider range of platforms and enhances scam detection capabilities. The following platforms have been added: - Viber - Signal - Badoo - Binance The changes include: - Updating the platform list in `main.py`. - Adding legitimate domains and updating suspicious URL patterns in `heuristics.py`. - Adding platform-specific advice for the new platforms in `fake_profile_detector.py`. - Enhancing email analysis advice with Gmail-specific tips. - Adding Forex-related keywords to the scam detection engine to improve its effectiveness against financial scams. --- .../__pycache__/heuristics.cpython-312.pyc | Bin 5105 -> 5383 bytes .../fake_profile_detector.py | 23 +++++++++++++++++- social_media_analyzer/heuristics.py | 12 ++++++--- social_media_analyzer/main.py | 2 +- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc b/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc index ab862b9ec9b7ec219aa8f71cb9c5aaade567b23a..bc2a3ec9d76a3fdcf358bee39c7487f8832a014f 100644 GIT binary patch delta 897 zcmah`O-vI(6rS03Te|K3v|uTA!G&s|2EizZ0{$WRhs3MYh}m|QwUKtoQWVz49^H#c z$zC{cASRx?*{hyRjER?xr)Kq_R}+)5UOX9Rw$!Vey!XBDoAF|Ji=$f|Hw4>o8)lapJR5AZ^5v&Z^IFMMEXJPE#L zpwbu%FTt9}t{SGcWpS%pO2t%Bv8-EheN#2naz)dSvThoy#fl{yoGI;*R@8SXrja)) z9#_&TDs9kAFHovX&@^eq3dZ_&XQmfiS4*XA*y53q=Q1ra~8BdAn+tafC9?XS*w|Fp8s8i241lq+p&> zq0=qOHA1EKw4^JI;5a=`09L5;yN_LQ7H<6LzE`}jq9Z}1=y&)Y%k(I z$_}^9RaYFvX)4Hojk!W*|Gvvl;(n?ObPPviN|nw!gOm;Ve!GSA0Q>5DkiPk&}^^ihpCA!iCdt1qfLQrm{oMYV|g3ILR{sm^@75xAJ delta 622 zcmX|-%WD%+6vpqFN76jzku*-GHmPY-OkoiegGD;RAveupGr>S0KVQ!2NS#h?V4Hn@lI#7Fesaj?+ zZo~)uRL?PmOEu`$%nnL@IL)B?3`_8OlE`XT*?Ug40vqK Date: Sat, 6 Sep 2025 13:09:51 +0000 Subject: [PATCH 4/4] feat: Add ShareChat support and browser URL analysis This commit adds support for the ShareChat platform and introduces a new "Browser" option for direct URL analysis. The changes include: - Adding "sharechat" and "browser" to the platform list in `main.py`. - Implementing a special workflow for the "browser" option to allow users to analyze a URL directly. - Adding legitimate domains and platform-specific advice for ShareChat. - Updating the suspicious URL patterns to include ShareChat. This work is in response to user requests to add more platforms and to interpret the request for browser integration as a feature for URL analysis. --- .../__pycache__/heuristics.cpython-312.pyc | Bin 5383 -> 5439 bytes .../fake_profile_detector.py | 5 ++ social_media_analyzer/heuristics.py | 5 +- social_media_analyzer/main.py | 76 +++++++++++------- 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc b/social_media_analyzer/__pycache__/heuristics.cpython-312.pyc index bc2a3ec9d76a3fdcf358bee39c7487f8832a014f..e3803edc7a7ba9a389f02346fc8358f903684937 100644 GIT binary patch delta 665 zcmYL_&ubGw6vyXnc5AcA{zw{AquJUfLYg*dqo8fHD%v(`YxV4!Dxnh-P#b6kX$a=% z9wRH*Lk>akB%XQ|`~$oUdPxzX;?2`g4_*{}lelqU=R2S8`@Xk3`+VxdRO+LqsRY-- z>G#!GjF9gFyrum+{QUhQ_4!-{=v+JS25hJhI{zAM2{n)ELp_fwqh3H&P!~{#P%pX} zu;7xr0!g^+Zi3~$1HbzcV#bxX&>v5)wk130<{)-^(erE#dzWyAPM2wcUZdCXS*AB| zFW|mHSK9&GD4X==!%0H6{1PdL=$h9JWCwO2eQWQO^gxPh+tt!md81l-GP6;8Tvsc# zTIEq$oYMjKmAt6>2Z6nP`OGl4~_&ZW6K-#I0uKU_-N3`wd&OC=P33J97~pg+t#Bp7fA5m%r(aH&zcA(y9G_3_ zKG+)}gvBhp)@u=69U85J8iO+8c;0)U&7=)N`md>UmU(dI5C+bwSQS5iZJg zDA7ykx$+Z?!eyDjq*CkwUh?_fZ z6g0S4c~~LjY1Sf*oLEiMKsI3$s%zbfb>Cu6v(;)oYMi>)dR%qnJA1KvXrCU01L^TG zS!W-l=ZEkorLG(N&a`i18>W?K^A;gG0{}lrRy$$A`fmGQ`I^q)_NN^rvz-N%o6{6g z4-gt8HR{TU~4LLp9zN7pZ?Ha@D)hj-snL$6T4#GAf@84EXyrOgF ze27p#VcXADP}WC{ktdWVvnn^Gj~Oidzi!yz2%&Dg5wGY`Lu38$mI`L{abtvpdde?# y?kaXh7mYKX22O+qC(?E%4Ndj(aa)%{8RTm|591g6H9S#dXumF_{GPpm|MeI80-Z7d diff --git a/social_media_analyzer/fake_profile_detector.py b/social_media_analyzer/fake_profile_detector.py index f44188e..ef737a0 100644 --- a/social_media_analyzer/fake_profile_detector.py +++ b/social_media_analyzer/fake_profile_detector.py @@ -129,6 +129,11 @@ "Be suspicious of anyone asking for your API keys, passwords, or 2FA codes.", "Double-check the domain name of the Binance website before logging in (binance.com).", "Binance support will never ask you to send them cryptocurrency." + ], + "sharechat": [ + "Be wary of profiles that post a large amount of spam or promotional content.", + "Check for the 'verified' badge on profiles of public figures.", + "Do not engage with users who ask for personal information or money in private chat." ] } diff --git a/social_media_analyzer/heuristics.py b/social_media_analyzer/heuristics.py index a324bb1..16191c2 100644 --- a/social_media_analyzer/heuristics.py +++ b/social_media_analyzer/heuristics.py @@ -30,6 +30,7 @@ "signal": ["signal.org"], "badoo": ["badoo.com"], "binance": ["binance.com"], + "sharechat": ["sharechat.com"], "general": ["google.com"] } @@ -121,8 +122,8 @@ # These patterns aim to catch URLs that impersonate legitimate domains. SUSPICIOUS_URL_PATTERNS = [ # Impersonation using subdomains or hyphens - r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba|youtube|skype|vk|reddit|viber|signal|badoo|binance)\.com\.[a-z0-9\-]+\.[a-z]+", - r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba|youtube|skype|vk|reddit|viber|signal|badoo|binance)-[a-z0-9\-]+\.[a-z]+", + r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba|youtube|skype|vk|reddit|viber|signal|badoo|binance|sharechat)\.com\.[a-z0-9\-]+\.[a-z]+", + r"https?://(?:[a-z0-9\-]+\.)*(?:facebook|fb|instagram|whatsapp|tiktok|tinder|snapchat|wechat|telegram|twitter|pinterest|linkedin|line|discord|teams|zoom|amazon|alibaba|youtube|skype|vk|reddit|viber|signal|badoo|binance|sharechat)-[a-z0-9\-]+\.[a-z]+", # Common URL shorteners r"https?://bit\.ly", r"https?://goo\.gl", diff --git a/social_media_analyzer/main.py b/social_media_analyzer/main.py index 02932ed..e21d01b 100644 --- a/social_media_analyzer/main.py +++ b/social_media_analyzer/main.py @@ -6,7 +6,7 @@ def main(): print("--- Social Media Analyzer ---") print("This tool helps you analyze social media profiles and messages for potential scams.") - platforms = ["facebook", "instagram", "whatsapp", "tiktok", "tinder", "snapchat", "wechat", "telegram", "twitter", "pinterest", "linkedin", "line", "discord", "teams", "zoom", "amazon", "alibaba", "youtube", "skype", "vk", "reddit", "email", "viber", "signal", "badoo", "binance"] + platforms = ["facebook", "instagram", "whatsapp", "tiktok", "tinder", "snapchat", "wechat", "telegram", "twitter", "pinterest", "linkedin", "line", "discord", "teams", "zoom", "amazon", "alibaba", "youtube", "skype", "vk", "reddit", "email", "viber", "signal", "badoo", "binance", "sharechat", "browser"] while True: print("\nSelect the social media platform you want to analyze:") @@ -23,39 +23,53 @@ def main(): except ValueError: print("Invalid input. Please enter a number.") - while True: - print(f"\nWhat do you want to do for {platform.capitalize()}?") - print("1. Analyze a profile for signs of being fake.") - print("2. Analyze a message for phishing or scam attempts.") + if platform == "browser": + url_to_check = input("Please enter the URL you want to analyze: ").strip() + if url_to_check: + is_susp, reason = scam_detector.is_url_suspicious(url_to_check) + print("\n--- URL Analysis Results ---") + if is_susp: + print(f"The URL '{url_to_check}' is SUSPICIOUS.") + print(f"Reason: {reason}") + else: + print(f"The URL '{url_to_check}' does not seem suspicious.") + print(f"Details: {reason}") + else: + print("No URL entered.") + else: + while True: + print(f"\nWhat do you want to do for {platform.capitalize()}?") + print("1. Analyze a profile for signs of being fake.") + print("2. Analyze a message for phishing or scam attempts.") - try: - analysis_choice = int(input("Enter your choice (1-2): ")) - if analysis_choice == 1: - profile_url = input(f"Enter the {platform.capitalize()} profile URL to analyze: ").strip() - if profile_url: - fake_profile_detector.analyze_profile_based_on_user_input(profile_url, platform) - else: - print("No profile URL entered.") - break - elif analysis_choice == 2: - message = input("Paste the message you want to analyze: ").strip() - if message: - result = scam_detector.analyze_text_for_scams(message, platform) - print("\n--- Scam Analysis Results ---") - print(f"Score: {result['score']} (Higher is more suspicious)") - print("Indicators Found:") - if result['indicators_found']: - for indicator in result['indicators_found']: - print(f"- {indicator}") + try: + analysis_choice = int(input("Enter your choice (1-2): ")) + if analysis_choice == 1: + profile_url = input(f"Enter the {platform.capitalize()} profile URL to analyze: ").strip() + if profile_url: + fake_profile_detector.analyze_profile_based_on_user_input(profile_url, platform) + else: + print("No profile URL entered.") + break + elif analysis_choice == 2: + message = input("Paste the message you want to analyze: ").strip() + if message: + result = scam_detector.analyze_text_for_scams(message, platform) + print("\n--- Scam Analysis Results ---") + print(f"Score: {result['score']} (Higher is more suspicious)") + print("Indicators Found:") + if result['indicators_found']: + for indicator in result['indicators_found']: + print(f"- {indicator}") + else: + print("No specific scam indicators were found.") else: - print("No specific scam indicators were found.") + print("No message entered.") + break else: - print("No message entered.") - break - else: - print("Invalid choice. Please try again.") - except ValueError: - print("Invalid input. Please enter a number.") + print("Invalid choice. Please try again.") + except ValueError: + print("Invalid input. Please enter a number.") if __name__ == '__main__': main()