forked from gokulapap/Reconator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitialise.py
More file actions
49 lines (33 loc) · 737 Bytes
/
initialise.py
File metadata and controls
49 lines (33 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# sends test notification
# creates a db table
import os
import sys
import psycopg2
import base64
import telebot
CHAT_ID = os.environ['CHAT_ID']
API_KEY = os.environ['API_KEY']
DATABASE_URL = os.environ['DATABASE_URL']
bot = telebot.TeleBot(API_KEY)
conn = psycopg2.connect(DATABASE_URL, sslmode='require')
cur = conn.cursor()
# to save the result of recon on target
cur.execute('''
create table output (
domain varchar(30),
result varchar(10485760),
gau varchar(10485760)
);
''')
conn.commit()
# to save targets in queue
cur.execute('''
create table queue (
id SERIAL PRIMARY KEY,
target varchar(50) NOT NULL
);
''')
conn.commit()
bot.send_message(CHAT_ID, "Test Notification from Reconator !")
cur.close()
conn.close()