-
Notifications
You must be signed in to change notification settings - Fork 82
/
xosint
2137 lines (1836 loc) · 87.3 KB
/
xosint
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python3
from googlesearch import search # type: ignore
from smtplib import SMTP, SMTPRecipientsRefused, SMTPSenderRefused, SMTPResponseException
from email.mime.multipart import MIMEMultipart
import re
import os
import time
import socket
import requests
import ipaddress
import readline
import colorama
from colorama import *
from time import sleep
import sys
import json
from PIL import Image
from PIL.ExifTags import TAGS
import piexif
from prompt_toolkit import print_formatted_text, HTML
from pathlib import Path
import platform
from datetime import datetime
import phonenumbers # type: ignore
from phonenumbers import geocoder # type: ignore
import opencage
from bs4 import BeautifulSoup as bs
import tkinter as tk
from tkinter import messagebox
import webbrowser
import stripe # type: ignore
import tkinter as tk
from tkinter import filedialog, simpledialog, messagebox
from PIL import Image, ImageTk
import base64
from googleapiclient.discovery import build # type: ignore
import requests
from bs4 import BeautifulSoup
import webbrowser
from datetime import datetime, timedelta
from flask import Flask, request, render_template_string
import requests
from cryptography.fernet import Fernet # type: ignore
import subprocess
import shutil
##Code Analysis
def run_command(command):
"""Run a command in the shell and return its output."""
result = subprocess.run(command, shell=True, capture_output=True, text=True)
return result.stdout.strip(), result.stderr.strip()
def analyze_python_file(file_path):
"""Analyze a Python file for errors using pylint and flake8."""
print(f"\033[1;93m[+]\033[1;97m Analyzing Python file: {file_path}")
print("")
pylint_command = f"pylint {file_path}"
flake8_command = f"flake8 {file_path}"
pylint_output, pylint_errors = run_command(pylint_command)
flake8_output, flake8_errors = run_command(flake8_command)
if pylint_errors:
print(f"\033[1;91m[!]\033[1;97m Pylint errors:\n{pylint_errors}")
print("")
else:
print(f"\033[1;91m[+]\033[1;97m Pylint output:\n{pylint_output}")
if flake8_errors:
print(f"\033[1;91m[+]\033[1;97m Flake8 errors:\n{flake8_errors}")
else:
print(f"\033[1;91m[+]\033[1;97m Flake8 output:\n{flake8_output}")
def analyze_javascript_file(file_path):
"""Analyze a JavaScript file for errors using eslint."""
print(f"\033[1;91m[+]\033[1;97m Analyzing JavaScript file: {file_path}")
eslint_command = f"eslint {file_path}"
eslint_output, eslint_errors = run_command(eslint_command)
if eslint_errors:
print(f"\033[1;91m[+]\033[1;97m ESLint errors:\n{eslint_errors}")
else:
print(f"\033[1;91m[+]\033[1;97m ESLint output:\n{eslint_output}")
##Check for updates from GIthub Repo
##Fetchupdates
def get_latest_commit(repo_owner, repo_name):
url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/commits/master"
response = requests.get(url)
response.raise_for_status()
return response.json()['sha']
def get_local_commit():
result = subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True, text=True)
return result.stdout.strip()
def update_repo():
subprocess.run(['git', 'fetch', 'origin'], check=True)
subprocess.run(['git', 'reset', '--hard', 'origin/master'], check=True)
def copy_to_bin(script_name):
bin_path = '/usr/local/bin'
script_path = os.path.join(os.getcwd(), script_name)
target_path = os.path.join(bin_path, script_name)
if os.path.exists(script_path):
shutil.copy(script_path, target_path)
# Ensure the script is executable
os.chmod(target_path, 0o755)
else:
print(f"\033[1;91m[!]\033[1;97m Script {script_name} not found in the current directory.\033[0m")
def restart_script():
python = sys.executable
os.execl(python, python, *sys.argv)
def check_for_updates(repo_owner, repo_name, script_name):
try:
latest_commit = get_latest_commit(repo_owner, repo_name)
local_commit = get_local_commit()
if latest_commit != local_commit:
print("Update available. Updating...")
update_repo()
copy_to_bin(script_name)
restart_script()
else:
print("\033[1;91m[+]\033[1;97m Already up-to-date.")
except requests.RequestException as e:
print(f"\033[1;91m[!]\033[1;97m Failed to fetch latest commit: {e}")
except subprocess.CalledProcessError as e:
print(f"\033[1;91m[!]\033[1;97m Failed to update repo: {e}")
def update_script():
repo_owner = "TermuxHackz"
repo_name = "X-Osint"
script_name = "xosint"
# Check for updates
check_for_updates(repo_owner, repo_name, script_name)
# Your existing script logic here
print("\033[1;91m[+]\033[1;97m Running main script...")
time.sleep(0.5)
# Define the ImageSearchApp function
API_KEY_FILE = "api_keys.txt"
def save_api_keys(api_key, search_engine_id):
with open(API_KEY_FILE, "w") as f:
f.write(f"{api_key}\n{search_engine_id}")
def load_api_keys():
if os.path.exists(API_KEY_FILE):
with open(API_KEY_FILE, "r") as f:
keys = f.read().splitlines()
if len(keys) == 2:
return keys[0], keys[1]
return None, None
def image_hunt():
root = tk.Tk()
root.title("Reverse Image Search")
# Add title label
title_label = tk.Label(root, text="Reverse Image Search", font=("Arial", 18, "bold"))
title_label.pack(pady=10)
# Ask user if they want to watch a demo
response = messagebox.askquestion("Demo", "Kindly watch a video on how to get your API keys?")
if response == 'yes':
# Open YouTube video in web browser
webbrowser.open("https://youtu.be/g2WU0aFExMM")
# Add upload button
upload_button = tk.Button(root, text="Upload Image", command=lambda: upload_image(root), font=("Arial", 12, "bold"))
upload_button.pack(pady=20)
# Add image label
global image_label
image_label = tk.Label(root)
image_label.pack(pady=10)
# Add result label
global result_label
result_label = tk.Label(root, text="")
result_label.pack(pady=10)
root.protocol("WM_DELETE_WINDOW", lambda: on_closing(root))
root.mainloop()
def upload_image(root):
api_key, search_engine_id = load_api_keys()
if not api_key or not search_engine_id:
api_key = simpledialog.askstring("API Key", "Enter your Google Custom Search API Key:")
search_engine_id = simpledialog.askstring("Search Engine ID", "Enter your Google Custom Search Engine ID:")
if api_key and search_engine_id:
save_api_keys(api_key, search_engine_id)
else:
messagebox.showerror("Error", "API key and Search Engine ID are required.")
return
file_path = filedialog.askopenfilename(filetypes=[("Image files", "*.jpg *.png")])
if file_path:
try:
image = Image.open(file_path)
image = image.resize((400, 400), Image.LANCZOS)
photo = ImageTk.PhotoImage(image)
image_label.config(image=photo)
image_label.image = photo # Keep a reference to avoid garbage collection
google_results = reverse_image_search_google(api_key, search_engine_id, file_path)
show_results(google_results)
except Exception as e:
messagebox.showerror("Error", str(e))
def reverse_image_search_google(api_key, search_engine_id, image_path):
service = build("customsearch", "v1", developerKey=api_key)
with open(image_path, "rb") as image_file:
image_content = base64.b64encode(image_file.read()).decode('utf-8')
search_response = service.cse().list(
q='',
cx=search_engine_id,
searchType='image',
num=10
).execute()
results = []
if 'items' in search_response:
for item in search_response['items']:
results.append(item['link'])
return results
def show_results(google_results):
if google_results:
google_text = "Google Search Results:\n" + "\n".join(google_results[:5])
else:
google_text = "No Google search results found."
result_label.config(text=google_text)
def on_closing(root):
root.destroy()
exit()
###Add News OSint script here
def get_news_articles(query, api_key):
url = f'https://newsapi.org/v2/everything?q={query}&apiKey={api_key}'
response = requests.get(url)
if response.status_code == 200:
return response.json()['articles']
else:
print(f"Error: {response.status_code}")
return []
def newsOsint():
api_key = 'a701b803d0ac4fc89aaded6143de644d'
# Prompt the user to input a name
name = input("\033[1;91m[+]\033[1;97mEnter the name you want to search for: \033[0m")
# Fetch news articles related to the input name
articles = get_news_articles(name, api_key)
# Display the articles
if articles:
print(f"\nNews articles about {name}:\n")
for i, article in enumerate(articles, start=1):
print(f"{i}. {article['title']}")
print(f" Source: {article['source']['name']}")
print("")
print(f" Link: {article['url']}\n")
else:
print("No articles found.")
###Phone number Location
def get_api_keys():
if os.path.exists('numandcage_keys.txt'):
with open('numandcage_keys.txt', 'r') as file:
keys = file.readlines()
if len(keys) == 4:
ipqualityscore_api_key = keys[0].strip()
opencage_api_key = keys[1].strip()
vonage_api_key = keys[2].strip()
vonage_api_secret = keys[3].strip()
else:
ipqualityscore_api_key, opencage_api_key, vonage_api_key, vonage_api_secret = get_and_save_api_keys()
else:
ipqualityscore_api_key, opencage_api_key, vonage_api_key, vonage_api_secret = get_and_save_api_keys()
return ipqualityscore_api_key, opencage_api_key, vonage_api_key, vonage_api_secret
def get_and_save_api_keys():
while True:
ipqualityscore_api_key = input("\033[1;91m[\033[1;33;40m*\033[0m\033[1;91m] \033[1;97m Enter your IPQualityScore API key: \033[0m").strip()
opencage_api_key = input("\033[1;91m[\033[1;33;40m*\033[0m\033[1;91m] \033[1;97m Enter your OpenCage API key: \033[0m").strip()
vonage_api_key = input("\033[1;91m[\033[1;33;40m*\033[0m\033[1;91m] \033[1;97m Enter your Vonage API key: \033[0m").strip()
vonage_api_secret = input("\033[1;91m[\033[1;33;40m*\033[0m\033[1;91m] \033[1;97m Enter your Vonage API secret: \033[0m").strip()
if ipqualityscore_api_key and opencage_api_key and vonage_api_key and vonage_api_secret:
with open('numandcage_keys.txt', 'w') as file:
file.write(f"{ipqualityscore_api_key}\n{opencage_api_key}\n{vonage_api_key}\n{vonage_api_secret}")
return ipqualityscore_api_key, opencage_api_key, vonage_api_key, vonage_api_secret
else:
print("\033[1;91m[\033[1;33;40m!\033[0m\033[1;91m] \033[1;97m Please enter valid API keys. \033[0m")
def get_phone_info(phone_number, ipqualityscore_api_key, vonage_api_key, vonage_api_secret):
ipqualityscore_url = f"https://ipqualityscore.com/api/json/phone/{ipqualityscore_api_key}/{phone_number}"
response = requests.get(ipqualityscore_url)
ipqualityscore_info = response.json()
vonage_url = f"https://api.nexmo.com/ni/advanced/async/json"
vonage_params = {
'api_key': vonage_api_key,
'api_secret': vonage_api_secret,
'number': phone_number
}
response = requests.get(vonage_url, params=vonage_params)
vonage_info = response.json()
phone_info = {**ipqualityscore_info, **vonage_info} # Merge dictionaries
return phone_info
def get_location_info(country_code, location, opencage_api_key):
opencage_url = f"https://api.opencagedata.com/geocode/v1/json?q={location}&countrycode={country_code}&key={opencage_api_key}"
response = requests.get(opencage_url)
return response.json()
def is_valid_phone_number(phone_number):
# Basic validation to check if phone number includes a country code and is numeric
if phone_number.startswith('+') and phone_number[1:].isdigit():
return True
return False
def open_in_maps(latitude, longitude):
choice = input("\033[1;91m[\033[1;33;40m*\033[0m\033[1;91m] \033[1;97m Would you like to open the location in Google Maps or Apple Maps? (Enter 'google' or 'apple'): \033[0m").strip().lower()
if choice == 'google':
webbrowser.open(f"https://www.google.com/maps/search/?api=1&query={latitude},{longitude}")
elif choice == 'apple':
webbrowser.open(f"https://maps.apple.com/?q={latitude},{longitude}")
else:
print("Invalid choice. Skipping map opening.")
def phone_inf():
ipqualityscore_api_key, opencage_api_key, vonage_api_key, vonage_api_secret = get_api_keys()
while True:
print("")
phone_number = input("\033[1;91m[\033[1;33;40m+\033[0m\033[1;91m] \033[1;93m Enter the phone number (with country code, e.g., +1234567890): \033[0m").strip()
if is_valid_phone_number(phone_number):
break
else:
print("\033[1;91m[\033[1;33;40m!\033[0m\033[1;91m] \033[1;97mPlease enter a valid phone number with country code.")
phone_info = get_phone_info(phone_number, ipqualityscore_api_key, vonage_api_key, vonage_api_secret)
if phone_info.get('valid', False):
print("")
print(f"\033[1;91m➤\033[1;97mPhone Number : {phone_info.get('phone_number', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mCountry : {phone_info.get('country', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mLocation : {phone_info.get('location', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mCarrier : {phone_info.get('carrier', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mLine Type : {phone_info.get('line_type', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mRisk Score : {phone_info.get('risk_score', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mSpammer : {phone_info.get('spammer', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mActive : {phone_info.get('active', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mRecent Abuse : {phone_info.get('recent_abuse', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mFraud Score : {phone_info.get('fraud_score', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mPorted : {phone_info.get('ported', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mCaller Type : {phone_info.get('caller_type', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mCaller Name : {phone_info.get('caller_name', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mRoaming : {phone_info.get('roaming', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mReachable : {phone_info.get('reachable', 'N/A')}")
print("")
print(f"\033[1;91m➤\033[1;97mHandset Status : {phone_info.get('handset_status', 'N/A')}")
print("")
if phone_info.get('country_code', False) and phone_info.get('location', False):
location_info = get_location_info(phone_info['country_code'], phone_info['location'], opencage_api_key)
if location_info['results']:
location = location_info['results'][0]['geometry']
latitude = location['lat']
longitude = location['lng']
print(f"Latitude: {latitude}, Longitude: {longitude}")
# Ask the user if they want to open the location in maps
open_in_maps(latitude, longitude)
else:
print("Could not find location information.")
else:
print("Invalid phone number or failed to retrieve phone number information.")
####Second Method for Phone Number
def find_api_keys():
if os.path.exists('numandcage_keys.txt'):
with open('numandcage_keys.txt', 'r') as file:
keys = file.readlines()
if len(keys) == 2:
numverify_api_key = keys[0].strip()
opencage_api_key = keys[1].strip()
else:
numverify_api_key, opencage_api_key = find_and_save_keys()
else:
numverify_api_key, opencage_api_key = find_and_save_keys()
return numverify_api_key, opencage_api_key
def find_and_save_keys():
while True:
numverify_api_key = input("\033[1;91m[\033[1;33;40m+\033[0m\033[1;91m] \033[1;93m Enter your Numverify API key: \033[0m").strip()
opencage_api_key = input("\033[1;91m[\033[1;33;40m+\033[0m\033[1;91m] \033[1;93m Enter your OpenCage API key: \033[0m").strip()
if numverify_api_key and opencage_api_key:
with open('numandcage_keys.txt', 'w') as file:
file.write(f"{numverify_api_key}\n{opencage_api_key}")
return numverify_api_key, opencage_api_key
else:
print("\033[1;91m[\033[1;33;40m!\033[0m\033[1;91m] \033[1;93mPlease enter valid API keys.")
def find_phone_info(phone_number, numverify_api_key):
numverify_url = f"http://apilayer.net/api/validate?access_key={numverify_api_key}&number={phone_number}"
response = requests.get(numverify_url)
return response.json()
def find_location_info(country_code, location, opencage_api_key):
opencage_url = f"https://api.opencagedata.com/geocode/v1/json?q={location}&countrycode={country_code}&key={opencage_api_key}"
response = requests.get(opencage_url)
return response.json()
def phone_inf2():
numverify_api_key, opencage_api_key = find_api_keys()
phone_number = input("\033[1;97m[+]\033[0m\033[1;91m Enter the phone number: \033[0m")
print("")
phone_info = find_phone_info(phone_number, numverify_api_key)
if phone_info['valid']:
print(f"\033[1;91m➤\033[1;97mPhone Number : {phone_info['international_format']}")
print("")
print(f"\033[1;91m➤\033[1;97mCountry : {phone_info['country_name']}")
print("")
print(f"\033[1;91m➤\033[1;97m Valid : {phone_info['valid']}")
print("")
print(f"\033[1;91m➤\033[1;97mLocation : {phone_info['location']}")
print("")
print(f"\033[1;91m➤\033[1;97mCarrier : {phone_info['carrier']}")
print("")
print(f"\033[1;91m➤\033[1;97mLine Type : {phone_info['line_type']}")
print("")
print(f"\033[1;91m➤\033[1;97mCountry Prefix : {phone_info['country_prefix']}")
print("")
print(f"\033[1;91m➤\033[1;97mLocal format : {phone_info['local_format']}")
print("")
print(f"\033[1;91m➤\033[1;97mCountry Code : {phone_info['country_code']}")
print("")
location_info = find_location_info(phone_info['country_code'], phone_info['location'], opencage_api_key)
if location_info['results']:
location = location_info['results'][0]['geometry']
print(f"Latitude: {location['lat']}, Longitude: {location['lng']}")
else:
print("Could not find location information.")
else:
print("Invalid phone number.")
RED = "\033[91m"
GREEN = "\033[92m"
BLUE = "\033[94m"
WHITE = "\033[0;37m"
class bcolors:
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
BOLD = '\033[1m'
ENDC = '\033[0m'
class colors:
CRED2 = "\33[91m"
CBLUE2 = "\33[94m"
ENDC = "\033[0m"
now = datetime.now()
current_time = now.strftime("%H:%M:%S")
tookie_banner = ("""\033[32m
,,,,,
╓▄▓▓▓███████████▓▓▓▄╥
▄▓███▓▀╨╙└ └╙╙▀▓███▌▄
▄▓██▓╨─ ,▄▄▄▌▓▓▌▌▄▄╥, ╙▀██▓▄
Φ██▓╨ ╔ ╓▄▓▓▀▀╙├,,,,,,,├╙▀█▓▄ ╙▓██▌
▄██▓└ ╓▓██▄,=░░░░░░░░░░░░░░»└▓█─ └▓██▄
,▓██╨ æ ╓▓█▀┤░░░▒▒▄╣╣▓╣╣▒▒▒▒▒░░▄▓██▄ ╙██▓
╒███ ,▓█╬░░░░░░╫▓██▀▀▀██▓╬╠╠╫██└ ╙██⌐ ^███
███ ╓ ╔█▓╟╣╬░░░▒╫▓█╜]▄╫█▄╫█▓╬▓█▀ ▓█─ ███
▓██ ▐████╬░░░╚╙╠╫█Q'╝█▓┌╫█▓██▄░ █▌ ╚██▌
]██▌ φ─ ▀▓█▓▒▒▄╠▒»,╔▒╬██▓▌▓██▓█▌╙▓▓▌▄▄░ █▌ ███
╫██Γ ██╠▓▓▓▒▒▒▒ ▒▒╬╬╩▒╫▓█▌ ╓▓██▒╫█⌐ ▓██
╫██µ ╫█▓███▒▒▒▒▒▒▒▒▒▒╣╬▒▒╠▓██▓▓██▀ ███╙ ╙▀ ╫██
╟██▄ " ▀███╬▓██▒▒▒▓▒▒▒▒╩▓▓▓▄╠▓████▌ ▀╙ ⁿ ███
███ ~ .██╬▓█▓████▒▒▒▒▒▒▒╣▓█████████, ªÆ ]██▓
▓██▄ , ╫█████▓╬▓██▒▒▓▓▒▒▒▓▒╠╬▀▓▓▓████µ ╓µ ███
███▄ └` ▄███▓███████████▓▓█▓▒▒▒▓▌▒▒███┴ ▓██▀
███▄ ╟███████▓╬█▓╬╬╣████▓██▓▓████████µ ,███▀
▀███┬▐███████████▓▓███████████▓█▓▓███ ▄███Γ
└██████▓▓███████████████▓██▓▓███████▒▄███▀
└▓███████▓▓▓██▓▓████▓▓███████████████▀
▀██████████████████████████████▀╙
╙▀██████████████████████▀▀─
╙╙▀▀▓███████▀▀▀╙└
\033[0m""")
banner = ("""\033[38;5;208m
▒██ ██▒ ▒█████ ██████ ██▓ ███▄ █ ▄▄▄█████▓
▒▒ █ █ ▒░▒██▒ ██▒▒██ ▒ ▓██▒ ██ ▀█ █ ▓ ██▒ ▓▒
░░ █ ░▒██░ ██▒░ ▓██▄ ▒██▒▓██ ▀█ ██▒▒ ▓██░ ▒░
░ █ █ ▒ ▒██ ██░ ▒ ██▒░██░▓██▒ ▐▌██▒░ ▓██▓ ░
▒██▒ ▒██▒░ ████▓▒░▒██████▒▒░██░▒██░ ▓██░ ▒██▒ ░
▒▒ ░ ░▓ ░░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░░▓ ░ ▒░ ▒ ▒ ▒ ░░
░░ ░▒ ░ ░ ▒ ▒░ ░ ░▒ ░ ░ ▒ ░░ ░░ ░ ▒░ ░
░ ░ ░ ░ ░ ▒ ░ ░ ░ ▒ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░
\033[1;37mAn Open Source Intelligence Framework
Created by: AnonyminHack5
Team: TermuxHackz Society\033[0m
Version: \033[1;92m2.2\033[0m
\033[1;97mPlatform: \033[0m\033[1;96m""" + platform.system())
for col in banner:
print(colors.CRED2 + col, end="")
sys.stdout.flush()
time.sleep(0.0025)
main_menu = ("""
\033[1;91m[??] Choose an option:
\033[1;91m[\033[1;33;40m1\033[0m\033[1;91m] \033[1;97m IP Address Information
\033[1;91m[\033[1;33;40m2\033[0m\033[1;91m] \033[1;97m Email Address Information
\033[1;91m[\033[1;33;40m3\033[0m\033[1;91m] \033[1;97m Get Location from Image \033[1;91m[\033[1;92mNEW!\033[0m\033[1;91m]
\033[1;91m[\033[1;33;40m4\033[0m\033[1;91m] \033[1;97m Host Search
\033[1;91m[\033[1;33;40m5\033[0m\033[1;91m] \033[1;97m Ports
\033[1;91m[\033[1;33;40m6\033[0m\033[1;91m] \033[1;97m Exploit CVE
\033[1;91m[\033[1;33;40m7\033[0m\033[1;91m] \033[1;97m Exploit Open Source Vulnerability Database
\033[1;91m[\033[1;33;40m8\033[0m\033[1;91m] \033[1;97m DNS Lookup
\033[1;91m[\033[1;33;40m9\033[0m\033[1;91m] \033[1;97m DNS Reverse
\033[1;91m[\033[1;33;40m10\033[0m\033[1;91m] \033[1;97mEmail Finder
\033[1;91m[\033[1;33;40m11\033[0m\033[1;91m] \033[1;97mExtract Metadata from image
\033[1;91m[\033[1;33;40m12\033[0m\033[1;91m]\033[1;97m Check Twitter Status
\033[1;91m[\033[1;33;40m13\033[0m\033[1;91m]\033[1;97m Subdomain Enumeration
\033[1;91m[\033[1;33;40m14\033[0m\033[1;91m]\033[1;97m Google Dork Hacking
\033[1;91m[\033[1;33;40m15\033[0m\033[1;91m]\033[1;97m SMTP Analysis
\033[1;91m[\033[1;33;40m16\033[0m\033[1;91m]\033[1;97m Check Global InfoStealer Attack \033[1;91m[\033[1;92mNEW!\033[0m\033[1;91m]
\033[1;91m[\033[1;33;40m17\033[0m\033[1;91m]\033[1;97m Dark Web Search
\033[1;91m[\033[1;33;40m18\033[0m\033[1;91m]\033[38;5;208m Next Tools >
\033[1;91m[\033[1;33;40m19\033[0m\033[1;91m]\033[1;97m Report bugs
\033[1;91m[\033[1;33;40m99\033[0m\033[1;91m]\033[1;97m Update X-osint
\033[1;91m[\033[1;33;40m100\033[0m\033[1;91m]\033[1;97m About
\033[1;91m[\033[1;33;40m00\033[0m\033[1;91m]\033[1;97m Quit
""")
about = """\033[1;90m
This is an osint tool which gathers useful and yet credible valid information about a phone number, user email address and ip address, \nVIN, Protonmail account and so much more, X-osint is an Open source intelligence framework, \nfeel free to clone this repo, if you have features you would like to add or any fixes please open an issue or create a merge
\033[0m"""
def traceip():
targetip = input("\033[1;91mEnter IP Address: \033[0m")
r = requests.get("http://ip-api.com/json/" + targetip)
print("\n\033[1;91m[*]\033[1;97m IP detail is given down below\n")
#print()
sleep(0.1)
print("\033[1;92m \033[1;91m➤\033[1;97m Status Code : " + str(r.status_code))
sleep(0.1)
if str(r.json() ['status']) == 'success':
print(" \033[1;91m➤\033[1;97m Status :\033[1;92m " + str(r.json() ['status']))
sleep(0.1)
elif str(r.json() ['status']) == 'fail':
print(" \033[1;91m➤\033[1;97m Status :\033[1;97m " + str(r.json() ['status']) + '\033[1;92m')
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Message : " + str(r.json() ['message']))
sleep(0.1)
if str(r.json() ['message']) == 'invalid query':
print('\n\033[1;91m[!] \033[1;97m' + targetip + ' is an invalid IP Address, So you can try another IP Address.\n')
exit()
elif str(r.json() ['message']) == 'private range':
print('\n\033[1;91m[!] \033[1;97m' + targetip + ' is a private IP Address, So This IP can not be traced.\n')
exit()
elif str(r.json() ['message']) == 'reserved range':
print('\n\033[1;91m[!] \033[1;97m' + targetip + ' is a reserved IP Address, So This IP can not be traced.\n')
exit()
else:
print('\nCheck your internet connection.\n')
exit()
print("\033[1;92m \033[1;91m➤\033[1;97m Target IP : " + str(r.json() ['query'] ))
sleep(0.1)
print("\033[1;92m \033[1;91m➤\033[1;97m Country: : " + str(r.json() ['country'] ))
sleep(0.1)
print(" \033[1;92m\033[1;97m➤\033[1;97m Country Code : " + str(r.json() ['countryCode']))
sleep(0.1)
print(" \033[1;92m\033[1;97m➤\033[1;97m City : " + str(r.json() ['city']))
sleep(0.1)
print(" \033[1;92m\033[1;97m➤\033[1;97m Timezone : " + str(r.json() ['timezone']))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Region Name : " + str(r.json() ['regionName'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Region : " + str(r.json() ['region'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m ZIP Code : " + str(r.json() ['zip'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Latitude : " + str(r.json() ['lat'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Longitude : " + str(r.json() ['lon'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m ISP : " + str(r.json() ['isp'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Organization : " + str(r.json() ['org'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m AS : " + str(r.json() ['as'] ))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Location : " + str(r.json() ['lat']) + ',' + str(r.json() ['lon']))
sleep(0.1)
print(" \033[1;91m➤\033[1;97m Google Map : \033[1;94mhttps://maps.google.com/?q=" + str(r.json() ['lat']) + ',' + str(r.json() ['lon']))
sleep(0.1)
print()
mapaddress = input("\033[1;91m[*]\033[1;97m Press ENTER To Open Location on Google maps or press any other key to quit: ")
if mapaddress == "":
print()
print("[*] Opening Location on google map")
print()
os.system("xdg-open https://maps.google.com/?q=" + str(r.json() ['lat']) + ',' + str(r.json() ['lon']) + " > /dev/null 2>&1")
print()
else:
print()
print("[*] Aborting.....")
print()
##Payment Support
stripe.api_key = "sk_test_51PPJGRHFUeNFgW9qtt7XLXIZZxuFRfkdoXXOqDY9gHGWlzo4ODBuqnnOTHLKDDop5OJMhC5YdLaqO3McPnrPbfd800mcey87nX"
def create_checkout_session():
try:
session = stripe.checkout.Session.create(
payment_method_types=['card'],
line_items=[{
'price_data': {
'currency': 'usd', # Fixed currency
'product_data': {
'name': 'Support Script',
},
'unit_amount': 500, # Amount in cents ($5.00)
},
'quantity': 1,
}],
mode='payment',
success_url='http://127.0.0.1:5000/success',
cancel_url='http://127.0.0.1:5000/cancel',
)
return session.url
except stripe.error.StripeError as e:
print(e)
return None
def open_browser():
session_url = create_checkout_session()
if session_url:
webbrowser.open(session_url)
root.quit()
def close_popup():
popup_window.destroy()
root.quit()
def show_support_popup():
global root, popup_window
root.withdraw() # Hide the root window
popup_window = tk.Toplevel()
popup_window.title("Support Script")
label = tk.Label(popup_window, text="Would you like to pay to support this script?, \nThis is to ensure X-osint works well, and if it doesnt its because you didnt support the tool \n\n Payments are secured and encrypted through Stripe")
label.pack(pady=10)
yes_button = tk.Button(popup_window, text="Yes", command=open_browser)
yes_button.pack(side=tk.LEFT, padx=10)
no_button = tk.Button(popup_window, text="No", command=close_popup)
no_button.pack(side=tk.RIGHT, padx=10)
root.mainloop()
###email address information gathering
def email_info():
mailid = input("\033[1;91mEnter email address: \033[1;94m")
if not re.match(r"[^@]+@[^@]+\.[^@]+", mailid):
print("Please input a valid Email Address!")
return
eml = requests.get("https://ipqualityscore.com/api/json/email/lPnx5AhAUv4jgIFDXquYpe8CVBjmaTii/" + mailid)
if str(eml.json()['success']) == "False":
print(eml.json()['message'])
return
print()
sleep(1)
print()
print("\033[1;91m[~]\033[1;97m E-mail Details are given down below")
print()
print("\033[1;91m➤\033[1;97m Target E-mail : " + str(mailid) )
sleep(0.1)
print("\033[1;91m➤\033[1;97m Status Code : " + str(eml.status_code) )
sleep(0.1)
print("\033[1;91m➤\033[1;97m Valid : " + str(eml.json() ['valid']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Catch All : " + str(eml.json() ['catch_all']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Common : " + str(eml.json() ['common']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Deliverability : " + str(eml.json() ['deliverability']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Disposable : " + str(eml.json() ['disposable']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m DNS Valid : " + str(eml.json() ['dns_valid']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Fraud Score : " + str(eml.json() ['fraud_score']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Frequent Complainer : " + str(eml.json() ['frequent_complainer']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Generic : " + str(eml.json() ['generic']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Honeypot : " + str(eml.json() ['honeypot']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Leaked : " + str(eml.json() ['leaked']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Message : " + str(eml.json() ['message']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Over All Score : " + str(eml.json() ['overall_score']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Recent Abuse : " + str(eml.json() ['recent_abuse']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Request ID : " + str(eml.json() ['request_id']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Sanitized E-mail : " + str(eml.json() ['sanitized_email']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m SMTP Score : " + str(eml.json() ['smtp_score']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Spam Trap Score : " + str(eml.json() ['spam_trap_score']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Success : " + str(eml.json() ['success']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Suggested Domain : " + str(eml.json() ['suggested_domain']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Suspect : " + str(eml.json() ['suspect']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Timed Out : " + str(eml.json() ['timed_out']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m First Name : " + str(eml.json() ['first_name']))
sleep(0.1)
print()
print("\033[1;91m[~]\033[1;94m Domain Age")
print()
sleep(0.1)
print("\033[1;91m➤\033[1;97m Human : " + str(eml.json() ['domain_age'] ['human']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m ISO : " + str(eml.json() ['domain_age'] ['iso']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Time Stamp : " + str(eml.json() ['domain_age'] ['timestamp']))
sleep(0.1)
print()
print("\033[1;91m[~]\033[1;94m First Seen")
print()
sleep(0.1)
print("\033[1;91m➤\033[1;97m Human : " + str(eml.json() ['first_seen'] ['human']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m ISO : " + str(eml.json() ['first_seen'] ['iso']))
sleep(0.1)
print("\033[1;91m➤\033[1;97m Time Stamp : " + str(eml.json() ['first_seen'] ['timestamp']))
sleep(0.1)
print()
### Phone number info
def get_decimal_from_dms(dms, ref):
degrees = dms[0][0] / dms[0][1]
minutes = dms[1][0] / dms[1][1] / 60.0
seconds = dms[2][0] / dms[2][1] / 3600.0
decimal = degrees + minutes + seconds
if ref == "S" or ref == "W":
decimal = -decimal
return decimal
def extract_gps_info(image_path):
if not os.path.exists(image_path):
print(f"The file {image_path} does not exist.")
return None
img = Image.open(image_path)
exif_data = piexif.load(img.info['exif'])
gps_data = exif_data.get("GPS", None)
if not gps_data:
print("No GPS information found in the image...sorry, try another hehe")
return None
gps_latitude = gps_data.get(piexif.GPSIFD.GPSLatitude)
gps_latitude_ref = gps_data.get(piexif.GPSIFD.GPSLatitudeRef).decode()
gps_longitude = gps_data.get(piexif.GPSIFD.GPSLongitude)
gps_longitude_ref = gps_data.get(piexif.GPSIFD.GPSLongitudeRef).decode()
if not all([gps_latitude, gps_latitude_ref, gps_longitude, gps_longitude_ref]):
print("Incomplete GPS information found in the image.")
return None
lat = get_decimal_from_dms(gps_latitude, gps_latitude_ref)
lon = get_decimal_from_dms(gps_longitude, gps_longitude_ref)
return lat, lon
def open_map(lat, lon):
map_url = f"https://www.google.com/maps?q={lat},{lon}"
webbrowser.open(map_url)
print(f"Opened map at {lat}, {lon}")
#### Update script
def update():
os.system("clear")
print(banner)
print()
print("\033[1;91m➤\033[1;97m Searching for updates...-> \033[0m\033[1;94mFound")
sleep(0.1)
print("\033[1;91m➤\033[1;97m Updating.. \033[0m")
sleep(0.1)
print()
print()
print("\033[1;91m\tSelect your terminal for update \033[0m\n")
print("\033[1;91m\t[!] PLEASE MAKE SURE YOU CHOOSE CORRECTLY [!] \033[0m\n\n")
print("\033[1;34m\t\t[\033[0m\033[1;77m1\033[0m\033[1;34m]\033[0m\033[1;93mTermux\033[0m")
print("\033[1;34m\t\t[\033[0m\033[1;77m2\033[0m\033[1;34m]\033[0m\033[1;93mLinux\033[0m\n")
update_terminal = input("\033[1;94mChoose: \033[0m")
if update_terminal == "1":
print("\033[1;97m[+] Updating for termux......\033[0m")
print()
sleep(0.1)
os.system("cd $HOME")
os.system("cd $PREFIX/bin && rm xosint")
print("\033[1;97m[+] Validating installation....\033[0m\n")
sleep(0.1)
path_to_file = '/$PREFIX/bin/xosint'
path = Path(path_to_file)
if path.is_file():
print(f'The file {path_to_file} exists, Validation failed, Kindly update manually')
time.sleep(1)
exit()
else:
print(f'The file {path_to_file} doesnt exists, Validation Successful')
time.sleep(0.5)
print("\033[1;91m[!]\033[0m\033[1;97mAutomatic update Completed\0330m\n")
time.sleep(0.9)
os.system("cd $HOME")
os.system("git clone https://github.com/TermuxHackz/X-osint")
print("\033[1;97m[+] Granting permissions.....\033[0m\n")
os.system("cd $HOME && cd X-osint")
os.system("chmod +x *")
sleep(0.5)
print("\033[1;97m[+] Preparing Setup file.....\033[0m\n")
sleep(0.5)
print("\033[1;97m[+] Setup file ready!!.....Starting in 2s...\033[0m\n")
print("\033[1;97m[+] Update completed.....\033[0m\n")
sleep(2)
os.system("cd $HOME ")
os.system("cd X-osint && bash setup.sh")
elif update_terminal == "2":
print("\033[1;97m[+] Updating for linux......\033[0m")
print()
sleep(0.1)
os.system("cd $HOME")
os.system("cd /usr/local/bin && sudo rm xosint")
print("\033[1;97m[+] Validating installation....\033[0m\n")
sleep(0.5)
path_to_file = '/usr/local/bin/xosint'
path = Path(path_to_file)
if path.is_file():
print(f'The file {path_to_file} exists, Validation failed, Kindly update manually')
time.sleep(1)
exit()
else:
os.system("cd $HOME")
os.system("git clone https://github.com/TermuxHackz/X-osint")
print("")
print("\033[1;97m[+] Granting permissions.....\033[0m\n")
os.system("cd X-osint")
os.system("sudo chmod +x *")
sleep(0.5)
print("\033[1;97m[+] Preparing Setup file.....\033[0m\n")
sleep(0.5)
print("\033[1;97m[+] Setup file ready!!.....Starting in 2s...\033[0m\n")
print("\033[1;97m[+] Update completed.....\033[0m\n")
sleep(2)
os.system("cd $HOME")
os.system("cd X-osint && bash setup.sh")
else:
print("Invalid input....KINDLY UPDATE...quiting..")
sleep(0.5)
exit
#### Start main script
### 4, 5, 6, 7
os.system("clear")
global root
root = tk.Tk()
root.withdraw()
##Fetchupdate
##update_script() ####----->ENABLE THIS
show_support_popup()
print(banner)
print(main_menu)
option = input("\033[38;5;208mxosint>> \033[1;97m")
if option == "1":
traceip()
elif option == "2":
email_info()
elif option == "3":
def main():
image_path = input("Enter the path to the image: ").strip()
location = extract_gps_info(image_path)
if location:
print("\033[1;91m[+]\033[0m\033[1;97mMaps Location wil be opened in 3secs.. \033[0m")
time.sleep(3)
open_map(*location)
main()
elif option == "4":
def shodan_host():
if os.path.exists("./api.txt") and os.path.getsize("./api.txt") > 0:
with open('api.txt', 'r') as file:
shodan_api=file.readline().rstrip('\n')
else:
file = open('api.txt', 'w')
shodan_api = input("[+] Please enter a valid Shodan API key (Shodan.io): ")
file.write(shodan_api)
print("[+] File written: ./api.txt")
file.close()
host_ip = input("\033[1;91m[+]\033[0m\033[1;97mShodan Host Search (IP): \033[0m")
url = "https://api.shodan.io/shodan/host/"+ host_ip +"?key=" + shodan_api
request = requests.get(url)
txt = request.text
parsed = json.loads(txt)
print(json.dumps(parsed, indent=2, sort_keys=True))
shodan_host()
elif option == "5":
def shodan_ports():
if os.path.exists("./api.txt") and os.path.getsize("./api.txt") > 0:
with open('api.txt', 'r') as file:
shodan_api=file.readline().rstrip('\n')
else:
file = open('api.txt', 'w')
shodan_api = input("[+] Please enter a valid Shodan API key (Shodan.io): ")
file.write(shodan_api)
print("[+] File written: ./api.txt")
file.close()
url = "https://api.shodan.io/shodan/ports?key=" + shodan_api
request = requests.get(url)