@@ -6,7 +6,7 @@ def main():
66 print ("--- Social Media Analyzer ---" )
77 print ("This tool helps you analyze social media profiles and messages for potential scams." )
88
9- 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" ]
9+ 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" ]
1010
1111 while True :
1212 print ("\n Select the social media platform you want to analyze:" )
@@ -23,39 +23,53 @@ def main():
2323 except ValueError :
2424 print ("Invalid input. Please enter a number." )
2525
26- while True :
27- print (f"\n What do you want to do for { platform .capitalize ()} ?" )
28- print ("1. Analyze a profile for signs of being fake." )
29- print ("2. Analyze a message for phishing or scam attempts." )
26+ if platform == "browser" :
27+ url_to_check = input ("Please enter the URL you want to analyze: " ).strip ()
28+ if url_to_check :
29+ is_susp , reason = scam_detector .is_url_suspicious (url_to_check )
30+ print ("\n --- URL Analysis Results ---" )
31+ if is_susp :
32+ print (f"The URL '{ url_to_check } ' is SUSPICIOUS." )
33+ print (f"Reason: { reason } " )
34+ else :
35+ print (f"The URL '{ url_to_check } ' does not seem suspicious." )
36+ print (f"Details: { reason } " )
37+ else :
38+ print ("No URL entered." )
39+ else :
40+ while True :
41+ print (f"\n What do you want to do for { platform .capitalize ()} ?" )
42+ print ("1. Analyze a profile for signs of being fake." )
43+ print ("2. Analyze a message for phishing or scam attempts." )
3044
31- try :
32- analysis_choice = int (input ("Enter your choice (1-2): " ))
33- if analysis_choice == 1 :
34- profile_url = input (f"Enter the { platform .capitalize ()} profile URL to analyze: " ).strip ()
35- if profile_url :
36- fake_profile_detector .analyze_profile_based_on_user_input (profile_url , platform )
37- else :
38- print ("No profile URL entered." )
39- break
40- elif analysis_choice == 2 :
41- message = input ("Paste the message you want to analyze: " ).strip ()
42- if message :
43- result = scam_detector .analyze_text_for_scams (message , platform )
44- print ("\n --- Scam Analysis Results ---" )
45- print (f"Score: { result ['score' ]} (Higher is more suspicious)" )
46- print ("Indicators Found:" )
47- if result ['indicators_found' ]:
48- for indicator in result ['indicators_found' ]:
49- print (f"- { indicator } " )
45+ try :
46+ analysis_choice = int (input ("Enter your choice (1-2): " ))
47+ if analysis_choice == 1 :
48+ profile_url = input (f"Enter the { platform .capitalize ()} profile URL to analyze: " ).strip ()
49+ if profile_url :
50+ fake_profile_detector .analyze_profile_based_on_user_input (profile_url , platform )
51+ else :
52+ print ("No profile URL entered." )
53+ break
54+ elif analysis_choice == 2 :
55+ message = input ("Paste the message you want to analyze: " ).strip ()
56+ if message :
57+ result = scam_detector .analyze_text_for_scams (message , platform )
58+ print ("\n --- Scam Analysis Results ---" )
59+ print (f"Score: { result ['score' ]} (Higher is more suspicious)" )
60+ print ("Indicators Found:" )
61+ if result ['indicators_found' ]:
62+ for indicator in result ['indicators_found' ]:
63+ print (f"- { indicator } " )
64+ else :
65+ print ("No specific scam indicators were found." )
5066 else :
51- print ("No specific scam indicators were found." )
67+ print ("No message entered." )
68+ break
5269 else :
53- print ("No message entered." )
54- break
55- else :
56- print ("Invalid choice. Please try again." )
57- except ValueError :
58- print ("Invalid input. Please enter a number." )
70+ print ("Invalid choice. Please try again." )
71+ except ValueError :
72+ print ("Invalid input. Please enter a number." )
5973
6074if __name__ == '__main__' :
6175 main ()
0 commit comments