#UNIT TEST
##MỤC LỤC
| package main | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "strings" | |
| tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api" | |
| ) | 
| package main | |
| // ☢️ WARNING: If you are alergic to messy cowboy codes, please don't read the code below ☢️ | |
| // | |
| // # Intro: | |
| // | |
| // This snippet of magic is to test rrweb as a possible replacement to FullStory. It uses badger as storage because I | |
| // didn't want to deal with setting up a container and migrations for storage. | |
| // > FullStory is a tool to record user sessions for further analysis (can be for debugging, UX etc) | |
| // | 
| import "bytes" | |
| func StreamToByte(stream io.Reader) []byte { | |
| buf := new(bytes.Buffer) | |
| buf.ReadFrom(stream) | |
| return buf.Bytes() | |
| } | |
| func StreamToString(stream io.Reader) string { | |
| buf := new(bytes.Buffer) | 
| package main | |
| import ( | |
| "bytes" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" | 
| import requests # to handle http and https requests and responses | |
| import time # make program to sleep based on specified interval of time | |
| # ------------------------------------- | |
| # LIST OF VIRUS TOTAL REST API'S | |
| # ------------------------------------- | |
| IP_ADDRESS_API = "https://www.virustotal.com/vtapi/v2/ip-address/report" | |
| DOMAIN_API = "https://www.virustotal.com/vtapi/v2/domain/report" | |
| URL_REPORT_API = "https://www.virustotal.com/vtapi/v2/url/report" | |
| URL_SCAN_API = "https://www.virustotal.com/vtapi/v2/url/scan" | 
| # -*- coding: utf-8 -*- | |
| import os | |
| import time | |
| import hashlib | |
| from flask import Flask, render_template, redirect, url_for, request | |
| from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class | |
| from flask_wtf import FlaskForm | |
| from flask_wtf.file import FileField, FileRequired, FileAllowed | |
| from wtforms import SubmitField |