Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

Create basic_shodan_search.py

Abdul Wahab Junaidc8c16eb1969d
diff --git a/Shodan/basic_shodan_search.py b/Shodan/basic_shodan_search.py
new file mode 100644
index 0000000..1973761
--- /dev/null
+++ b/Shodan/basic_shodan_search.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import shodan
+import os
+
+SHODAN_API_KEY = os.environ['SHODAN_API_KEY']
+print(SHODAN_API_KEY)
+shodan = shodan.Shodan(SHODAN_API_KEY)
+
+try:
+ resultados = shodan.search('nginx')
+ print("results :",resultados.items())
+except Exception as exception:
+ print(str(exception))