forked from 0xInfection/TIDoS-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinputin.py
More file actions
57 lines (49 loc) · 1.55 KB
/
Copy pathinputin.py
File metadata and controls
57 lines (49 loc) · 1.55 KB
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
50
51
52
53
54
55
56
57
#!/usr/bin/env python
# coding: utf-8
#-:-:-:-:-:-:-:-:-:-:-:-:#
# TIDoS Framework #
#-:-:-:-:-:-:-:-:-:-:-:-:#
#This module requires TIDoS Framework
#https://github.com/0xInfection/TIDoS-Framework
from __future__ import print_function
import sys
import socket
import time
import os
from core.Core.colors import *
def inputin():
try:
global web
web = raw_input(''+O+' [#] Target web address :> '+C)
if not str(web).startswith('http'):
mo = raw_input(GR+' [#] Does this website use SSL? (y/n) :> ')
if mo == 'y' or mo == 'Y':
web = 'https://'+web
elif mo == 'n':
web = 'http://'+web
if 'http://' in web:
po = web.split('//')[1]
elif 'https://' in web:
po = web.split('//')[1]
if str(web).endswith('/'):
web = po[:-1]
po = po[:-1]
print(GR+' [*] Checking server status...')
time.sleep(0.6)
try:
ip = socket.gethostbyname(po)
print(G+' [+] Site seems to be up...')
time.sleep(0.5)
print(G+' [+] IP Detected : '+O+ip)
time.sleep(0.5)
print('')
os.system('cd tmp/logs/ && rm -rf '+po+'-logs && mkdir '+po+'-logs/')
return web
except socket.gaierror:
print(R+' [-] Site seems to be down...')
sys.exit(1)
except KeyboardInterrupt:
print(R+' [-] Exiting...')
time.sleep(0.7)
print(C+' [#] Alvida, my friend!')
sys.exit(1)