A friend was given an assignment to detect and assess the level of propaganda in various media, such as social media posts and news articles. The professor provided a list of open-source intelligence (OSINT) tools, but many were outdated, no longer functional, or simply not up to the task.
This project was created to provide a modern and effective solution. Instead of relying on a collection of disparate tools, this analyzer offers a streamlined workflow to gather, process, and analyze content for potential propaganda.
This tool is an article analyzer designed to:
- Fetch Articles: Gather articles from various sources based on a specific subject.
- Tokenize Content: Process and break down the text of the collected articles into a structured format.
- AI-Powered Assessment: Feed the tokenized content to an AI model to assess the propaganda level across the entire corpus of articles.
The goal is to provide a more holistic and data-driven perspective on how a particular subject is being portrayed in the media.
-
Clone the repository:
git clone https://github.com/SamSyntax/go-osint cd go-osint -
Build the application:
make build
-
Create a
.envfile:cp .env.example .env
-
Edit the
.envfile: Open the.envfile and add your API keys:NEWS_API_KEY="your_news_api_key" HUGGINGFACE_API_KEY="your_huggingface_api_key"
There are two main ways to use the application:
This command will fetch articles about "Syrian War", save them to osint.json, and then analyze them for propaganda. The results will be saved in labeled_articles.json and a summary report will be generated in summary.md.
make runYou can also specify a different query:
./bin/osint -query="your query"If you already have a JSON file with articles (in the same format as osint.json), you can analyze it directly:
./bin/osint -input="path/to/your/articles.json"If you only want to scrape the content of the articles without performing any analysis, use the -onlyScrape flag. The scraped content will be saved to scrape.json.
./bin/osint -onlyScrapeYou can specify a different output file:
./bin/osint -onlyScrape -o="path/to/your/scraped_articles.json"-newsApiKey: API key for News API. Can also be set via theNEWS_API_KEYenvironment variable.-query: The query to search for articles. Defaults to "Syrian War".-hgfApiKey: API key for Hugging Face API. Can also be set via theHUGGINGFACE_API_KEYenvironment variable.-onlyScrape: If set, only scrapes articles without calling any APIs. Defaults tofalse.-o: Path to save scraped articles. Defaults to./scrape.json.-input: Path to an input JSON file with articles. Defaults to./osint.json.
This tool uses AI to assess content, and its analysis should be considered a starting point for further investigation, not a definitive judgment. The "propaganda level" is a complex and subjective metric, and the AI's assessment is based on the patterns it has learned from its training data. Always use critical thinking and cross-reference with multiple sources. In short, don't be a dum dum, thanks.