A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
feat: new types + new icon
dextmorgn55090edb40ef
diff --git a/flowsint-api/app/api/routes/types.py b/flowsint-api/app/api/routes/types.pyindex 402db7fd..478fe0b3 100644--- a/flowsint-api/app/api/routes/types.py+++ b/flowsint-api/app/api/routes/types.py@@ -15,6 +15,26 @@ from app.types.website import Websitefrom app.types.individual import Individualfrom app.types.phone import Phonefrom app.types.leak import Leak+# New types imports+from app.types.username import Username+from app.types.alias import Alias+from app.types.affiliation import Affiliation+from app.types.credential import Credential+from app.types.session import Session+from app.types.dns_record import DNSRecord+from app.types.ssl_certificate import SSLCertificate+from app.types.device import Device+from app.types.document import Document+from app.types.file import File+from app.types.message import Message+from app.types.malware import Malware+from app.types.weapon import Weapon+from app.types.bank_account import BankAccount+from app.types.credit_card import CreditCard+from app.types.web_tracker import WebTracker+from app.types.script import Script+from app.types.reputation_score import ReputationScore+from app.types.risk_profile import RiskProfilerouter = APIRouter()@@ -33,6 +53,9 @@ async def get_types_list():extract_input_schema(Individual, label_key="full_name"),extract_input_schema(SocialProfile, label_key="username", icon="username"),extract_input_schema(Organization, label_key="name"),+ extract_input_schema(Username, label_key="username", icon="username"),+ extract_input_schema(Alias, label_key="alias", icon="alias"),+ extract_input_schema(Affiliation, label_key="organization", icon="affiliation"),],},{@@ -57,6 +80,7 @@ async def get_types_list():extract_input_schema(Phone, label_key="number"),extract_input_schema(Email, label_key="email"),extract_input_schema(SocialProfile, label_key="username", icon="username"),+ extract_input_schema(Message, label_key="content", icon="message"),],},{@@ -72,6 +96,51 @@ async def get_types_list():extract_input_schema(Domain, label_key="domain"),extract_input_schema(Website, label_key="url"),extract_input_schema(Ip, label_key="address"),+ extract_input_schema(DNSRecord, label_key="name", icon="dns"),+ extract_input_schema(SSLCertificate, label_key="subject", icon="ssl"),+ extract_input_schema(WebTracker, label_key="name", icon="webtracker"),+ ],+ },+ {+ "id": uuid4(),+ "type": "security_category",+ "key": "security",+ "icon": "shield",+ "label": "Security & Access",+ "fields": [],+ "children": [+ extract_input_schema(Credential, label_key="username", icon="credential"),+ extract_input_schema(Session, label_key="session_id", icon="session"),+ extract_input_schema(Device, label_key="device_id", icon="device"),+ extract_input_schema(Malware, label_key="name", icon="malware"),+ extract_input_schema(Weapon, label_key="name", icon="weapon"),+ extract_input_schema(Script, label_key="name", icon="script"),+ extract_input_schema(ReputationScore, label_key="entity_id", icon="reputation"),+ extract_input_schema(RiskProfile, label_key="entity_id", icon="risk"),+ ],+ },+ {+ "id": uuid4(),+ "type": "files_category",+ "key": "files",+ "icon": "file",+ "label": "Files & Documents",+ "fields": [],+ "children": [+ extract_input_schema(Document, label_key="title", icon="document"),+ extract_input_schema(File, label_key="filename", icon="file"),+ ],+ },+ {+ "id": uuid4(),+ "type": "financial_category",+ "key": "financial",+ "icon": "bank",+ "label": "Financial Data",+ "fields": [],+ "children": [+ extract_input_schema(BankAccount, label_key="account_number", icon="bank"),+ extract_input_schema(CreditCard, label_key="card_number", icon="creditcard"),],},{@@ -82,7 +151,7 @@ async def get_types_list():"label": "Leaks","fields": [],"children": [- extract_input_schema(Leak, label_key="name", icon = "breach"),+ extract_input_schema(Leak, label_key="name", icon="breach"),],},{@@ -93,9 +162,9 @@ async def get_types_list():"label": "Crypto","fields": [],"children": [- extract_input_schema(CryptoWallet, label_key="address", icon = "cryptowallet"),- extract_input_schema(CryptoWalletTransaction, label_key="hash", icon = "cryptowallet"),- extract_input_schema(CryptoNFT, label_key="name", icon = "cryptowallet"),+ extract_input_schema(CryptoWallet, label_key="address", icon="cryptowallet"),+ extract_input_schema(CryptoWalletTransaction, label_key="hash", icon="cryptowallet"),+ extract_input_schema(CryptoNFT, label_key="name", icon="cryptowallet"),],}]diff --git a/flowsint-api/app/scanners/registry.py b/flowsint-api/app/scanners/registry.pyindex 42c8be67..1eb2573e 100644--- a/flowsint-api/app/scanners/registry.py+++ b/flowsint-api/app/scanners/registry.py@@ -21,6 +21,7 @@ from app.scanners.emails.to_gravatar import EmailToGravatarScannerfrom app.scanners.emails.to_leaks import EmailToBreachesScannerfrom app.scanners.individuals.to_org import IndividualToOrgScannerfrom app.scanners.organizations.to_infos import OrgToInfosScanner+from app.scanners.websites.to_webtrackers import WebsiteToWebtrackersScannerclass ScannerRegistry:@@ -96,4 +97,5 @@ ScannerRegistry.register(EmailToBreachesScanner)ScannerRegistry.register(IndividualToOrgScanner)ScannerRegistry.register(OrgToInfosScanner)ScannerRegistry.register(IndividualToOrgScanner)+ScannerRegistry.register(WebsiteToWebtrackersScanner)diff --git a/flowsint-api/app/scanners/websites/to_crawler.py b/flowsint-api/app/scanners/websites/to_crawler.pyindex a39ec997..83a7becf 100644--- a/flowsint-api/app/scanners/websites/to_crawler.py+++ b/flowsint-api/app/scanners/websites/to_crawler.py@@ -9,214 +9,13 @@ from app.scanners.base import Scannerfrom app.types.website import Websitefrom app.types.phone import Phonefrom app.types.email import Email-from app.types.individual import Individualfrom pydantic import TypeAdapterfrom app.core.logger import Logger-import time-import spacy--InputType: TypeAlias = List[Website]-OutputType: TypeAlias = List[Dict[str, Union[Website, List[Phone], List[Email], List[Individual]]]]--# Disable SSL warnings-requests.packages.urllib3.disable_warnings()--# Load spaCy model for person recognition-try:- nlp = spacy.load("fr_core_news_md")-except OSError:- # Fallback to English model if French model is not available- try:- nlp = spacy.load("en_core_web_md")- except OSError:- # If no model is available, we'll handle this gracefully- nlp = None---def remove_dup_email(emails):- """Remove duplicate emails while preserving order."""- return list(dict.fromkeys(emails))---def remove_dup_phone(phones):- """Remove duplicate phones while preserving order."""- return list(dict.fromkeys(phones))---def remove_dup_individual(individuals):- """Remove duplicate individuals while preserving order."""- seen = set()- unique_individuals = []- for individual in individuals:- # Use full_name as the key for deduplication- if individual.full_name not in seen:- seen.add(individual.full_name)- unique_individuals.append(individual)- return unique_individuals---def get_email_from_mailto(html):- """Extract emails from mailto links in HTML content."""- try:- emails = []-- # First, try to extract mailto patterns from the entire content (works for any format)- mailto_pattern = r'mailto:([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,})'- mailto_matches = re.findall(mailto_pattern, html, re.IGNORECASE)- for email in mailto_matches:- email_clean = email.strip()- if len(email_clean) <= 100:- emails.append(email_clean)-- # If it looks like HTML, also try to parse it with BeautifulSoup for more structured extraction- if '<' in html and '>' in html:- try:- soup = BeautifulSoup(html, 'lxml')- # Find all anchor tags with mailto href- mailto_links = soup.find_all('a', href=re.compile(r'^mailto:', re.IGNORECASE))-- for link in mailto_links:- href = link.get('href', '')- # Extract email from mailto:[email protected]- email_match = re.search(r'^mailto:([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,})', href, re.IGNORECASE)- if email_match:- email = email_match.group(1).strip()- if len(email) <= 100:- emails.append(email)- except Exception:- # If BeautifulSoup parsing fails, we already have the regex results- pass-- # Remove duplicates while preserving order- return remove_dup_email(emails)-- except Exception:- return []---def get_email(html):- """Extract emails from HTML content."""- try:- # Use BeautifulSoup to extract visible text with proper spacing- if '<' in html and '>' in html:- soup = BeautifulSoup(html, 'lxml')- text = soup.get_text(separator=' ')- else:- text = html- email_pattern = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b'- emails = re.findall(email_pattern, text)- nodup_emails = remove_dup_email(emails)- filtered_emails = []- for email in nodup_emails:- email_clean = email.strip()- if len(email_clean) > 100:- continue- filtered_emails.append(email_clean)- return filtered_emails- except Exception:- return []---def get_phone(html):- """Extract phone numbers from HTML content."""- try:- # Simpler phone pattern that matches common formats- phone_pattern = r'(?:\+?1[-.\s]?)?\(?([0-9]{3})\)?[-.\s]?([0-9]{3})[-.\s]?([0-9]{4})'- phones = re.findall(phone_pattern, html)- # Reconstruct phone numbers from groups- formatted_phones = []- for phone in phones:- if len(phone) == 3:- formatted_phones.append(f"+1-{phone[0]}-{phone[1]}-{phone[2]}")-- # Also try a simpler pattern for basic phone numbers- simple_pattern = r'\+?1?[-.\s]?\(?[0-9]{3}\)?[-.\s]?[0-9]{3}[-.\s]?[0-9]{4}'- simple_phones = re.findall(simple_pattern, html)-- # Combine and deduplicate- all_phones = formatted_phones + simple_phones- nodup_phones = remove_dup_phone(all_phones)- return [phone.strip() for phone in nodup_phones]- except Exception:- return []+from reconcrawl import Crawler-def get_individuals(text):- """Extract individual names from text using spaCy."""- try:- if nlp is None:- return []-- # Clean the text first - remove HTML tags and extra whitespace- # Remove HTML tags- clean_text = re.sub(r'<[^>]+>', ' ', text)- # Remove extra whitespace- clean_text = re.sub(r'\s+', ' ', clean_text).strip()-- # Process the cleaned text with spaCy- doc = nlp(clean_text)-- # Extract person entities - French models use "PER", English models use "PERSON"- person_entities = []- for ent in doc.ents:- if ent.label_ in ["PERSON", "PER"]:- # Clean the entity text- entity_text = ent.text.strip()- # Remove any remaining HTML artifacts- entity_text = re.sub(r'<[^>]+>', '', entity_text)- # Remove common punctuation at the end- entity_text = re.sub(r'[.,;:!?]+$', '', entity_text)- # Only add if it's a reasonable length- if len(entity_text) > 2 and len(entity_text) < 100:- person_entities.append(entity_text)-- # Remove duplicates while preserving order- unique_persons = list(dict.fromkeys(person_entities))-- # Filter out very short names and common false positives- filtered_persons = []- for person in unique_persons:- # Skip very short names- if len(person) <= 2:- continue- # Skip names that are just common words- common_words = ['the', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for', 'of', 'with', 'by']- if person.lower() in common_words:- continue- # Skip names that are just numbers- if person.isdigit():- continue- filtered_persons.append(person)-- # Convert to Individual objects- individuals = []- for person in filtered_persons:- # Split the name into parts- name_parts = person.split()- if len(name_parts) >= 2:- # Assume first part is first name, rest is last name- first_name = name_parts[0]- last_name = " ".join(name_parts[1:])- full_name = person- else:- # Single name - use as both first and last name- first_name = person- last_name = person- full_name = person-- # Create Individual object- individual = Individual(- first_name=first_name,- last_name=last_name,- full_name=full_name- )- individuals.append(individual)-- return individuals- except Exception as e:- # Log the error for debugging- print(f"Error in get_individuals: {str(e)}")- return []+InputType: TypeAlias = List[Website]+OutputType: TypeAlias = List[Dict[str, Union[Website, List[Phone], List[Email]]]]class WebsiteToCrawler(Scanner):@@ -261,7 +60,6 @@ class WebsiteToCrawler(Scanner):{"name": "website", "type": "Website"},{"name": "emails", "type": "Email[]"},{"name": "phones", "type": "Phone[]"},- {"name": "individuals", "type": "Individual[]"}]}@@ -274,139 +72,6 @@ class WebsiteToCrawler(Scanner):except Exception:return False- def extract_internal_links(self, soup: BeautifulSoup, base_url: str, visited_urls: Set[str]) -> Set[str]:- """Extract internal links from the page."""- internal_links = set()-- try:- # Find all anchor tags- for link in soup.find_all('a', href=True):- href = link.get('href')- if not href:- continue-- # Resolve relative URLs- absolute_url = urljoin(base_url, href)-- # Check if it's an internal link and not already visited- if self.is_same_domain(absolute_url, base_url) and absolute_url not in visited_urls:- # Filter out common non-content URLs- if not any(exclude in absolute_url.lower() for exclude in [- '#', 'javascript:', 'mailto:', 'tel:', '.pdf', '.doc', '.docx',- '.jpg', '.jpeg', '.png', '.gif', '.css', '.js', '.xml', '.rss',- 'logout', 'admin', 'login', 'register', 'signup', 'signin'- ]):- internal_links.add(absolute_url)-- except Exception:- pass-- return internal_links-- def get_final_url(self, url: str, timeout: int = 30) -> str:- """Follow redirects to get the final URL."""- try:- response = requests.head(url, verify=False, timeout=timeout, allow_redirects=True)- return response.url- except Exception:- return url-- def crawl_website_comprehensive(self, url: str, max_pages: int = 50, timeout: int = 30, delay: float = 1.0) -> Dict[str, Any]:- """Comprehensive website crawler that follows internal links."""- result = {"website": url, "emails": [], "phones": [], "individuals": []}- visited_urls = set()- urls_to_visit = set()-- try:- # Ensure URL has protocol- if not url.startswith('http'):- url = 'https://' + url-- # Get final URL after redirects- final_url = self.get_final_url(url, timeout)- base_domain = urlparse(final_url).netloc-- # Start with the main page- urls_to_visit.add(final_url)-- page_count = 0-- while urls_to_visit and page_count < max_pages:- current_url = urls_to_visit.pop()-- if current_url in visited_urls:- continue-- visited_urls.add(current_url)- page_count += 1-- # Log current page being crawled- Logger.info(self.sketch_id, {"message": f"Crawling page {page_count}: {current_url}"})-- try:- # Add delay to be respectful to the server- if page_count > 1:- time.sleep(delay)-- # Get the page- response = requests.get(current_url, verify=False, timeout=timeout)-- # Only proceed if we get a 200 status code- if response.status_code != 200:- Logger.info(self.sketch_id, {"message": f"Skipping {current_url} - status code: {response.status_code}"})- continue-- # Parse HTML content- html_content = getattr(response, 'text', None)- if html_content is None:- html_content = response.content.decode(response.encoding or 'utf-8', errors='replace')-- soup = BeautifulSoup(html_content, 'lxml', from_encoding=response.encoding)- visible_text = soup.get_text(separator=' ')-- # Extract emails from both HTML content (for mailto links) and visible text (for regular patterns)- page_emails_from_text = get_email(visible_text)- page_emails_from_mailto = get_email_from_mailto(html_content)- page_emails = remove_dup_email(page_emails_from_text + page_emails_from_mailto)-- page_phones = get_phone(visible_text)- # page_individuals = get_individuals(visible_text)-- # Log findings for this page- # if page_emails or page_phones or page_individuals:- if page_emails or page_phones:- Logger.info(self.sketch_id, {- # "message": f"Found {len(page_emails)} emails, {len(page_phones)} phones, and {len(page_individuals)} individuals on {current_url}"- "message": f"Found {len(page_emails)} emails, {len(page_phones)} phones on {current_url}"- })-- # Add to results- result["emails"].extend(page_emails)- result["phones"].extend(page_phones)- # result["individuals"].extend(page_individuals)-- # Extract internal links for further crawling- if page_count < max_pages:- new_links = self.extract_internal_links(soup, current_url, visited_urls)- urls_to_visit.update(new_links)- if new_links:- Logger.info(self.sketch_id, {"message": f"Found {len(new_links)} new internal links on {current_url}"})-- except Exception as e:- # Log error but continue with other pages- Logger.error(self.sketch_id, {"message": f"Error crawling {current_url}: {str(e)}"})- continue-- # Remove duplicates from final results- result["emails"] = remove_dup_email(result["emails"])- result["phones"] = remove_dup_phone(result["phones"])- result["individuals"] = remove_dup_individual(result["individuals"])-- except Exception as e:- Logger.error(self.sketch_id, {"message": f"Error in comprehensive crawl of {url}: {str(e)}"})-- return result-def preprocess(self, data: Union[List[str], List[dict], InputType]) -> InputType:cleaned: InputType = []for item in data:@@ -428,42 +93,43 @@ class WebsiteToCrawler(Scanner):for website in data:try:Logger.info(self.sketch_id, {"message": f"Starting comprehensive crawl of {str(website.url)}"})-- crawl_result = self.crawl_website_comprehensive(str(website.url))-- # Create structured result for this website+ crawler = Crawler(+ url=str(website.url),+ max_pages=50,+ timeout=30,+ delay=1.0,+ verbose=False,+ recursive=True+ )+ crawler.fetch()+ crawler.extract_emails()+ crawler.extract_phones()+ crawl_result = crawler.get_results()website_result = {"website": str(website.url), # Store as string instead of Website object"emails": [],"phones": [],- "individuals": []}-- # Create Email objects for found emails- for email in crawl_result["emails"]:- website_result["emails"].append(Email(email=email))-- # Create Phone objects for found phone numbers- for phone in crawl_result["phones"]:- website_result["phones"].append(Phone(number=phone))-- # Create Individual objects for found individuals- for individual in crawl_result["individuals"]:- website_result["individuals"].append(individual)-+ for item in crawl_result:+ Logger.info(self.sketch_id, {"message": f"{item.type}: {item.value}"})+ if item.source_url:+ Logger.info(self.sketch_id, {"message": f" Found on: {item.source_url}"})+ if item.type == "email":+ website_result["emails"].append(Email(email=item.value))+ if item.type == "phone":+ website_result["phones"].append(Phone(number=item.value))+# Log resultsLogger.info(self.sketch_id, {- "message": f"Crawl completed for {str(website.url)}: {len(website_result['emails'])} emails, {len(website_result['phones'])} phones, and {len(website_result['individuals'])} individuals found"+ "message": f"Crawl completed for {str(website.url)}: {len(website_result['emails'])} emails, {len(website_result['phones'])} phones found."})- if not website_result["emails"] and not website_result["phones"] and not website_result["individuals"]:- Logger.info(self.sketch_id, {"message": f"No emails, phones, or individuals found for website {str(website.url)}"})+ if not website_result["emails"] and not website_result["phones"]:+ Logger.info(self.sketch_id, {"message": f"No emails or phones found for website {str(website.url)}."})elif not website_result["emails"]:Logger.info(self.sketch_id, {"message": f"No emails found for website {str(website.url)}"})elif not website_result["phones"]:Logger.info(self.sketch_id, {"message": f"No phones found for website {str(website.url)}"})- elif not website_result["individuals"]:- Logger.info(self.sketch_id, {"message": f"No individuals found for website {str(website.url)}"})results.append(website_result)@@ -475,7 +141,6 @@ class WebsiteToCrawler(Scanner):"website": str(website.url), # Store as string instead of Website object"emails": [],"phones": [],- "individuals": []})continue@@ -540,29 +205,5 @@ class WebsiteToCrawler(Scanner):"sketch_id": self.sketch_id,})Logger.graph_append(self.sketch_id, {"message": f"Found phone {phone.number} for website {website_url}"})-- # Create individual nodes and relationships- for individual in result["individuals"]:- individual_query = """- MERGE (individual:individual {full_name: $full_name})- SET individual.sketch_id = $sketch_id,- individual.label = $full_name,- individual.caption = $full_name,- individual.type = "individual",- individual.first_name = $first_name,- individual.last_name = $last_name-- MERGE (website:website {url: $website_url})- MERGE (website)-[:MENTIONS_INDIVIDUAL {sketch_id: $sketch_id}]->(individual)- """-- self.neo4j_conn.query(individual_query, {- "full_name": individual.full_name,- "first_name": individual.first_name,- "last_name": individual.last_name,- "website_url": website_url,- "sketch_id": self.sketch_id,- })- Logger.graph_append(self.sketch_id, {"message": f"Found individual {individual.full_name} for website {website_url}"})return results\ No newline at end of filediff --git a/flowsint-api/app/scanners/websites/to_webtrackers.py b/flowsint-api/app/scanners/websites/to_webtrackers.pynew file mode 100644index 00000000..cfce2c29--- /dev/null+++ b/flowsint-api/app/scanners/websites/to_webtrackers.py@@ -0,0 +1,141 @@+from typing import List, Dict, Any, TypeAlias, Union+from app.utils import resolve_type+from app.scanners.base import Scanner+from app.types.website import Website+from app.types.domain import Domain+from app.types.web_tracker import WebTracker+from pydantic import TypeAdapter+from app.core.logger import Logger+from recontrack import TrackingCodeExtractor+++InputType: TypeAlias = List[Website]+OutputType: TypeAlias = List[WebTracker]+++class WebsiteToWebtrackersScanner(Scanner):+ """From website to webtrackers."""++ def __init__(self, sketch_id: str, scan_id: str, neo4j_conn=None):+ super().__init__(sketch_id, scan_id, neo4j_conn)+ self.tracker_website_mapping: List[tuple[WebTracker, Website]] = []++ @classmethod+ def name(cls) -> str:+ return "to_webtrackers"++ @classmethod+ def category(cls) -> str:+ return "Website"++ @classmethod+ def key(cls) -> str:+ return "website"++ @classmethod+ def input_schema(cls) -> Dict[str, Any]:+ adapter = TypeAdapter(InputType)+ schema = adapter.json_schema()+ # Find the Website type in $defs+ website_def = schema["$defs"].get("Website")+ if not website_def:+ raise ValueError("Website type not found in schema")+ return {+ "type": "Website",+ "properties": [+ {"name": prop, "type": resolve_type(info, schema)}+ for prop, info in website_def["properties"].items()+ ]+ }+++ @classmethod+ def output_schema(cls) -> Dict[str, Any]:+ adapter = TypeAdapter(OutputType)+ schema = adapter.json_schema()+ # Find the WebTracker type in $defs+ domain_def = schema["$defs"].get("WebTracker")+ if not domain_def:+ raise ValueError("WebTracker type not found in schema")+ return {+ "type": "WebTracker",+ "properties": [+ {"name": prop, "type": resolve_type(info, schema)}+ for prop, info in domain_def["properties"].items()+ ]+ }++ def preprocess(self, data: Union[List[str], List[dict], InputType]) -> InputType:+ cleaned: InputType = []+ for item in data:+ website_obj = None+ if isinstance(item, str):+ # If it's a string, treat it as a URL+ website_obj = Website(url=item)+ elif isinstance(item, dict) and "url" in item:+ website_obj = Website(**item)+ elif isinstance(item, Website):+ website_obj = item+ if website_obj:+ cleaned.append(website_obj)+ return cleaned++ def scan(self, data: InputType) -> OutputType:+ """Extract domain from website."""+ results: OutputType = []+ # Clear the mapping for this scan+ self.tracker_website_mapping = []++ for website in data:+ try:+ extractor = TrackingCodeExtractor(website.url)+ extractor.fetch()+ print(f"↪️ Final URL after redirects: {extractor.final_url}")+ extractor.extract_codes()+ trackings = extractor.get_results()+ for tracking in trackings:+ tracker = WebTracker(tracker_id=tracking.code, name=tracking.source)+ results.append(tracker)+ # Store the mapping for postprocess+ self.tracker_website_mapping.append((tracker, website))+ except Exception as e:+ print(f"Error processing website {website.url}: {e}")+ continue++ return results++ def postprocess(self, results: OutputType, original_input: InputType) -> OutputType:+ # Use the stored mapping instead of trying to match by index+ for tracker, website in self.tracker_website_mapping:+ query = """+ MERGE (d:webtracker {tracker_id: $tracker_id})+ SET d.sketch_id = $sketch_id,+ d.label = $tracker_id,+ d.type = "webtracker",+ d.name = $name+ """+ query += """+ MERGE (w:website {url: $url})+ SET w.sketch_id = $sketch_id,+ w.label = $label,+ w.type = "website"+ MERGE (w)-[:HAS_TRACKER {sketch_id: $sketch_id}]->(d)+ """++ if self.neo4j_conn:+ params = {+ "tracker_id": tracker.tracker_id,+ "sketch_id": self.sketch_id,+ "name": tracker.name,+ "url": str(website.url),+ "label": str(website.url),+ }+ self.neo4j_conn.query(query, params)++ website_url = str(website.url)+ payload: Dict = {+ "message": f"{website_url} -> {tracker.name}: {tracker.tracker_id}"+ }+ Logger.graph_append(self.sketch_id, payload)++ return results\ No newline at end of filediff --git a/flowsint-api/app/types/affiliation.py b/flowsint-api/app/types/affiliation.pynew file mode 100644index 00000000..6f0a906f--- /dev/null+++ b/flowsint-api/app/types/affiliation.py@@ -0,0 +1,18 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Affiliation(BaseModel):+ organization: str = Field(..., description="Organization or group name", title="Organization")+ role: Optional[str] = Field(None, description="Role or position within organization", title="Role")+ start_date: Optional[str] = Field(None, description="Start date of affiliation", title="Start Date")+ end_date: Optional[str] = Field(None, description="End date of affiliation", title="End Date")+ is_current: Optional[bool] = Field(None, description="Whether affiliation is currently active", title="Is Current")+ department: Optional[str] = Field(None, description="Department or division", title="Department")+ location: Optional[str] = Field(None, description="Geographic location of affiliation", title="Location")+ industry: Optional[str] = Field(None, description="Industry or sector", title="Industry")+ description: Optional[str] = Field(None, description="Description of affiliation", title="Description")+ source: Optional[str] = Field(None, description="Source of affiliation information", title="Source")+ confidence: Optional[float] = Field(None, description="Confidence score for affiliation", title="Confidence")+ associated_individuals: Optional[List[str]] = Field(None, description="Individuals with similar affiliations", title="Associated Individuals")+ organization_type: Optional[str] = Field(None, description="Type of organization (company, NGO, government, etc.)", title="Organization Type")+ hierarchy_level: Optional[str] = Field(None, description="Hierarchical level within organization", title="Hierarchy Level")\ No newline at end of filediff --git a/flowsint-api/app/types/alias.py b/flowsint-api/app/types/alias.pynew file mode 100644index 00000000..deceb6c7--- /dev/null+++ b/flowsint-api/app/types/alias.py@@ -0,0 +1,16 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Alias(BaseModel):+ alias: str = Field(..., description="Alias or alternative name", title="Alias")+ type: Optional[str] = Field(None, description="Type of alias (nickname, code name, etc.)", title="Alias Type")+ context: Optional[str] = Field(None, description="Context where alias is used", title="Context")+ first_seen: Optional[str] = Field(None, description="First time alias was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time alias was observed", title="Last Seen")+ confidence: Optional[float] = Field(None, description="Confidence score for alias association", title="Confidence")+ source: Optional[str] = Field(None, description="Source of alias information", title="Source")+ associated_entities: Optional[List[str]] = Field(None, description="Entities associated with this alias", title="Associated Entities")+ description: Optional[str] = Field(None, description="Description or notes about the alias", title="Description")+ is_active: Optional[bool] = Field(None, description="Whether alias is currently active", title="Is Active")+ language: Optional[str] = Field(None, description="Language of the alias", title="Language")+ region: Optional[str] = Field(None, description="Geographic region where alias is used", title="Region")\ No newline at end of filediff --git a/flowsint-api/app/types/bank_account.py b/flowsint-api/app/types/bank_account.pynew file mode 100644index 00000000..9f7ae822--- /dev/null+++ b/flowsint-api/app/types/bank_account.py@@ -0,0 +1,22 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class BankAccount(BaseModel):+ account_number: str = Field(..., description="Bank account number", title="Account Number")+ bank_name: Optional[str] = Field(None, description="Bank name", title="Bank Name")+ account_type: Optional[str] = Field(None, description="Type of account (checking, savings, etc.)", title="Account Type")+ routing_number: Optional[str] = Field(None, description="Bank routing number", title="Routing Number")+ iban: Optional[str] = Field(None, description="International Bank Account Number", title="IBAN")+ swift_code: Optional[str] = Field(None, description="SWIFT/BIC code", title="SWIFT Code")+ country: Optional[str] = Field(None, description="Country where account is held", title="Country")+ currency: Optional[str] = Field(None, description="Account currency", title="Currency")+ balance: Optional[float] = Field(None, description="Account balance", title="Balance")+ account_holder: Optional[str] = Field(None, description="Account holder name", title="Account Holder")+ status: Optional[str] = Field(None, description="Account status (active, closed, etc.)", title="Status")+ opened_date: Optional[str] = Field(None, description="Account opening date", title="Opened Date")+ closed_date: Optional[str] = Field(None, description="Account closing date", title="Closed Date")+ is_joint: Optional[bool] = Field(None, description="Whether account is joint", title="Is Joint")+ associated_individuals: Optional[List[str]] = Field(None, description="Individuals associated with account", title="Associated Individuals")+ source: Optional[str] = Field(None, description="Source of account information", title="Source")+ is_compromised: Optional[bool] = Field(None, description="Whether account has been compromised", title="Is Compromised")+ breach_source: Optional[str] = Field(None, description="Source of breach if compromised", title="Breach Source")\ No newline at end of filediff --git a/flowsint-api/app/types/credential.py b/flowsint-api/app/types/credential.pynew file mode 100644index 00000000..f433a16d--- /dev/null+++ b/flowsint-api/app/types/credential.py@@ -0,0 +1,21 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Credential(BaseModel):+ username: str = Field(..., description="Username or identifier", title="Username")+ service: Optional[str] = Field(None, description="Service or platform where credential is used", title="Service")+ type: Optional[str] = Field(None, description="Type of credential (password, token, key, etc.)", title="Credential Type")+ first_seen: Optional[str] = Field(None, description="First time credential was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time credential was observed", title="Last Seen")+ is_active: Optional[bool] = Field(None, description="Whether credential is currently active", title="Is Active")+ is_compromised: Optional[bool] = Field(None, description="Whether credential has been compromised", title="Is Compromised")+ breach_source: Optional[str] = Field(None, description="Source of breach if compromised", title="Breach Source")+ password_hash: Optional[str] = Field(None, description="Hashed password (if available)", title="Password Hash")+ hash_type: Optional[str] = Field(None, description="Type of hash algorithm used", title="Hash Type")+ associated_emails: Optional[List[str]] = Field(None, description="Associated email addresses", title="Associated Emails")+ associated_phones: Optional[List[str]] = Field(None, description="Associated phone numbers", title="Associated Phones")+ ip_addresses: Optional[List[str]] = Field(None, description="IP addresses used with credential", title="IP Addresses")+ user_agents: Optional[List[str]] = Field(None, description="User agents used with credential", title="User Agents")+ locations: Optional[List[str]] = Field(None, description="Geographic locations where credential was used", title="Locations")+ description: Optional[str] = Field(None, description="Additional notes about credential", title="Description")+ source: Optional[str] = Field(None, description="Source of credential information", title="Source")\ No newline at end of filediff --git a/flowsint-api/app/types/credit_card.py b/flowsint-api/app/types/credit_card.pynew file mode 100644index 00000000..ea14e1c1--- /dev/null+++ b/flowsint-api/app/types/credit_card.py@@ -0,0 +1,23 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class CreditCard(BaseModel):+ card_number: str = Field(..., description="Credit card number", title="Card Number")+ card_type: Optional[str] = Field(None, description="Type of card (Visa, Mastercard, etc.)", title="Card Type")+ issuer: Optional[str] = Field(None, description="Card issuer bank", title="Issuer")+ expiry_date: Optional[str] = Field(None, description="Card expiry date", title="Expiry Date")+ cvv: Optional[str] = Field(None, description="Card verification value", title="CVV")+ cardholder_name: Optional[str] = Field(None, description="Cardholder name", title="Cardholder Name")+ billing_address: Optional[str] = Field(None, description="Billing address", title="Billing Address")+ credit_limit: Optional[float] = Field(None, description="Credit limit", title="Credit Limit")+ available_credit: Optional[float] = Field(None, description="Available credit", title="Available Credit")+ status: Optional[str] = Field(None, description="Card status (active, suspended, etc.)", title="Status")+ issued_date: Optional[str] = Field(None, description="Card issue date", title="Issued Date")+ is_virtual: Optional[bool] = Field(None, description="Whether card is virtual", title="Is Virtual")+ is_prepaid: Optional[bool] = Field(None, description="Whether card is prepaid", title="Is Prepaid")+ is_business: Optional[bool] = Field(None, description="Whether card is business card", title="Is Business")+ associated_accounts: Optional[List[str]] = Field(None, description="Associated bank accounts", title="Associated Accounts")+ source: Optional[str] = Field(None, description="Source of card information", title="Source")+ is_compromised: Optional[bool] = Field(None, description="Whether card has been compromised", title="Is Compromised")+ breach_source: Optional[str] = Field(None, description="Source of breach if compromised", title="Breach Source")+ last_used: Optional[str] = Field(None, description="Last time card was used", title="Last Used")\ No newline at end of filediff --git a/flowsint-api/app/types/device.py b/flowsint-api/app/types/device.pynew file mode 100644index 00000000..bd685f81--- /dev/null+++ b/flowsint-api/app/types/device.py@@ -0,0 +1,24 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Device(BaseModel):+ device_id: str = Field(..., description="Unique device identifier", title="Device ID")+ type: Optional[str] = Field(None, description="Type of device (mobile, desktop, server, etc.)", title="Device Type")+ manufacturer: Optional[str] = Field(None, description="Device manufacturer", title="Manufacturer")+ model: Optional[str] = Field(None, description="Device model", title="Model")+ os: Optional[str] = Field(None, description="Operating system", title="Operating System")+ os_version: Optional[str] = Field(None, description="Operating system version", title="OS Version")+ browser: Optional[str] = Field(None, description="Browser used", title="Browser")+ browser_version: Optional[str] = Field(None, description="Browser version", title="Browser Version")+ screen_resolution: Optional[str] = Field(None, description="Screen resolution", title="Screen Resolution")+ user_agent: Optional[str] = Field(None, description="User agent string", title="User Agent")+ mac_address: Optional[str] = Field(None, description="MAC address", title="MAC Address")+ ip_addresses: Optional[List[str]] = Field(None, description="IP addresses associated with device", title="IP Addresses")+ first_seen: Optional[str] = Field(None, description="First time device was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time device was observed", title="Last Seen")+ location: Optional[str] = Field(None, description="Geographic location", title="Location")+ is_mobile: Optional[bool] = Field(None, description="Whether device is mobile", title="Is Mobile")+ is_tablet: Optional[bool] = Field(None, description="Whether device is a tablet", title="Is Tablet")+ is_desktop: Optional[bool] = Field(None, description="Whether device is a desktop", title="Is Desktop")+ associated_users: Optional[List[str]] = Field(None, description="Users associated with device", title="Associated Users")+ source: Optional[str] = Field(None, description="Source of device information", title="Source")\ No newline at end of filediff --git a/flowsint-api/app/types/dns_record.py b/flowsint-api/app/types/dns_record.pynew file mode 100644index 00000000..fd86518f--- /dev/null+++ b/flowsint-api/app/types/dns_record.py@@ -0,0 +1,19 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class DNSRecord(BaseModel):+ record_type: str = Field(..., description="Type of DNS record (A, AAAA, CNAME, MX, etc.)", title="Record Type")+ name: str = Field(..., description="Domain name", title="Domain Name")+ value: str = Field(..., description="Record value", title="Record Value")+ ttl: Optional[int] = Field(None, description="Time to live in seconds", title="TTL")+ priority: Optional[int] = Field(None, description="Priority for MX records", title="Priority")+ first_seen: Optional[str] = Field(None, description="First time record was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time record was observed", title="Last Seen")+ is_active: Optional[bool] = Field(None, description="Whether record is currently active", title="Is Active")+ nameserver: Optional[str] = Field(None, description="Nameserver that provided the record", title="Nameserver")+ source: Optional[str] = Field(None, description="Source of DNS information", title="Source")+ associated_domains: Optional[List[str]] = Field(None, description="Related domain names", title="Associated Domains")+ description: Optional[str] = Field(None, description="Additional notes about the record", title="Description")+ is_suspicious: Optional[bool] = Field(None, description="Whether record is suspicious", title="Is Suspicious")+ malware_family: Optional[str] = Field(None, description="Malware family if record is malicious", title="Malware Family")+ threat_level: Optional[str] = Field(None, description="Threat level assessment", title="Threat Level")\ No newline at end of filediff --git a/flowsint-api/app/types/document.py b/flowsint-api/app/types/document.pynew file mode 100644index 00000000..79757406--- /dev/null+++ b/flowsint-api/app/types/document.py@@ -0,0 +1,23 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Document(BaseModel):+ title: str = Field(..., description="Document title", title="Title")+ type: Optional[str] = Field(None, description="Type of document (PDF, DOC, etc.)", title="Document Type")+ file_size: Optional[int] = Field(None, description="File size in bytes", title="File Size")+ created_date: Optional[str] = Field(None, description="Document creation date", title="Created Date")+ modified_date: Optional[str] = Field(None, description="Document last modified date", title="Modified Date")+ author: Optional[str] = Field(None, description="Document author", title="Author")+ subject: Optional[str] = Field(None, description="Document subject", title="Subject")+ keywords: Optional[List[str]] = Field(None, description="Document keywords", title="Keywords")+ language: Optional[str] = Field(None, description="Document language", title="Language")+ page_count: Optional[int] = Field(None, description="Number of pages", title="Page Count")+ hash_md5: Optional[str] = Field(None, description="MD5 hash", title="MD5 Hash")+ hash_sha1: Optional[str] = Field(None, description="SHA1 hash", title="SHA1 Hash")+ hash_sha256: Optional[str] = Field(None, description="SHA256 hash", title="SHA256 Hash")+ source_url: Optional[str] = Field(None, description="Source URL if downloaded", title="Source URL")+ location: Optional[str] = Field(None, description="File location or path", title="Location")+ is_encrypted: Optional[bool] = Field(None, description="Whether document is encrypted", title="Is Encrypted")+ is_password_protected: Optional[bool] = Field(None, description="Whether document is password protected", title="Is Password Protected")+ description: Optional[str] = Field(None, description="Document description", title="Description")+ source: Optional[str] = Field(None, description="Source of document information", title="Source")\ No newline at end of filediff --git a/flowsint-api/app/types/file.py b/flowsint-api/app/types/file.pynew file mode 100644index 00000000..a448fe68--- /dev/null+++ b/flowsint-api/app/types/file.py@@ -0,0 +1,26 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class File(BaseModel):+ filename: str = Field(..., description="File name", title="Filename")+ file_type: Optional[str] = Field(None, description="File type or extension", title="File Type")+ file_size: Optional[int] = Field(None, description="File size in bytes", title="File Size")+ created_date: Optional[str] = Field(None, description="File creation date", title="Created Date")+ modified_date: Optional[str] = Field(None, description="File last modified date", title="Modified Date")+ accessed_date: Optional[str] = Field(None, description="File last accessed date", title="Accessed Date")+ path: Optional[str] = Field(None, description="File path", title="Path")+ hash_md5: Optional[str] = Field(None, description="MD5 hash", title="MD5 Hash")+ hash_sha1: Optional[str] = Field(None, description="SHA1 hash", title="SHA1 Hash")+ hash_sha256: Optional[str] = Field(None, description="SHA256 hash", title="SHA256 Hash")+ is_executable: Optional[bool] = Field(None, description="Whether file is executable", title="Is Executable")+ is_archive: Optional[bool] = Field(None, description="Whether file is an archive", title="Is Archive")+ is_image: Optional[bool] = Field(None, description="Whether file is an image", title="Is Image")+ is_video: Optional[bool] = Field(None, description="Whether file is a video", title="Is Video")+ is_audio: Optional[bool] = Field(None, description="Whether file is an audio file", title="Is Audio")+ is_text: Optional[bool] = Field(None, description="Whether file is a text file", title="Is Text")+ mime_type: Optional[str] = Field(None, description="MIME type", title="MIME Type")+ description: Optional[str] = Field(None, description="File description", title="Description")+ source: Optional[str] = Field(None, description="Source of file information", title="Source")+ is_malicious: Optional[bool] = Field(None, description="Whether file is malicious", title="Is Malicious")+ malware_family: Optional[str] = Field(None, description="Malware family if malicious", title="Malware Family")+ threat_level: Optional[str] = Field(None, description="Threat level assessment", title="Threat Level")\ No newline at end of filediff --git a/flowsint-api/app/types/malware.py b/flowsint-api/app/types/malware.pynew file mode 100644index 00000000..41184460--- /dev/null+++ b/flowsint-api/app/types/malware.py@@ -0,0 +1,23 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Malware(BaseModel):+ name: str = Field(..., description="Malware name or identifier", title="Name")+ family: Optional[str] = Field(None, description="Malware family", title="Family")+ type: Optional[str] = Field(None, description="Type of malware (trojan, ransomware, etc.)", title="Type")+ description: Optional[str] = Field(None, description="Malware description", title="Description")+ first_seen: Optional[str] = Field(None, description="First time malware was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time malware was observed", title="Last Seen")+ is_active: Optional[bool] = Field(None, description="Whether malware is currently active", title="Is Active")+ threat_level: Optional[str] = Field(None, description="Threat level assessment", title="Threat Level")+ targets: Optional[List[str]] = Field(None, description="Target platforms or systems", title="Targets")+ capabilities: Optional[List[str]] = Field(None, description="Malware capabilities", title="Capabilities")+ indicators: Optional[List[str]] = Field(None, description="IOCs (Indicators of Compromise)", title="Indicators")+ c2_servers: Optional[List[str]] = Field(None, description="Command and control servers", title="C2 Servers")+ distribution_methods: Optional[List[str]] = Field(None, description="Distribution methods", title="Distribution Methods")+ evasion_techniques: Optional[List[str]] = Field(None, description="Evasion techniques used", title="Evasion Techniques")+ persistence_mechanisms: Optional[List[str]] = Field(None, description="Persistence mechanisms", title="Persistence Mechanisms")+ encryption_methods: Optional[List[str]] = Field(None, description="Encryption methods used", title="Encryption Methods")+ source: Optional[str] = Field(None, description="Source of malware information", title="Source")+ analysis_report: Optional[str] = Field(None, description="Link to analysis report", title="Analysis Report")+ sample_hashes: Optional[List[str]] = Field(None, description="Sample file hashes", title="Sample Hashes")\ No newline at end of filediff --git a/flowsint-api/app/types/message.py b/flowsint-api/app/types/message.pynew file mode 100644index 00000000..950c2a0a--- /dev/null+++ b/flowsint-api/app/types/message.py@@ -0,0 +1,23 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Message(BaseModel):+ message_id: str = Field(..., description="Unique message identifier", title="Message ID")+ content: str = Field(..., description="Message content", title="Content")+ sender: Optional[str] = Field(None, description="Message sender", title="Sender")+ recipient: Optional[str] = Field(None, description="Message recipient", title="Recipient")+ timestamp: Optional[str] = Field(None, description="Message timestamp", title="Timestamp")+ platform: Optional[str] = Field(None, description="Platform where message was sent", title="Platform")+ message_type: Optional[str] = Field(None, description="Type of message (text, email, chat, etc.)", title="Message Type")+ subject: Optional[str] = Field(None, description="Message subject (for emails)", title="Subject")+ is_read: Optional[bool] = Field(None, description="Whether message has been read", title="Is Read")+ is_reply: Optional[bool] = Field(None, description="Whether message is a reply", title="Is Reply")+ parent_message_id: Optional[str] = Field(None, description="Parent message ID if reply", title="Parent Message ID")+ attachments: Optional[List[str]] = Field(None, description="List of attachment file names", title="Attachments")+ language: Optional[str] = Field(None, description="Message language", title="Language")+ sentiment: Optional[str] = Field(None, description="Message sentiment analysis", title="Sentiment")+ keywords: Optional[List[str]] = Field(None, description="Extracted keywords", title="Keywords")+ entities: Optional[List[str]] = Field(None, description="Named entities found in message", title="Entities")+ source: Optional[str] = Field(None, description="Source of message information", title="Source")+ is_suspicious: Optional[bool] = Field(None, description="Whether message is suspicious", title="Is Suspicious")+ threat_level: Optional[str] = Field(None, description="Threat level assessment", title="Threat Level")\ No newline at end of filediff --git a/flowsint-api/app/types/reputation_score.py b/flowsint-api/app/types/reputation_score.pynew file mode 100644index 00000000..8871ee16--- /dev/null+++ b/flowsint-api/app/types/reputation_score.py@@ -0,0 +1,19 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class ReputationScore(BaseModel):+ entity_id: str = Field(..., description="Entity identifier", title="Entity ID")+ entity_type: Optional[str] = Field(None, description="Type of entity (domain, IP, email, etc.)", title="Entity Type")+ score: Optional[float] = Field(None, description="Reputation score (0-100)", title="Score")+ score_type: Optional[str] = Field(None, description="Type of score (trust, spam, malware, etc.)", title="Score Type")+ provider: Optional[str] = Field(None, description="Reputation provider", title="Provider")+ last_updated: Optional[str] = Field(None, description="Last update timestamp", title="Last Updated")+ confidence: Optional[float] = Field(None, description="Confidence in the score", title="Confidence")+ factors: Optional[List[str]] = Field(None, description="Factors contributing to score", title="Factors")+ category: Optional[str] = Field(None, description="Category (good, suspicious, malicious, etc.)", title="Category")+ description: Optional[str] = Field(None, description="Description of reputation", title="Description")+ source: Optional[str] = Field(None, description="Source of reputation data", title="Source")+ historical_scores: Optional[List[dict]] = Field(None, description="Historical score data", title="Historical Scores")+ trend: Optional[str] = Field(None, description="Score trend (improving, declining, stable)", title="Trend")+ risk_level: Optional[str] = Field(None, description="Risk level assessment", title="Risk Level")+ recommendations: Optional[List[str]] = Field(None, description="Recommendations based on score", title="Recommendations")\ No newline at end of filediff --git a/flowsint-api/app/types/risk_profile.py b/flowsint-api/app/types/risk_profile.pynew file mode 100644index 00000000..72526486--- /dev/null+++ b/flowsint-api/app/types/risk_profile.py@@ -0,0 +1,26 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class RiskProfile(BaseModel):+ entity_id: str = Field(..., description="Entity identifier", title="Entity ID")+ entity_type: Optional[str] = Field(None, description="Type of entity", title="Entity Type")+ overall_risk_score: Optional[float] = Field(None, description="Overall risk score (0-100)", title="Overall Risk Score")+ risk_level: Optional[str] = Field(None, description="Risk level (low, medium, high, critical)", title="Risk Level")+ assessment_date: Optional[str] = Field(None, description="Date of risk assessment", title="Assessment Date")+ last_updated: Optional[str] = Field(None, description="Last update timestamp", title="Last Updated")+ risk_factors: Optional[List[str]] = Field(None, description="Identified risk factors", title="Risk Factors")+ threat_actors: Optional[List[str]] = Field(None, description="Associated threat actors", title="Threat Actors")+ attack_vectors: Optional[List[str]] = Field(None, description="Potential attack vectors", title="Attack Vectors")+ vulnerabilities: Optional[List[str]] = Field(None, description="Identified vulnerabilities", title="Vulnerabilities")+ exposure_surface: Optional[str] = Field(None, description="Exposure surface description", title="Exposure Surface")+ data_classification: Optional[str] = Field(None, description="Data classification level", title="Data Classification")+ compliance_risks: Optional[List[str]] = Field(None, description="Compliance-related risks", title="Compliance Risks")+ financial_impact: Optional[str] = Field(None, description="Potential financial impact", title="Financial Impact")+ reputation_impact: Optional[str] = Field(None, description="Potential reputation impact", title="Reputation Impact")+ operational_impact: Optional[str] = Field(None, description="Potential operational impact", title="Operational Impact")+ mitigation_strategies: Optional[List[str]] = Field(None, description="Recommended mitigation strategies", title="Mitigation Strategies")+ monitoring_recommendations: Optional[List[str]] = Field(None, description="Monitoring recommendations", title="Monitoring Recommendations")+ source: Optional[str] = Field(None, description="Source of risk assessment", title="Source")+ assessor: Optional[str] = Field(None, description="Risk assessor", title="Assessor")+ confidence: Optional[float] = Field(None, description="Confidence in assessment", title="Confidence")+ next_review_date: Optional[str] = Field(None, description="Next review date", title="Next Review Date")\ No newline at end of filediff --git a/flowsint-api/app/types/script.py b/flowsint-api/app/types/script.pynew file mode 100644index 00000000..1fc8183b--- /dev/null+++ b/flowsint-api/app/types/script.py@@ -0,0 +1,28 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Script(BaseModel):+ script_id: str = Field(..., description="Unique script identifier", title="Script ID")+ name: Optional[str] = Field(None, description="Script name", title="Name")+ language: Optional[str] = Field(None, description="Programming language", title="Language")+ type: Optional[str] = Field(None, description="Type of script (JavaScript, Python, etc.)", title="Type")+ content: Optional[str] = Field(None, description="Script content", title="Content")+ file_path: Optional[str] = Field(None, description="File path if stored", title="File Path")+ url: Optional[str] = Field(None, description="URL if loaded from web", title="URL")+ hash_md5: Optional[str] = Field(None, description="MD5 hash", title="MD5 Hash")+ hash_sha1: Optional[str] = Field(None, description="SHA1 hash", title="SHA1 Hash")+ hash_sha256: Optional[str] = Field(None, description="SHA256 hash", title="SHA256 Hash")+ file_size: Optional[int] = Field(None, description="File size in bytes", title="File Size")+ created_date: Optional[str] = Field(None, description="Creation date", title="Created Date")+ modified_date: Optional[str] = Field(None, description="Last modified date", title="Modified Date")+ author: Optional[str] = Field(None, description="Script author", title="Author")+ version: Optional[str] = Field(None, description="Script version", title="Version")+ description: Optional[str] = Field(None, description="Script description", title="Description")+ dependencies: Optional[List[str]] = Field(None, description="Script dependencies", title="Dependencies")+ functions: Optional[List[str]] = Field(None, description="Functions defined in script", title="Functions")+ is_malicious: Optional[bool] = Field(None, description="Whether script is malicious", title="Is Malicious")+ malware_family: Optional[str] = Field(None, description="Malware family if malicious", title="Malware Family")+ threat_level: Optional[str] = Field(None, description="Threat level assessment", title="Threat Level")+ source: Optional[str] = Field(None, description="Source of script information", title="Source")+ obfuscated: Optional[bool] = Field(None, description="Whether script is obfuscated", title="Obfuscated")+ minified: Optional[bool] = Field(None, description="Whether script is minified", title="Minified")\ No newline at end of filediff --git a/flowsint-api/app/types/session.py b/flowsint-api/app/types/session.pynew file mode 100644index 00000000..021106f0--- /dev/null+++ b/flowsint-api/app/types/session.py@@ -0,0 +1,20 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Session(BaseModel):+ session_id: str = Field(..., description="Unique session identifier", title="Session ID")+ user_id: Optional[str] = Field(None, description="User identifier", title="User ID")+ service: Optional[str] = Field(None, description="Service or platform", title="Service")+ start_time: Optional[str] = Field(None, description="Session start timestamp", title="Start Time")+ end_time: Optional[str] = Field(None, description="Session end timestamp", title="End Time")+ duration: Optional[int] = Field(None, description="Session duration in seconds", title="Duration")+ ip_address: Optional[str] = Field(None, description="IP address used for session", title="IP Address")+ user_agent: Optional[str] = Field(None, description="User agent string", title="User Agent")+ location: Optional[str] = Field(None, description="Geographic location", title="Location")+ device_type: Optional[str] = Field(None, description="Type of device used", title="Device Type")+ browser: Optional[str] = Field(None, description="Browser used", title="Browser")+ os: Optional[str] = Field(None, description="Operating system", title="Operating System")+ is_active: Optional[bool] = Field(None, description="Whether session is currently active", title="Is Active")+ is_suspicious: Optional[bool] = Field(None, description="Whether session is suspicious", title="Is Suspicious")+ activities: Optional[List[str]] = Field(None, description="Activities performed during session", title="Activities")+ source: Optional[str] = Field(None, description="Source of session information", title="Source")\ No newline at end of filediff --git a/flowsint-api/app/types/ssl_certificate.py b/flowsint-api/app/types/ssl_certificate.pynew file mode 100644index 00000000..9c15a10b--- /dev/null+++ b/flowsint-api/app/types/ssl_certificate.py@@ -0,0 +1,24 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class SSLCertificate(BaseModel):+ subject: str = Field(..., description="Certificate subject (domain name)", title="Subject")+ issuer: Optional[str] = Field(None, description="Certificate authority that issued the certificate", title="Issuer")+ serial_number: Optional[str] = Field(None, description="Certificate serial number", title="Serial Number")+ valid_from: Optional[str] = Field(None, description="Certificate validity start date", title="Valid From")+ valid_until: Optional[str] = Field(None, description="Certificate validity end date", title="Valid Until")+ signature_algorithm: Optional[str] = Field(None, description="Signature algorithm used", title="Signature Algorithm")+ key_size: Optional[int] = Field(None, description="Key size in bits", title="Key Size")+ key_type: Optional[str] = Field(None, description="Type of key (RSA, ECDSA, etc.)", title="Key Type")+ san_domains: Optional[List[str]] = Field(None, description="Subject Alternative Names", title="SAN Domains")+ is_valid: Optional[bool] = Field(None, description="Whether certificate is currently valid", title="Is Valid")+ is_expired: Optional[bool] = Field(None, description="Whether certificate has expired", title="Is Expired")+ is_self_signed: Optional[bool] = Field(None, description="Whether certificate is self-signed", title="Is Self Signed")+ is_wildcard: Optional[bool] = Field(None, description="Whether certificate is a wildcard certificate", title="Is Wildcard")+ ocsp_status: Optional[str] = Field(None, description="OCSP revocation status", title="OCSP Status")+ crl_status: Optional[str] = Field(None, description="Certificate Revocation List status", title="CRL Status")+ first_seen: Optional[str] = Field(None, description="First time certificate was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time certificate was observed", title="Last Seen")+ source: Optional[str] = Field(None, description="Source of certificate information", title="Source")+ fingerprint_sha1: Optional[str] = Field(None, description="SHA1 fingerprint", title="SHA1 Fingerprint")+ fingerprint_sha256: Optional[str] = Field(None, description="SHA256 fingerprint", title="SHA256 Fingerprint")\ No newline at end of filediff --git a/flowsint-api/app/types/username.py b/flowsint-api/app/types/username.pynew file mode 100644index 00000000..03037b99--- /dev/null+++ b/flowsint-api/app/types/username.py@@ -0,0 +1,21 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Username(BaseModel):+ username: str = Field(..., description="Username or handle", title="Username")+ platform: Optional[str] = Field(None, description="Platform or service where username is used", title="Platform")+ display_name: Optional[str] = Field(None, description="Display name associated with username", title="Display Name")+ created_at: Optional[str] = Field(None, description="Account creation date", title="Creation Date")+ last_seen: Optional[str] = Field(None, description="Last activity timestamp", title="Last Seen")+ followers_count: Optional[int] = Field(None, description="Number of followers", title="Followers Count")+ following_count: Optional[int] = Field(None, description="Number of accounts being followed", title="Following Count")+ posts_count: Optional[int] = Field(None, description="Number of posts or content items", title="Posts Count")+ verified: Optional[bool] = Field(None, description="Whether account is verified", title="Verified")+ bio: Optional[str] = Field(None, description="User biography or description", title="Bio")+ location: Optional[str] = Field(None, description="User location", title="Location")+ website: Optional[str] = Field(None, description="User website URL", title="Website")+ avatar_url: Optional[str] = Field(None, description="Profile picture URL", title="Avatar URL")+ is_private: Optional[bool] = Field(None, description="Whether account is private", title="Is Private")+ is_suspended: Optional[bool] = Field(None, description="Whether account is suspended", title="Is Suspended")+ associated_emails: Optional[List[str]] = Field(None, description="Associated email addresses", title="Associated Emails")+ associated_phones: Optional[List[str]] = Field(None, description="Associated phone numbers", title="Associated Phones")\ No newline at end of filediff --git a/flowsint-api/app/types/weapon.py b/flowsint-api/app/types/weapon.pynew file mode 100644index 00000000..b1235983--- /dev/null+++ b/flowsint-api/app/types/weapon.py@@ -0,0 +1,28 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class Weapon(BaseModel):+ name: str = Field(..., description="Weapon name or identifier", title="Name")+ type: Optional[str] = Field(None, description="Type of weapon (malware, exploit, tool, etc.)", title="Type")+ category: Optional[str] = Field(None, description="Weapon category (ransomware, trojan, exploit, etc.)", title="Category")+ description: Optional[str] = Field(None, description="Weapon description", title="Description")+ first_seen: Optional[str] = Field(None, description="First time weapon was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time weapon was observed", title="Last Seen")+ is_active: Optional[bool] = Field(None, description="Whether weapon is currently active", title="Is Active")+ threat_level: Optional[str] = Field(None, description="Threat level assessment", title="Threat Level")+ targets: Optional[List[str]] = Field(None, description="Target platforms or systems", title="Targets")+ attack_vectors: Optional[List[str]] = Field(None, description="Attack vectors used", title="Attack Vectors")+ payload_type: Optional[str] = Field(None, description="Type of payload delivered", title="Payload Type")+ delivery_method: Optional[str] = Field(None, description="Method of delivery", title="Delivery Method")+ evasion_techniques: Optional[List[str]] = Field(None, description="Evasion techniques used", title="Evasion Techniques")+ persistence_mechanisms: Optional[List[str]] = Field(None, description="Persistence mechanisms", title="Persistence Mechanisms")+ command_control: Optional[List[str]] = Field(None, description="Command and control infrastructure", title="Command & Control")+ encryption_methods: Optional[List[str]] = Field(None, description="Encryption methods used", title="Encryption Methods")+ obfuscation_techniques: Optional[List[str]] = Field(None, description="Obfuscation techniques", title="Obfuscation Techniques")+ source: Optional[str] = Field(None, description="Source of weapon information", title="Source")+ analysis_report: Optional[str] = Field(None, description="Link to analysis report", title="Analysis Report")+ sample_hashes: Optional[List[str]] = Field(None, description="Sample file hashes", title="Sample Hashes")+ ioc_indicators: Optional[List[str]] = Field(None, description="Indicators of compromise", title="IOC Indicators")+ attribution: Optional[str] = Field(None, description="Attributed threat actor or group", title="Attribution")+ cve_references: Optional[List[str]] = Field(None, description="Related CVE references", title="CVE References")+ mitre_techniques: Optional[List[str]] = Field(None, description="MITRE ATT&CK techniques", title="MITRE Techniques")\ No newline at end of filediff --git a/flowsint-api/app/types/web_tracker.py b/flowsint-api/app/types/web_tracker.pynew file mode 100644index 00000000..25fe2e65--- /dev/null+++ b/flowsint-api/app/types/web_tracker.py@@ -0,0 +1,22 @@+from pydantic import BaseModel, Field+from typing import Optional, List++class WebTracker(BaseModel):+ tracker_id: str = Field(..., description="Unique tracker identifier", title="Tracker ID")+ name: Optional[str] = Field(None, description="Tracker name", title="Name")+ type: Optional[str] = Field(None, description="Type of tracker (analytics, advertising, etc.)", title="Type")+ domain: Optional[str] = Field(None, description="Domain where tracker is deployed", title="Domain")+ script_url: Optional[str] = Field(None, description="URL of tracking script", title="Script URL")+ company: Optional[str] = Field(None, description="Company providing the tracker", title="Company")+ purpose: Optional[str] = Field(None, description="Purpose of tracking", title="Purpose")+ data_collected: Optional[List[str]] = Field(None, description="Types of data collected", title="Data Collected")+ privacy_policy: Optional[str] = Field(None, description="Privacy policy URL", title="Privacy Policy")+ opt_out_url: Optional[str] = Field(None, description="Opt-out URL", title="Opt-out URL")+ first_seen: Optional[str] = Field(None, description="First time tracker was observed", title="First Seen")+ last_seen: Optional[str] = Field(None, description="Last time tracker was observed", title="Last Seen")+ is_active: Optional[bool] = Field(None, description="Whether tracker is currently active", title="Is Active")+ is_third_party: Optional[bool] = Field(None, description="Whether tracker is third-party", title="Is Third Party")+ cookie_duration: Optional[int] = Field(None, description="Cookie duration in days", title="Cookie Duration")+ gdpr_compliant: Optional[bool] = Field(None, description="Whether tracker is GDPR compliant", title="GDPR Compliant")+ source: Optional[str] = Field(None, description="Source of tracker information", title="Source")+ risk_level: Optional[str] = Field(None, description="Privacy risk level", title="Risk Level")\ No newline at end of filediff --git a/flowsint-api/requirements.txt b/flowsint-api/requirements.txtindex 330f8325..a9a9a89c 100644--- a/flowsint-api/requirements.txt+++ b/flowsint-api/requirements.txt@@ -1,32 +1,33 @@-fastapi==0.104.1-redis==5.0.1-celery==5.3.6-holehe==0.1.7-python-dotenv==1.0.0-uvicorn==0.24.0-sherlock-project==1.4.0-python-jose[cryptography]==3.4.0-requests==2.31.0-git+https://github.com/soxoj/maigret-python-whois==0.8.0-pydig==0.1.0-ghunt==1.0.0-ignorant==0.1.0-hibpwned==0.1.0-phonenumbers==8.13.27-pydantic[email]==2.5.0-neo4j==5.15.0-faker==20.1.0-sqlalchemy==2.0.23-psycopg2-binary==2.9.9+fastapi+redis+celery+holehe+python-dotenv+uvicorn+sherlock-project+python-jose[cryptography]+requests+python-whois+pydig+ghunt+ignorant+hibpwned+phonenumbers+pydantic[email]+neo4j+faker+sqlalchemy+psycopg2-binaryalembic==1.13.0-passlib[bcrypt]==1.7.4-sse-starlette==1.8.2-networkx==3.2.1-pydantic-neo4j==0.0.1-mistralai==0.0.12-beautifulsoup4==4.12.2-lxml==4.9.3-requests-random-user-agent==0.0.1-spacy==3.7.2-docker==6.1.3\ No newline at end of file+passlib[bcrypt]+sse-starlette+networkx+mistralai+beautifulsoup4+lxml+requests-random-user-agent+spacy+docker+git+https://github.com/soxoj/maigret+git+https://github.com/reconurge/recontrack.git+git+https://github.com/reconurge/reconcrawl.git\ No newline at end of filediff --git a/flowsint-app/src/renderer/index.html b/flowsint-app/src/renderer/index.htmlindex 153b424e..c41e6577 100644--- a/flowsint-app/src/renderer/index.html+++ b/flowsint-app/src/renderer/index.html@@ -1,11 +1,11 @@<!DOCTYPE html><html lang="en" theme="dark"><head>- <script+ <!-- <scriptcrossOrigin="anonymous"src="//unpkg.com/react-scan/dist/auto.global.js">- </script>+ </script> --><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" />diff --git a/flowsint-app/src/renderer/public/icon-full-size.png b/flowsint-app/src/renderer/public/icon-full-size.pngnew file mode 100644index 00000000..1cbc0600Binary files /dev/null and b/flowsint-app/src/renderer/public/icon-full-size.png differdiff --git a/flowsint-app/src/renderer/public/icon.ico b/flowsint-app/src/renderer/public/icon.icoindex 02d348a5..b3c416d6 100644Binary files a/flowsint-app/src/renderer/public/icon.ico and b/flowsint-app/src/renderer/public/icon.ico differdiff --git a/flowsint-app/src/renderer/public/icon.png b/flowsint-app/src/renderer/public/icon.pngindex 02d348a5..b3c416d6 100644Binary files a/flowsint-app/src/renderer/public/icon.png and b/flowsint-app/src/renderer/public/icon.png differdiff --git a/flowsint-app/src/renderer/public/icon2.png b/flowsint-app/src/renderer/public/icon2.pngnew file mode 100644index 00000000..378be523Binary files /dev/null and b/flowsint-app/src/renderer/public/icon2.png differdiff --git a/flowsint-app/src/renderer/public/icons/webtracker.svg b/flowsint-app/src/renderer/public/icons/webtracker.svgnew file mode 100644index 00000000..1988da2f--- /dev/null+++ b/flowsint-app/src/renderer/public/icons/webtracker.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-crosshair-icon lucide-crosshair"><circle cx="12" cy="12" r="10"/><line x1="22" x2="18" y1="12" y2="12"/><line x1="6" x2="2" y1="12" y2="12"/><line x1="12" x2="12" y1="6" y2="2"/><line x1="12" x2="12" y1="22" y2="18"/></svg>\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/chat/chat-history.tsx b/flowsint-app/src/renderer/src/components/chat/chat-history.tsxindex 29b75ce1..f3b7467a 100644--- a/flowsint-app/src/renderer/src/components/chat/chat-history.tsx+++ b/flowsint-app/src/renderer/src/components/chat/chat-history.tsx@@ -2,7 +2,7 @@ import { chatCRUDService } from '@/api/chat-service';import { useQuery } from '@tanstack/react-query';import { SkeletonList } from '../shared/skeleton-list';import { Button } from '../ui/button';-import { ArrowLeft, Trash, MessageSquare } from 'lucide-react';+import { ArrowLeft, Trash, MessageSquare, Sparkles } from 'lucide-react';import { Chat } from '@/types';import { useCallback } from 'react';import { formatDistanceToNow } from 'date-fns';@@ -51,7 +51,7 @@ const ChatHistory = ({ setView, deleteChatMutation, handleCreateNewChat }: { set<div className="relative mb-6"><div className="absolute inset-0 bg-gradient-to-r from-primary/20 to-primary/10 rounded-full blur-xl animate-pulse"></div><div className="relative bg-gradient-to-br from-primary/10 to-primary/5 rounded-full p-6 border border-primary/20">- <MessageSquare className="h-8 w-8 text-primary/60" />+ <Sparkles className="h-8 w-8 text-primary/60" /></div></div><div className="space-y-2 max-w-sm">diff --git a/flowsint-app/src/renderer/src/components/chat/chat-selector.tsx b/flowsint-app/src/renderer/src/components/chat/chat-selector.tsxdeleted file mode 100644index 6f19cd5d..00000000--- a/flowsint-app/src/renderer/src/components/chat/chat-selector.tsx+++ /dev/null@@ -1,144 +0,0 @@-import { Button } from "@/components/ui/button"-import { Badge } from "@/components/ui/badge"-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuItem,- DropdownMenuSeparator,- DropdownMenuTrigger-} from "@/components/ui/dropdown-menu"-import {- ChevronDown,- Plus,- Trash2,- MessageSquare,-} from "lucide-react"-import { useChat } from "@/hooks/use-chat"-import { useChatState } from "@/stores/use-chat-store"-import { formatDistanceToNow } from "date-fns"--interface ChatSelectorProps {- className?: string-}--export const ChatSelector = ({ className }: ChatSelectorProps) => {- const {- chats,- isLoadingChats,- createNewChat,- switchToChat,- } = useChat({- onContentUpdate: () => { },- onSuccess: () => { },- })-- const currentChatId = useChatState(s => s.currentChatId)- const handleCreateNewChat = () => {- createNewChat()- }-- const handleSwitchChat = (chatId: string) => {- switchToChat(chatId)- }-- const formatDate = (dateString?: string) => {- if (!dateString) return "Unknown"- try {- return formatDistanceToNow(new Date(dateString), { addSuffix: true })- } catch {- return "Unknown"- }- }-- if (isLoadingChats) {- return (- <div className={`flex items-center gap-2 ${className}`}>- <div className="w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" />- <span className="text-sm text-muted-foreground">Loading chats...</span>- </div>- )- }-- return (- <div className={`flex items-center gap-2 ${className}`}>- <DropdownMenu>- <DropdownMenuTrigger asChild>- <div>- <Button- variant="ghost"- size="sm"- className="h-8 px-2 gap-1 text-xs"- >- <MessageSquare className="h-3 w-3" />- <span className="max-w-[120px] truncate">- {currentChat?.title || "Select Chat"}- </span>- <ChevronDown className="h-3 w-3" />- </Button>- </div>- </DropdownMenuTrigger>- <DropdownMenuContent align="end" className="w-64">- <div className="px-2 py-1.5">- <div className="text-xs font-medium text-muted-foreground mb-2">- Chats ({chats.length})- </div>- </div>- <DropdownMenuSeparator />-- {chats.length === 0 ? (- <div className="px-2 py-3 text-center text-xs text-muted-foreground">- No chats yet- </div>- ) : (- chats.map((chat) => (- <DropdownMenuItem- key={chat.id}- onClick={() => handleSwitchChat(chat.id)}- className={`flex items-center justify-between px-2 py-1.5 cursor-pointer ${chat.id === currentChatId ? 'bg-accent' : ''- }`}- >- <div className="flex-1 min-w-0">- <div className="text-sm font-medium truncate">- {chat.title}- </div>- <div className="text-xs text-muted-foreground truncate">- {formatDate(chat.updated_at || chat.created_at)}- </div>- </div>- {chat.id === currentChatId && (- <Badge variant="secondary" className="text-xs">- Current- </Badge>- )}- </DropdownMenuItem>- ))- )}-- <DropdownMenuSeparator />-- <div className="flex gap-1 p-1">- <Button- variant="ghost"- size="sm"- onClick={handleCreateNewChat}- className="flex-1 h-8 text-xs"- >- <Plus className="h-3 w-3 mr-1" />- New Chat- </Button>- {currentChat && (- <Button- variant="ghost"- size="sm"- onClick={handleDeleteCurrentChat}- className="h-8 w-8 p-0 text-destructive hover:text-destructive"- >- <Trash2 className="h-3 w-3" />- </Button>- )}- </div>- </DropdownMenuContent>- </DropdownMenu>- </div>- )-}\ No newline at end of filediff --git a/flowsint-app/src/renderer/src/components/chat/floating-chat.tsx b/flowsint-app/src/renderer/src/components/chat/floating-chat.tsxindex 9bfde82b..cbd1f054 100644--- a/flowsint-app/src/renderer/src/components/chat/floating-chat.tsx+++ b/flowsint-app/src/renderer/src/components/chat/floating-chat.tsx@@ -89,10 +89,13 @@ function FloatingChat() {{!isOpenChat &&<div className="fixed bottom-12 right-4 z-10"><Button- className='h-12 w-12 rounded-full'+ className='h-16 w-16 rounded-full bg-card border border-border bg-opacity-100'+ variant="outline"onClick={toggleChat}>- <Sparkles className='!h-5 !w-5' />+ {/* <Sparkles className='!h-5 !w-5' /> */}+ <img src="/icon.png" alt="Flowsint" className="h-12 w-12 object-cover" />+</Button></div>}@@ -176,8 +179,8 @@ function FloatingChat() {<><div className="relative mb-6"><div className="absolute inset-0 bg-gradient-to-r from-primary/20 to-primary/10 rounded-full blur-xl animate-pulse"></div>- <div className="relative bg-gradient-to-br from-primary/10 to-primary/5 rounded-full p-6 border border-primary/20">- <Sparkles className="h-8 w-8 text-primary/60" />+ <div className="relative bg-gradient-to-br from-primary/10 to-primary/5 rounded-full p-4 border border-primary/20">+ <img src="/icon.png" alt="Flowsint" className="h-12 w-12 object-cover" /></div></div><div className="space-y-2 max-w-sm">@@ -287,9 +290,9 @@ const ChatMessageComponent = ({ message }: { message: ChatMessage }) => {)}><div className={cn("bg-muted-foreground/5 max-w-[80%] border border-border","p-1 rounded-lg",- "flex flex-col items-end"+ "flex flex-col items-end overflow-x-hidden")}>- {message?.context && message.context.length > 0 && <div className='flex items-center justify-end mb-2'><ContextList context={message.context} /></div>}+ {message?.context && message.context.length > 0 && <div className='flex items-center w-full overflow-x-auto justify-end mb-2'><ContextList context={message.context} /></div>}<span className='px-3'><MemoizedMarkdown id={message.id} content={message.content} /></span></div></div >)diff --git a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsxindex 1a2658ec..b9bb5c32 100644--- a/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/graph-panel.tsx@@ -18,6 +18,8 @@ import MapPanel from '../map/map-panel'const GraphReactForce = lazy(() => import('./graph-react-force'))const Graph = lazy(() => import('./graph'))+const NODE_COUNT_THRESHOLD = 1000;+// Separate component for the drag overlayconst DragOverlay = memo(({ isDragging }: { isDragging: boolean }) => (@@ -127,7 +129,7 @@ const GraphPanel = ({ graphData, isLoading, isRefetching }: GraphPanelProps) =></div>}>{/* <Graph /> */}- {nodes?.length > 500 ? (+ {nodes?.length > NODE_COUNT_THRESHOLD ? (<>{view === "table" && <NodesTable />}{["force", "hierarchy"].includes(view) && <Graph />}{view === "map" && <MapPanel />}diff --git a/flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsx b/flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsxindex 5a8ee02f..5afd014a 100644--- a/flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/graph-react-force.tsx@@ -12,7 +12,7 @@ interface GraphReactForceProps {style?: React.CSSProperties;}-const NODE_COUNT_THRESHOLD = 500;+const NODE_COUNT_THRESHOLD = 10;const GraphReactForce: React.FC<GraphReactForceProps> = () => {const nodes = useGraphStore(s => s.nodes) as GraphNode[];diff --git a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsxindex d971e24c..057d0ca2 100644--- a/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx+++ b/flowsint-app/src/renderer/src/components/graphs/wall/custom/custom-node.tsx@@ -14,7 +14,7 @@ export const CustomNode = memo(({ data, selected, id }: NodeProps) => {return (- <div className="xy-node -z-[5000] relative p-1 flex flex-col justify-center items-center !rounded-full h-20">+ <div className="xy-node -z-[5000] -w-[160px] relative p-1 flex flex-col justify-center items-center !rounded-full h-20"><Handle type="target" position={Position.Top} id="a" className="opacity-0 group-hover:opacity-100" /><Handle type="target" position={Position.Right} id="b" className="opacity-0 group-hover:opacity-100" /><Handle type="source" position={Position.Bottom} id="c" className="opacity-0 group-hover:opacity-100" />@@ -31,7 +31,7 @@ export const CustomNode = memo(({ data, selected, id }: NodeProps) => {/></div><div- className="text-nowrap text-center max-w-[160px] text-ellipsis truncate"+ className="text-nowrap text-center text-ellipsis truncate"style={{fontSize: 11,color: (selected || isCurrent(id)) ? "#f97316" : "#94a3b8",diff --git a/flowsint-app/src/renderer/src/components/map/map.tsx b/flowsint-app/src/renderer/src/components/map/map.tsxindex 499e4644..5de9231c 100644--- a/flowsint-app/src/renderer/src/components/map/map.tsx+++ b/flowsint-app/src/renderer/src/components/map/map.tsx@@ -141,17 +141,53 @@ export const MapFromAddress: React.FC<MapFromAddressProps> = ({// Show loading if geocoding is in progressif (geocodeQuery.isLoading) {- return <div className="p-3"><p>Loading map…</p></div>;+ return (+ <div className="h-full w-full flex items-center justify-center">+ <div className="text-center space-y-3">+ <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"></div>+ <p className="text-muted-foreground">Loading map data...</p>+ </div>+ </div>+ );}// Show error if geocoding failedif (geocodeQuery.isError) {- return <div className="p-3"><p>Could not find some addresses.</p></div>;+ return (+ <div className="h-full w-full flex items-center justify-center">+ <div className="text-center space-y-3">+ <div className="w-12 h-12 bg-destructive/10 rounded-full flex items-center justify-center mx-auto">+ <svg className="w-6 h-6 text-destructive" fill="none" stroke="currentColor" viewBox="0 0 24 24">+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z" />+ </svg>+ </div>+ <div>+ <p className="font-medium text-foreground">Unable to load map</p>+ <p className="text-sm text-muted-foreground">Could not find some addresses.</p>+ </div>+ </div>+ </div>+ );}// Don't render if we don't have any valid coordinatesif (validCoordinates.length === 0) {- return <div className="p-3"><p>No valid coordinates provided.</p></div>;+ return (+ <div className="h-full w-full flex items-center justify-center">+ <div className="text-center space-y-3">+ <div className="w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto">+ <svg className="w-6 h-6 text-muted-foreground" fill="none" stroke="currentColor" viewBox="0 0 24 24">+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />+ </svg>+ </div>+ <div>+ <p className="font-medium text-foreground">No locations to display</p>+ <p className="text-sm text-muted-foreground">No valid coordinates provided.</p>+ </div>+ </div>+ </div>+ );}return <div id={mapId} style={{ minHeight: height, height: '100%', width: '100%' }} />;diff --git a/flowsint-app/src/renderer/src/stores/node-display-settings.ts b/flowsint-app/src/renderer/src/stores/node-display-settings.tsindex 8d070933..a6062de7 100644--- a/flowsint-app/src/renderer/src/stores/node-display-settings.ts+++ b/flowsint-app/src/renderer/src/stores/node-display-settings.ts@@ -40,6 +40,21 @@ export type ItemType =| "whois"| "gravatar"| "breach"+ | "webtracker"+ | "session"+ | "dns"+ | "ssl"+ | "message"+ | "malware"+ | "weapon"+ | "script"+ | "reputation"+ | "risk"+ | "file"+ | "bank"+ | "creditcard"+ | "alias"+ | "affiliation"export const ITEM_TYPES: ItemType[] = ["individual",@@ -78,47 +93,77 @@ export const ITEM_TYPES: ItemType[] = ["cidr","whois","gravatar",- "breach"+ "breach",+ "webtracker",+ "session",+ "dns",+ "ssl",+ "message",+ "malware",+ "weapon",+ "script",+ "reputation",+ "risk",+ "file",+ "bank",+ "creditcard",+ "alias",+ "affiliation"]const DEFAULT_COLORS: Record<ItemType, string> = {- individual: "#A9CCF4", // Notion medium blue- phone: "#A0D7CF", // Notion soft teal- location: "#EAAFAF", // Notion dusty rose- email: "#C4B9ED", // Notion lavender- ip: "#F0C19E", // Notion pale orange- socialprofile: "#D4A5D4", // Notion dusty violet- organization: "#D1C0AF", // Notion taupe- vehicle: "#E9CD89", // Notion wheat- car: "#D4C4A8", // Notion warm beige- motorcycle: "#C8B5A3", // Notion warm taupe- boat: "#B8D4E3", // Notion soft blue- plane: "#E2D1C3", // Notion light taupe- website: "#E7B8D2", // Notion dusty rose- domain: "#A6D0BF", // Notion sage- subdomain: "#9DCBE4", // Notion sky blue- document: "#C1C6CD", // Notion cool gray- financial: "#F4B8A8", // Notion coral- event: "#A2D4BF", // Notion mint- device: "#EAC597", // Notion peach- media: "#E4B1AD", // Notion terracotta- education: "#ABC0DA", // Notion steel blue- relationship: "#D9C2BC", // Notion dusty mauve- online_activity: "#B5D1A9", // Notion sage- digital_footprint: "#D9B0B0", // Notion brick- username: "#C7BEE4", // Notion periwinkle- credential: "#BDC4CA", // Notion medium gray- biometric: "#AEB3B9", // Notion slate gray- siret: "#ADB9C6", // Notion blue-gray- siren: "#9FAAB8", // Notion dark slate- cryptowallet: "#F7D154", // Notion gold- cryptotransaction: "#E6D4A0", // Notion warm yellow- cryptonft: "#D4E6A0", // Notion soft lime- asn: "#EAAFAF", // Notion warm peach- cidr: "#B8E6B8", // Notion soft mint- whois: "#D4B5D4", // Notion dusty lavender- gravatar: "#A8D8E8", // Notion pale blue- breach: "#E6B8B8" // Notion soft rose+ individual: "#A9CCF4", // medium blue+ phone: "#A0D7CF", // soft teal+ location: "#EAAFAF", // dusty rose+ email: "#C4B9ED", // lavender+ ip: "#F0C19E", // pale orange+ socialprofile: "#D4A5D4", // dusty violet+ organization: "#D1C0AF", // taupe+ vehicle: "#E9CD89", // wheat+ car: "#D4C4A8", // warm beige+ motorcycle: "#C8B5A3", // warm taupe+ boat: "#B8D4E3", // soft blue+ plane: "#E2D1C3", // light taupe+ website: "#E7B8D2", // dusty rose+ domain: "#A6D0BF", // sage+ subdomain: "#9DCBE4", // sky blue+ document: "#C1C6CD", // cool gray+ financial: "#F4B8A8", // coral+ event: "#A2D4BF", // mint+ device: "#EAC597", // peach+ media: "#E4B1AD", // terracotta+ education: "#ABC0DA", // steel blue+ relationship: "#D9C2BC", // dusty mauve+ online_activity: "#B5D1A9", // sage+ digital_footprint: "#D9B0B0", // brick+ username: "#C7BEE4", // periwinkle+ credential: "#BDC4CA", // medium gray+ biometric: "#AEB3B9", // slate gray+ siret: "#ADB9C6", // blue-gray+ siren: "#9FAAB8", // dark slate+ cryptowallet: "#F7D154", // gold+ cryptotransaction: "#E6D4A0", // warm yellow+ cryptonft: "#D4E6A0", // soft lime+ asn: "#EAAFAF", // warm peach+ cidr: "#B8E6B8", // soft mint+ whois: "#D4B5D4", // dusty lavender+ gravatar: "#A8D8E8", // pale blue+ breach: "#E6B8B8", // soft rose+ webtracker: "#F0E6A0", // warm yellow+ session: "#D4E6A0", // soft lime+ dns: "#B8E6B8", // soft mint+ ssl: "#E6D4A0", // warm yellow+ message: "#C4B9ED", // lavender+ malware: "#E6B8B8", // soft rose+ weapon: "#F4B8A8", // coral+ script: "#D4A5D4", // dusty violet+ reputation: "#A9CCF4", // medium blue+ risk: "#EAAFAF", // dusty rose+ file: "#C1C6CD", // cool gray+ bank: "#F7D154", // gold+ creditcard: "#E6D4A0", // warm yellow+ alias: "#D4A5D4", // dusty violet+ affiliation: "#A6D0BF" // sage}// Définition des icônes par défaut pour chaque type d'élément@@ -159,7 +204,22 @@ const DEFAULT_ICONS: Record<ItemType, string> = {cidr: "📡",whois: "🌐",gravatar: "🖼️",- breach: "🔓"+ breach: "🔓",+ webtracker: "🎯",+ session: "🔐",+ dns: "🌐",+ ssl: "🔒",+ message: "💬",+ malware: "🦠",+ weapon: "⚔️",+ script: "📜",+ reputation: "⭐",+ risk: "⚠️",+ file: "📁",+ bank: "🏦",+ creditcard: "💳",+ alias: "👤",+ affiliation: "🤝"};const DEFAULT_SIZES: Record<ItemType, number> = {@@ -199,7 +259,22 @@ const DEFAULT_SIZES: Record<ItemType, number> = {cidr: 10,whois: 6,gravatar: 7,- breach: 8+ breach: 8,+ webtracker: 7,+ session: 7,+ dns: 7,+ ssl: 7,+ message: 7,+ malware: 8,+ weapon: 8,+ script: 7,+ reputation: 7,+ risk: 8,+ file: 7,+ bank: 7,+ creditcard: 7,+ alias: 7,+ affiliation: 7}interface NodesDisplaySettingsState {diff --git a/flowsint-app/src/renderer/src/styles.css b/flowsint-app/src/renderer/src/styles.cssindex 08281465..aa9c1421 100644--- a/flowsint-app/src/renderer/src/styles.css+++ b/flowsint-app/src/renderer/src/styles.css@@ -664,7 +664,7 @@ html {--card-foreground: oklch(0.2686 0 0);--popover: oklch(1.0000 0 0);--popover-foreground: oklch(0.2686 0 0);- --primary: oklch(0.7686 0.1647 70.0804);+ --primary: oklch(0.6612 0.2003 37.74);--primary-foreground: oklch(0 0 0);--secondary: oklch(0.9670 0.0029 264.5419);--secondary-foreground: oklch(0.4461 0.0263 256.8018);@@ -713,7 +713,7 @@ html {--card-foreground: oklch(0.9219 0 0);--popover: oklch(0.2686 0 0);--popover-foreground: oklch(0.9219 0 0);- --primary: oklch(0.7686 0.1647 70.0804);+ --primary: oklch(0.6612 0.2003 37.74);--primary-foreground: oklch(0 0 0);--secondary: oklch(0.2686 0 0);--secondary-foreground: oklch(0.9219 0 0);@@ -911,163 +911,3 @@ th,animation: slideInFromBottomRight 0.3s ease-out forwards;transform-origin: bottom right;}--:root {- --background: oklch(0.9940 0 0);- --foreground: oklch(0 0 0);- --card: oklch(0.9940 0 0);- --card-foreground: oklch(0 0 0);- --popover: oklch(0.9911 0 0);- --popover-foreground: oklch(0 0 0);- --primary: oklch(0.7686 0.1647 70.0804);- --primary-foreground: oklch(1.0000 0 0);- --secondary: oklch(0.9540 0.0063 255.4755);- --secondary-foreground: oklch(0.1344 0 0);- --muted: oklch(0.9702 0 0);- --muted-foreground: oklch(0.4386 0 0);- --accent: oklch(0.9393 0.0288 266.3680);- --accent-foreground: oklch(0.5445 0.1903 259.4848);- --destructive: oklch(0.6290 0.1902 23.0704);- --destructive-foreground: oklch(1.0000 0 0);- --border: oklch(0.9300 0.0094 286.2156);- --input: oklch(0.9401 0 0);- --ring: oklch(0 0 0);- --chart-1: oklch(0.7459 0.1483 156.4499);- --chart-2: oklch(0.5393 0.2713 286.7462);- --chart-3: oklch(0.7336 0.1758 50.5517);- --chart-4: oklch(0.5828 0.1809 259.7276);- --chart-5: oklch(0.5590 0 0);- --sidebar: oklch(0.9777 0.0051 247.8763);- --sidebar-foreground: oklch(0 0 0);- --sidebar-primary: oklch(0 0 0);- --sidebar-primary-foreground: oklch(1.0000 0 0);- --sidebar-accent: oklch(0.9401 0 0);- --sidebar-accent-foreground: oklch(0 0 0);- --sidebar-border: oklch(0.9401 0 0);- --sidebar-ring: oklch(0 0 0);- --font-sans: Plus Jakarta Sans, sans-serif;- --font-serif: Lora, serif;- --font-mono: IBM Plex Mono, monospace;- --radius: 1rem;- --shadow-2xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);- --shadow-xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);- --shadow-sm: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);- --shadow: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);- --shadow-md: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16);- --shadow-lg: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16);- --shadow-xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16);- --shadow-2xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.40);- --tracking-normal: -0.025em;- --spacing: 0.27rem;-}--.dark {- --background: oklch(0.2223 0.0060 271.1393);- --foreground: oklch(0.9551 0 0);- --card: oklch(0.22 0.0060 271.1393);- --card-foreground: oklch(0.9551 0 0);- --popover: oklch(0.2568 0.0076 274.6528);- --popover-foreground: oklch(0.9551 0 0);- --primary: oklch(0.7686 0.1647 70.0804);- --primary-foreground: oklch(1.0000 0 0);- --secondary: oklch(0.2940 0.0130 272.9312);- --secondary-foreground: oklch(0.9551 0 0);- --muted: oklch(0.2940 0.0130 272.9312);- --muted-foreground: oklch(0.7058 0 0);- --accent: oklch(0.2795 0.0368 260.0310);- --accent-foreground: oklch(0.7857 0.1153 246.6596);- --destructive: oklch(0.7106 0.1661 22.2162);- --destructive-foreground: oklch(1.0000 0 0);- --border: oklch(0.3289 0.0092 268.3843);- --input: oklch(0.3289 0.0092 268.3843);- --ring: oklch(0.6132 0.2294 291.7437);- --chart-1: oklch(0.8003 0.1821 151.7110);- --chart-2: oklch(0.6132 0.2294 291.7437);- --chart-3: oklch(0.8077 0.1035 19.5706);- --chart-4: oklch(0.6691 0.1569 260.1063);- --chart-5: oklch(0.7058 0 0);- --sidebar: oklch(0.2011 0.0039 286.0396);- --sidebar-foreground: oklch(0.9551 0 0);- --sidebar-primary: oklch(0.6132 0.2294 291.7437);- --sidebar-primary-foreground: oklch(1.0000 0 0);- --sidebar-accent: oklch(0.2940 0.0130 272.9312);- --sidebar-accent-foreground: oklch(0.6132 0.2294 291.7437);- --sidebar-border: oklch(0.3289 0.0092 268.3843);- --sidebar-ring: oklch(0.6132 0.2294 291.7437);- --font-sans: Plus Jakarta Sans, sans-serif;- --font-serif: Lora, serif;- --font-mono: IBM Plex Mono, monospace;- --radius: 1em;- --shadow-2xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);- --shadow-xs: 0px 2px 3px 0px hsl(0 0% 0% / 0.08);- --shadow-sm: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);- --shadow: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 1px 2px -1px hsl(0 0% 0% / 0.16);- --shadow-md: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 2px 4px -1px hsl(0 0% 0% / 0.16);- --shadow-lg: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 4px 6px -1px hsl(0 0% 0% / 0.16);- --shadow-xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.16), 0px 8px 10px -1px hsl(0 0% 0% / 0.16);- --shadow-2xl: 0px 2px 3px 0px hsl(0 0% 0% / 0.40);-}--@theme inline {- --color-background: var(--background);- --color-foreground: var(--foreground);- --color-card: var(--card);- --color-card-foreground: var(--card-foreground);- --color-popover: var(--popover);- --color-popover-foreground: var(--popover-foreground);- --color-primary: var(--primary);- --color-primary-foreground: var(--primary-foreground);- --color-secondary: var(--secondary);- --color-secondary-foreground: var(--secondary-foreground);- --color-muted: var(--muted);- --color-muted-foreground: var(--muted-foreground);- --color-accent: var(--accent);- --color-accent-foreground: var(--accent-foreground);- --color-destructive: var(--destructive);- --color-destructive-foreground: var(--destructive-foreground);- --color-border: var(--border);- --color-input: var(--input);- --color-ring: var(--ring);- --color-chart-1: var(--chart-1);- --color-chart-2: var(--chart-2);- --color-chart-3: var(--chart-3);- --color-chart-4: var(--chart-4);- --color-chart-5: var(--chart-5);- --color-sidebar: var(--sidebar);- --color-sidebar-foreground: var(--sidebar-foreground);- --color-sidebar-primary: var(--sidebar-primary);- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);- --color-sidebar-accent: var(--sidebar-accent);- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);- --color-sidebar-border: var(--sidebar-border);- --color-sidebar-ring: var(--sidebar-ring);-- --font-sans: var(--font-sans);- --font-mono: var(--font-mono);- --font-serif: var(--font-serif);-- --radius-sm: calc(var(--radius) - 4px);- --radius-md: calc(var(--radius) - 2px);- --radius-lg: var(--radius);- --radius-xl: calc(var(--radius) + 4px);-- --shadow-2xs: var(--shadow-2xs);- --shadow-xs: var(--shadow-xs);- --shadow-sm: var(--shadow-sm);- --shadow: var(--shadow);- --shadow-md: var(--shadow-md);- --shadow-lg: var(--shadow-lg);- --shadow-xl: var(--shadow-xl);- --shadow-2xl: var(--shadow-2xl);-- --tracking-tighter: calc(var(--tracking-normal) - 0.05em);- --tracking-tight: calc(var(--tracking-normal) - 0.025em);- --tracking-normal: var(--tracking-normal);- --tracking-wide: calc(var(--tracking-normal) + 0.025em);- --tracking-wider: calc(var(--tracking-normal) + 0.05em);- --tracking-widest: calc(var(--tracking-normal) + 0.1em);-}--body {- letter-spacing: var(--tracking-normal);-}\ No newline at end of file