June 2, 2022 at 10:25 AM
Found this laying somewhere hence sharing might be useful to someone, bit old though but workable
This will Crawl hole Database of shodan.io . You only need to provide a valid API-Key and some Keywords.
The Tool will fetch all IP´s from Shodan provided by the Keyword. After that everything is going to be saved in a MySQL - database.
When the crawling - prozess has finsihed, it will try to crack the device, using the Login Data provided in a second Table in the DB.
Sadly now the Tool only supports Basic HTML - authentication.
If the right password is found, it is going to be saved to the DB.
The Tool works with Python 2.7.14
It requires the following addons :
Requests (pipenv install requests)
Shodan API(easy_install shodan)
MySQL-Connector Python
Next you need to set up a MySQL - Database:
Code:
CREATE DATABASE IF NOT EXISTS `shodan` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
Tables (some of the Columns are no longer used or the function have not been implemented yet):
CREATE TABLE `ip_401` (
`id` int(30) NOT NULL,
`ip` varchar(255) NOT NULL,
`port` varchar(255) NOT NULL,
`info` longtext NOT NULL,
`date` varchar(255) NOT NULL,
`keyword` varchar(255) NOT NULL,
`header` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ip_untested` (
`id` int(255) NOT NULL,
`ip` varchar(25) NOT NULL,
`port` varchar(10) NOT NULL,
`info` longtext NOT NULL,
`date` varchar(255) NOT NULL,
`keyword` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ip_working` (
`id` int(255) NOT NULL,
`ip` varchar(25) NOT NULL,
`port` varchar(25) NOT NULL,
`info` longtext NOT NULL,
`keyword` varchar(255) NOT NULL,
`video` varchar(255) NOT NULL,
`id_login` varchar(255) NOT NULL,
`header` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `keywords` (
`id` int(11) NOT NULL,
`keyword` varchar(255) NOT NULL,
`active` varchar(10) NOT NULL DEFAULT 'true'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `login` (
`id` int(11) NOT NULL,
`user` varchar(30) NOT NULL,
`passw` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `options` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `ip_401`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ip_untested`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ip_working`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `ip` (`ip`,`port`) USING BTREE;
ALTER TABLE `keywords`
ADD PRIMARY KEY (`id`);
ALTER TABLE `login`
ADD PRIMARY KEY (`id`);
ALTER TABLE `options`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ip_401`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `ip_untested`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `ip_working`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `keywords`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `login`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `options`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
COMMIT;
Let´s go to the Python Files:
Download them to a folder.
Now edit the file "options.py":
type in your proxy and you MySQL - Login Data
To try everything add the value "TL-SC3171" to the Keywords Table (If the column 'active' is set to false, the script will ignore it and won´t search for it).
To the options Table add for name = 'apikey' and for value = 'YOUR API KEY'
start the script :
Code:
python start.py
The Script will now search for every Device linked to the keyword 'TL-SC3171', you can provide so much keywords as you want (if you set active to false it will be ignored)
After every Device has been found, it will try the login data from the Table 'login'. If the login was succesfull, the data will be saved to 'ip_working'.
If you want to get all working IP´s with the login data you can use the following SQL-statement:
Code:
SELECT ip_working.id AS ID, ip_working.ip AS IP, ip_working.port AS port, ip_working.keyword AS keyword, login.user AS user, login.passw AS password
FROM ip_working LEFT JOIN login ON ip_working.id_login = login.id
It could be that there are some bug´s.
It´s perfect for finding IOT-Devices or routers with the standard login data. This tool can try a huge amount of IP´s in a very short time. It uses the tor-network (the proxy you provided).
This will Crawl hole Database of shodan.io . You only need to provide a valid API-Key and some Keywords.
The Tool will fetch all IP´s from Shodan provided by the Keyword. After that everything is going to be saved in a MySQL - database.
When the crawling - prozess has finsihed, it will try to crack the device, using the Login Data provided in a second Table in the DB.
Sadly now the Tool only supports Basic HTML - authentication.
If the right password is found, it is going to be saved to the DB.
The Tool works with Python 2.7.14
It requires the following addons :
Requests (pipenv install requests)
Shodan API(easy_install shodan)
MySQL-Connector Python
Next you need to set up a MySQL - Database:
Code:
CREATE DATABASE IF NOT EXISTS `shodan` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
Tables (some of the Columns are no longer used or the function have not been implemented yet):
CREATE TABLE `ip_401` (
`id` int(30) NOT NULL,
`ip` varchar(255) NOT NULL,
`port` varchar(255) NOT NULL,
`info` longtext NOT NULL,
`date` varchar(255) NOT NULL,
`keyword` varchar(255) NOT NULL,
`header` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ip_untested` (
`id` int(255) NOT NULL,
`ip` varchar(25) NOT NULL,
`port` varchar(10) NOT NULL,
`info` longtext NOT NULL,
`date` varchar(255) NOT NULL,
`keyword` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `ip_working` (
`id` int(255) NOT NULL,
`ip` varchar(25) NOT NULL,
`port` varchar(25) NOT NULL,
`info` longtext NOT NULL,
`keyword` varchar(255) NOT NULL,
`video` varchar(255) NOT NULL,
`id_login` varchar(255) NOT NULL,
`header` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `keywords` (
`id` int(11) NOT NULL,
`keyword` varchar(255) NOT NULL,
`active` varchar(10) NOT NULL DEFAULT 'true'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `login` (
`id` int(11) NOT NULL,
`user` varchar(30) NOT NULL,
`passw` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `options` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`value` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `ip_401`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ip_untested`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ip_working`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `ip` (`ip`,`port`) USING BTREE;
ALTER TABLE `keywords`
ADD PRIMARY KEY (`id`);
ALTER TABLE `login`
ADD PRIMARY KEY (`id`);
ALTER TABLE `options`
ADD PRIMARY KEY (`id`);
ALTER TABLE `ip_401`
MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `ip_untested`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `ip_working`
MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `keywords`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `login`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `options`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
COMMIT;
Let´s go to the Python Files:
Download them to a folder.
Now edit the file "options.py":
type in your proxy and you MySQL - Login Data
To try everything add the value "TL-SC3171" to the Keywords Table (If the column 'active' is set to false, the script will ignore it and won´t search for it).
To the options Table add for name = 'apikey' and for value = 'YOUR API KEY'
start the script :
Code:
python start.py
The Script will now search for every Device linked to the keyword 'TL-SC3171', you can provide so much keywords as you want (if you set active to false it will be ignored)
After every Device has been found, it will try the login data from the Table 'login'. If the login was succesfull, the data will be saved to 'ip_working'.
If you want to get all working IP´s with the login data you can use the following SQL-statement:
Code:
SELECT ip_working.id AS ID, ip_working.ip AS IP, ip_working.port AS port, ip_working.keyword AS keyword, login.user AS user, login.passw AS password
FROM ip_working LEFT JOIN login ON ip_working.id_login = login.id
It could be that there are some bug´s.
It´s perfect for finding IOT-Devices or routers with the standard login data. This tool can try a huge amount of IP´s in a very short time. It uses the tor-network (the proxy you provided).
