Skip to content

Commit

Permalink
Merge pull request #26 from InfamousSYN/develop
Browse files Browse the repository at this point in the history
Merged Python3 Support
  • Loading branch information
InfamousSYN authored Aug 27, 2020
2 parents a97d013 + 8699532 commit cf6d34c
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 38 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
**.pyc

### log files ###
logs/
**.log

## Certificate files ###
### Certificate files ###
core/certs/
**.cnf

### Temporary files ###
tmp/*
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The Rogue Toolkit
=================
![GitHub release (latest by date)](https://img.shields.io/github/v/release/infamoussyn/rogue)

## Getting Started
* [Introduction](https://github.com/InfamousSYN/rogue#introduction)
Expand Down
4 changes: 2 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/python
#!/usr/bin/python3
import os
import argparse

# application version
__version__ = "2.0.0"
__version__ = "2.1.0"

# directory mapping
root_dir, conf_file = os.path.split(os.path.abspath(__file__))
Expand Down
2 changes: 1 addition & 1 deletion core/libs/cert_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3

import os
import config
Expand Down
28 changes: 14 additions & 14 deletions core/libs/cert_wizard.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import sys

import config
Expand All @@ -8,29 +8,29 @@ def cert_wizard():

while True:

print ('[*] Please enter two letter country '
print('[*] Please enter two letter country '
'code for certs (i.e. US, FR)')

country = raw_input(': ').upper()
country = input(': ').upper()
if len(country) == 2:
break
print '[!] Invalid input.'
print('[!] Invalid input.')

print ('[*] Please enter state or province for '
print('[*] Please enter state or province for '
'certs (i.e. Ontario, New Jersey)')
state = raw_input(': ')
state = input(': ')

print '[*] Please enter locale for certs (i.e. London, Hong Kong)'
locale = raw_input(': ')
print('[*] Please enter locale for certs (i.e. London, Hong Kong)')
locale = input(': ')

print '[*] Please enter organization for certs (i.e. rogue)'
org = raw_input(': ')
print('[*] Please enter organization for certs (i.e. rogue)')
org = input(': ')

print '[*] Please enter email for certs (i.e. rogue@rogue.rogue)'
email = raw_input(': ')
print('[*] Please enter email for certs (i.e. rogue@rogue.rogue)')
email = input(': ')

print '[*] Please enter common name (CN) for certs. (i.e. rogue)'
cn = raw_input(': ')
print('[*] Please enter common name (CN) for certs. (i.e. rogue)')
cn = input(': ')

cert_manager.ca_cnf.configure(country, state, locale, org, email, cn)
cert_manager.server_cnf.configure(country, state, locale, org, email, cn)
Expand Down
2 changes: 1 addition & 1 deletion core/libs/clone_wizard.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import subprocess

def cloner(program, clone_target, clone_dest):
Expand Down
4 changes: 2 additions & 2 deletions core/libs/conf_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import os

import config
Expand Down Expand Up @@ -448,7 +448,7 @@ def configure(cls,
assert ieee80211h is not None
assert ap_isolate is not None

try:
try:
print("[+] Creating hostapd-wpe.confg file: %s" % cls.path)
with open(cls.path, 'w') as fd:
fd.write(cls.template %\
Expand Down
2 changes: 1 addition & 1 deletion core/libs/hostile_portal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3


def insert(webroot, target_file, addr, hook, marker):
Expand Down
4 changes: 2 additions & 2 deletions core/libs/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
from argparse import *
import sys
import config
Expand All @@ -9,7 +9,7 @@ class optionsClass():
def __init__(self, options, parser):
self.options = options
self.parser = parser
for key, value in options.iteritems():
for key, value in options.items():
setattr(self, key, value)
del self.options

Expand Down
9 changes: 5 additions & 4 deletions core/libs/utils.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/usr/bin/python3
import os
import time
import config
from tqdm import tqdm

def sleep_bar(sleep_time, text=''):

print
print()

if text:

print text
print
print(text)
print()

interval = sleep_time % 1
if interval == 0:
Expand All @@ -22,7 +23,7 @@ def sleep_bar(sleep_time, text=''):
for i in tqdm(range(iterations)):
time.sleep(interval)

print
print()


class Service(object):
Expand Down
6 changes: 3 additions & 3 deletions install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import os
import config

Expand All @@ -8,7 +8,7 @@ def read_deps_file(deps_file):

if __name__ == "__main__":
try:
if raw_input("Do you want update your package list ('apt-get update')? [y/N]").lower() == "y":
if input("Do you want update your package list ('apt-get update')? [y/N]").lower() == "y":
print("[*] Downloading package lists from repositories")
os.system("apt-get update -y")

Expand All @@ -17,7 +17,7 @@ def read_deps_file(deps_file):
print("[*] complete!")

print("[*] Installing Rogue's Python dependencies...")
os.system("pip install -r %s" % config.pip_dep)
os.system("pip3 install -r %s" % config.pip_dep)
print("[*] complete!")

# Check if required directories exist
Expand Down
1 change: 1 addition & 0 deletions logs/freeradius-wpe.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This a dynamically generated file. Do not edit this by hand.
11 changes: 5 additions & 6 deletions rogue.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
#!/usr/bin/python3
import os
import thread
import _thread
import time
import subprocess
import select
Expand Down Expand Up @@ -78,7 +78,7 @@ def is_interface_up(interface):

@staticmethod
def CatchThread(input, threadType):
raw_input('Press enter to quit %s...' % threadType)
input('Press enter to quit %s...' % threadType)

input.append(True)

Expand Down Expand Up @@ -109,7 +109,7 @@ def ReadFreeRadiusLog(options):

while not input:
if p.poll(1):
print f.stdout.readline().strip("\n")
print(f.stdout.readline().strip("\n"))
time.sleep(1)

f.kill()
Expand Down Expand Up @@ -346,7 +346,6 @@ def dhcpCidr(dhcp_netmask):
)

if(options['supported_eap_type'] == 'all'):
print("hit")
conf_manager.freeradius_eap_conf.configure(
default_eap_type=options['default_eap_type'],
private_key_file=config.private_key,
Expand Down Expand Up @@ -564,7 +563,7 @@ def dhcpCidr(dhcp_netmask):
pass

# pause execution until user quits
raw_input('Press enter to quit...')
input('Press enter to quit...')

except KeyboardInterrupt:
rogueClass.rogue_shutdown(options)
Expand Down
2 changes: 1 addition & 1 deletion tools/hashcatifer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/python3
import argparse
import re

Expand Down

0 comments on commit cf6d34c

Please sign in to comment.