Widespread adoption of social media among the younger generation has created an environment where users share a large amount of their life online.
This often leads users to inadvertently share personal data that can be used by threat actors for nefarious means, such as financial fraud.
Social Spiders is an accessible web application that uses social media APIs to gather a users posts, and a NLP model to demonstrate where this data has been included in the users posts.
We started the frontend dev cycle by making a prototype of the website on figma: link
To set up Social Spiders on Linux:
- Install
apache2,PHP 8.1and all other web dependencies. - Run:
sudo apt find / -name "libphp*" - Move the
libphpX.X.sofile tousr/lib/apache2/modules/ - Edit
httpd.confby adding:<FilesMatch \.php$> SetHandler application/x-http-php </FilesMatch>
- Restart apache (in the terminal run
services restart httpd) - From the project root, install PHP dependencies with
composer install - Deploy the app files and Composer
vendor/directory into/var/www/html/ - Navigate to http://127.0.0.1/ to confirm the web server is running and serving the correct services
To set up Social Spiders on macOS using Homebrew (open your mac terminal or the VSCode built in terminal):
-
Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
Install Apache
httpdandPHP 8.1:brew install httpd php@8.1
-
Start the services:
brew services start httpd brew services start php@8.1
-
Configure Apache for PHP:
-
STEP 1: In your mac terminal run
nano /opt/homebrew/etc/httpd/httpd.conf. This will openhttpd.confand allow you to edit it. -
STEP 2: Use
ctrl+Wto search forLoadModule. Make sure the following are enabled by removing the#which is commenting them out:LoadModule proxy_module lib/httpd/modules/mod_proxy.soLoadModule proxy_fcgi_module lib/httpd/modules/mod_proxy_fcgi.so
-
STEP 3: Right after the last
LoadModuleline add the following:<FilesMatch \.php$> SetHandler "proxy:fcgi://127.0.0.1:9000" </FilesMatch>
-
STEP 4: Restart apache with command
brew services restart httpd
-
-
After saving, test the config:
httpd -t
-
From the project root, install PHP dependencies:
composer install
Or
composer update
-
Deploy the app files and Composer
vendor/directory toDocumentRoot:cp -r src/* /opt/homebrew/var/www/ cp -r vendor /opt/homebrew/var/www/ -
Test the setup by either:
- Opening the browser on
http://127.0.0.1:8080/ - Create
info.phpinDocumentRootwith<?php phpinfo(); ?>and visit it to verify PHP is running the server
- Opening the browser on
If you get this error:
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.Make sure you are not already running httpd, try any of the following:
- Stop and restart:
brew services stop httpd
brew services stop --all
brew services run httpd
brew services restart httpd- Clean files:
rm -f /opt/homebrew/var/run/httpd*.pid- pip install gliner
- httpd (apache2)
- php >=8.1
- php-curl (included in php@8.1)
- libapache2-mod-php
Abraham/TwitterOAuthEspresso-dev/instagram-basic-display-phpviktorruskai/facebook-graph-sdk
$ python3 -m venv venv
$ pip install gliner transformersOriginal git env: link