diff --git a/var/www/modules/hiddenServices/Flask_hiddenServices.py b/var/www/modules/hiddenServices/Flask_hiddenServices.py index d61466ef..3153f2a9 100644 --- a/var/www/modules/hiddenServices/Flask_hiddenServices.py +++ b/var/www/modules/hiddenServices/Flask_hiddenServices.py @@ -80,7 +80,7 @@ def hiddenServices_page_test(): return render_template("Crawler_index.html") @hiddenServices.route("/crawlers/crawler_splash_onion", methods=['GET']) -def hiddenServices_page(): +def hiddenServices_page_l(): last_onions = r_serv_onion.lrange('last_onion', 0 ,-1) list_onion = [] @@ -389,5 +389,23 @@ def domain_crawled_7days_json(): return jsonify(json_domain_stats) +@hiddenServices.route('/hiddenServices/automatic_onion_crawler_json') +def automatic_onion_crawler_json(): + current_date = request.args.get('date') + type = 'onion' + + num_day_type = 7 + date_range = get_date_range(num_day_type) + range_decoder = [] + for date in date_range: + day_crawled = {} + day_crawled['date']= date[0:4] + '-' + date[4:6] + '-' + date[6:8] + day_crawled['UP']= nb_domain_up = r_serv_onion.scard('{}_up:{}'.format(type, date)) + day_crawled['DOWN']= nb_domain_up = r_serv_onion.scard('{}_up:{}'.format(type, date)) + range_decoder.append(day_crawled) + + return jsonify(range_decoder) + + # ========= REGISTRATION ========= app.register_blueprint(hiddenServices, url_prefix=baseUrl) diff --git a/var/www/modules/hiddenServices/templates/Crawler_Splash_onion.html b/var/www/modules/hiddenServices/templates/Crawler_Splash_onion.html index 4ae0b358..3518e455 100644 --- a/var/www/modules/hiddenServices/templates/Crawler_Splash_onion.html +++ b/var/www/modules/hiddenServices/templates/Crawler_Splash_onion.html @@ -7,34 +7,38 @@ + + @@ -46,7 +50,7 @@
-
+ +
+
+
-
-
-					--------------
+						
+ + + + + + + + + + + {% for metadata_onion in last_onions %} + + + + + + + {% endfor %} + +
DomainFirst SeenLast CheckStatus
{{ metadata_onion['domain'] }}{{'{}/{}/{}'.format(metadata_onion['first_seen'][0:4], metadata_onion['first_seen'][4:6], metadata_onion['first_seen'][6:8])}}{{'{}/{}/{}'.format(metadata_onion['last_check'][0:4], metadata_onion['last_check'][4:6], metadata_onion['last_check'][6:8])}}
+ + {{metadata_onion['status_text']}} +
+
+
+ +
+
+ +
+
+
+
+ {{ statDomains['domains_up'] }} UP + {{ statDomains['domains_down'] }} DOWN +
+
+ {{ statDomains['total'] }} Crawled + {{ statDomains['domains_queue'] }} Queue +
+
+
+
+
Select domains by date range :
+

Some quick example text to build on the card title and make up the bulk of the card's content.

+
+
+
+
+
+ +
+
+
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
- -------------- +
+
-
@@ -100,95 +192,49 @@ - - - + + diff --git a/var/www/update_thirdparty.sh b/var/www/update_thirdparty.sh index 67137773..b8db60e6 100755 --- a/var/www/update_thirdparty.sh +++ b/var/www/update_thirdparty.sh @@ -13,6 +13,7 @@ rm -rf temp mkdir temp wget https://github.com/twbs/bootstrap/releases/download/v${BOOTSTRAP_VERSION}/bootstrap-${BOOTSTRAP_VERSION}-dist.zip -O temp/bootstrap${BOOTSTRAP_VERSION}.zip +wget https://github.com/FezVrasta/popper.js/archive/v1.14.3.zip -O temp/popper.zip wget https://github.com/BlackrockDigital/startbootstrap-sb-admin/archive/v${SBADMIN_VERSION}.zip -O temp/${SBADMIN_VERSION}.zip wget https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/archive/v${SBADMIN_VERSION}.zip -O temp/${SBADMIN_VERSION}-2.zip wget https://github.com/FortAwesome/Font-Awesome/archive/v4.7.0.zip -O temp/FONT_AWESOME_4.7.0.zip @@ -24,6 +25,7 @@ wget https://github.com/moment/moment/archive/2.22.2.zip -O temp/moment_2.22.2.z wget https://github.com/longbill/jquery-date-range-picker/archive/v0.18.0.zip -O temp/daterangepicker_v0.18.0.zip unzip temp/bootstrap${BOOTSTRAP_VERSION}.zip -d temp/ +unzip temp/popper.zip -d temp/ unzip temp/${SBADMIN_VERSION}.zip -d temp/ unzip temp/${SBADMIN_VERSION}-2.zip -d temp/ unzip temp/FONT_AWESOME_4.7.0.zip -d temp/ @@ -34,9 +36,13 @@ unzip temp/moment_2.22.2.zip -d temp/ unzip temp/daterangepicker_v0.18.0.zip -d temp/ mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/js/bootstrap.min.js ./static/js/bootstrap4.min.js +mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/js/bootstrap.min.js.map ./static/js/bootstrap.min.js.map mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/css/bootstrap.min.css ./static/css/bootstrap4.min.css mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/css/bootstrap.min.css.map ./static/css/bootstrap4.min.css.map +mv temp/popper.js-1.14.3/dist/umd/popper.min.js ./static/js/ +mv temp/popper.js-1.14.3/dist/umd/popper.min.js.map ./static/js/ + mv temp/startbootstrap-sb-admin-${SBADMIN_VERSION} temp/sb-admin mv temp/startbootstrap-sb-admin-2-${SBADMIN_VERSION} temp/sb-admin-2 mv temp/Font-Awesome-4.7.0 temp/font-awesome