You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Initial setup for social_platform and openpage app
Initializes the Django project `social_platform` and the core app `openpage`.
Features included:
- `openpage` app for creating posts with AI-generated images.
- `Post` model with fields for user, prompt, AI-generated image, caption, and timestamps.
- Integration with OpenAI's DALL-E API for image generation (via `openpage.services.generate_image_from_prompt`).
- Django Forms (`PostForm`) for post creation.
- Views for creating, listing, and detailing posts (`create_post_view`, `post_list_view`, `post_detail_view`).
- Basic HTML templates for these views, extending a common `base.html`.
- URL configurations for the app and project, including media file serving in development.
- Django admin interface for `Post` model with customizations for display and filtering.
- Basic user authentication relies on Django admin login/logout.
- Comprehensive unit and integration tests for models, services (mocking external API), views, and forms.
- `social_platform_requirements.txt` for project dependencies (Django, Pillow, openai, requests).
- Configuration for `MEDIA_ROOT`, `MEDIA_URL`, `LOGIN_URL`, and placeholder for `OPENAI_API_KEY` (loaded from environment).
Copy file name to clipboardExpand all lines: facebook_analyzer/fake_profile_detector.py
+77-38Lines changed: 77 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -13,77 +13,80 @@
13
13
"prompt": "Is the profile picture generic, a stock photo, an illustration, or of a celebrity (i.e., not a clear photo of a unique, real person)?",
14
14
"type": "yes_no",
15
15
"weight_if_yes": 2,
16
-
"details_if_yes": "Generic or stolen profile pictures are common for fake accounts."
16
+
"details_if_yes": "Generic or stolen profile pictures are common for fake accounts.",
17
17
},
18
18
{
19
19
"id": "profile_picture_reverse_search",
20
20
"prompt": "Have you tried a reverse image search (e.g., Google Images, TinEye) on the profile picture? If so, did it show the image is widely used, a stock photo, or belongs to someone else?",
21
21
"type": "yes_no",
22
22
"weight_if_yes": 3,
23
-
"details_if_yes": "Reverse image search can often quickly identify stolen or common stock photos."
23
+
"details_if_yes": "Reverse image search can often quickly identify stolen or common stock photos.",
24
24
},
25
25
{
26
26
"id": "account_age_very_new",
27
27
"prompt": "Does the profile seem very new with little history (e.g., join date is recent, few old posts)? (Requires manual check on the profile)",
28
28
"type": "yes_no",
29
29
"weight_if_yes": 1,
30
-
"details_if_yes": "While not definitive, many fake accounts are newly created."
30
+
"details_if_yes": "While not definitive, many fake accounts are newly created.",
31
31
},
32
32
{
33
33
"id": "few_posts_or_activity",
34
34
"prompt": "Does the profile have very few posts, photos, or other activity over its lifespan? (Requires manual check)",
35
35
"type": "yes_no",
36
36
"weight_if_yes": 1,
37
-
"details_if_yes": "Lack of genuine activity can be a sign."
37
+
"details_if_yes": "Lack of genuine activity can be a sign.",
38
38
},
39
39
{
40
40
"id": "generic_or_copied_posts",
41
41
"prompt": "Are the posts (if any) generic, nonsensical, repetitive, or seem copied from other sources? (Requires manual check)",
42
42
"type": "yes_no",
43
43
"weight_if_yes": 2,
44
-
"details_if_yes": "Content that isn't original or personal is suspicious."
44
+
"details_if_yes": "Content that isn't original or personal is suspicious.",
45
45
},
46
46
{
47
47
"id": "friend_count_mismatch",
48
48
"prompt": "Does the profile have a very high number of friends but very little engagement (likes/comments) on their posts, or an unusually low number of friends for a long-standing account? (Requires manual check)",
49
49
"type": "yes_no",
50
50
"weight_if_yes": 1,
51
-
"details_if_yes": "Unusual friend counts or activity ratios can be indicators."
51
+
"details_if_yes": "Unusual friend counts or activity ratios can be indicators.",
52
52
},
53
53
{
54
54
"id": "poor_grammar_spelling",
55
55
"prompt": "Is the language used in the profile's 'About' section or posts consistently poor in grammar or spelling (beyond typical typos)? (Requires manual check)",
56
56
"type": "yes_no",
57
57
"weight_if_yes": 1,
58
-
"details_if_yes": "Often, hastily created fake profiles have noticeable language issues."
58
+
"details_if_yes": "Often, hastily created fake profiles have noticeable language issues.",
59
59
},
60
60
{
61
61
"id": "about_section_sparse_or_inconsistent",
62
62
"prompt": "Is the 'About' section very sparse, missing key information (like education, work), or contains information that seems inconsistent or overly glamorous/fake? (Requires manual check)",
63
63
"type": "yes_no",
64
64
"weight_if_yes": 2,
65
-
"details_if_yes": "Incomplete or suspicious 'About' information is a red flag."
65
+
"details_if_yes": "Incomplete or suspicious 'About' information is a red flag.",
66
66
},
67
67
{
68
68
"id": "mutual_friends_suspicious",
69
69
"prompt": "If you have mutual friends, do those mutual connections seem legitimate or are they also suspicious-looking profiles?",
70
70
"type": "yes_no",
71
71
"weight_if_yes": 1,
72
-
"details_if_yes": "Fake accounts often connect with other fake accounts."
72
+
"details_if_yes": "Fake accounts often connect with other fake accounts.",
73
73
},
74
74
{
75
75
"id": "pressure_or_strange_requests",
76
76
"prompt": "Has this profile sent you messages that pressure you for information, money, or to click suspicious links shortly after connecting?",
77
77
"type": "yes_no",
78
78
"weight_if_yes": 3,
79
-
"details_if_yes": "This is a strong indicator of a malicious fake account."
80
-
}
79
+
"details_if_yes": "This is a strong indicator of a malicious fake account.",
80
+
},
81
81
]
82
82
83
+
83
84
defguide_reverse_image_search(image_url=None):
84
85
"""Opens browser tabs to guide the user through reverse image search."""
85
86
print("\n--- Guiding Reverse Image Search ---")
86
-
print("You can use services like Google Images or TinEye to check if a profile picture is used elsewhere.")
87
+
print(
88
+
"You can use services like Google Images or TinEye to check if a profile picture is used elsewhere."
89
+
)
87
90
ifimage_url:
88
91
print(f"If you have a direct URL for the image: {image_url}")
0 commit comments