Import new upstream release (Closes 4469)
Sophie Brun
6 years ago
0 | osrframework (0.18.0-0kali1) kali-dev; urgency=medium | |
1 | ||
2 | * Import new upstream release (Closes 4469) | |
3 | * Update patches and installation: upstream created separated projects for | |
4 | osrframework_server, osrframework_maltego and osrframework_console. | |
5 | ||
6 | -- Sophie Brun <[email protected]> Wed, 24 Jan 2018 09:35:54 +0100 | |
7 | ||
0 | 8 | osrframework (0.17.2-0kali1) kali-dev; urgency=medium |
1 | 9 | |
2 | 10 | * Initial release (Closes: 3042) |
6 | 6 | Homepage: https://github.com/i3visio/osrframework |
7 | 7 | Vcs-Git: git://git.kali.org/packages/osrframework.git |
8 | 8 | Vcs-Browser: http://git.kali.org/gitweb/?p=packages/osrframework.git;a=summary |
9 | Testsuite: autopkgtest-pkg-python | |
10 | 9 | |
11 | 10 | Package: osrframework |
12 | 11 | Architecture: all |
15 | 14 | This package contains a set of libraries developed by i3visio to perform Open |
16 | 15 | Source Intelligence tasks. They include references to a bunch of different |
17 | 16 | applications related to username checking, DNS lookups, information leaks |
18 | research, deep web search, regular expressions extraction and many others. At | |
19 | the same time, by means of ad-hoc Maltego transforms, OSRFramework provides a | |
20 | way of making these queries graphically as well as several interfaces to | |
21 | interact with like OSRFConsole or a Web interface. | |
17 | research, deep web search, regular expressions extraction and many others. |
2 | 2 | Source: https://github.com/i3visio/osrframework |
3 | 3 | |
4 | 4 | Files: * |
5 | Copyright: 2014-2017 F. Brezo and Y. Rubio, i3visio | |
5 | Copyright: 2014-2018 F. Brezo and Y. Rubio, i3visio | |
6 | 6 | License: AGPL-3+ |
7 | 7 | |
8 | 8 | Files: debian/* |
9 | Copyright: 2017 Sophie Brun <[email protected]> | |
9 | Copyright: 2017-2018 Sophie Brun <[email protected]> | |
10 | 10 | License: AGPL-3+ |
11 | 11 | |
12 | 12 | License: AGPL-3+ |
0 | osrframework/static osrframework/templates /etc/osrframework/server | |
1 | osrframework/transforms/lib/osrframework-maltego-settings /etc/osrframework/default |
0 | Description: Add a script to manage configuration during upgrade | |
1 | During a upgrade we have to install the new configuration files in | |
2 | ~/.config/OSRFramework: | |
3 | - Update configuration.py to create the missing directory "data" | |
4 | only if it doesn't exist. | |
5 | - Add a script (which is called in postinst when it's an upgrade) to | |
6 | remove config directories "default", "plugins", "server", "transforms", | |
7 | and install the new directories and files provided by the package. | |
8 | Author: Sophie Brun <[email protected]> | |
9 | Origin: vendor | |
10 | Last-Update: 2018-01-24 | |
11 | --- | |
12 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
0 | 13 | --- /dev/null |
1 | 14 | +++ b/osrframework/utils/upgrade_config.py |
2 | 15 | @@ -0,0 +1,12 @@ |
14 | 27 | + configuration.initialize_config_files() |
15 | 28 | --- a/osrframework/utils/configuration.py |
16 | 29 | +++ b/osrframework/utils/configuration.py |
17 | @@ -40,8 +40,10 @@ def initialize_config_files(): | |
18 | for dirconf in ["default", "plugins", "server"]: | |
30 | @@ -41,8 +41,10 @@ def initialize_config_files(): | |
31 | for dirconf in ["default", "plugins"]: | |
19 | 32 | shutil.copytree(os.path.join('/etc/osrframework',dirconf), os.path.join(LOCAL_CONFIG_DIR, dirconf)) |
20 | 33 | |
21 | 34 | - # Create directory data |
26 | 39 | + os.mkdir(getConfigPath()["appPathData"]) |
27 | 40 | |
28 | 41 | # Create directory Transforms before copy *.py files |
29 | os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR) | |
42 | # os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR) |
60 | 60 | - |
61 | 61 | - command = "echo '''" + new_lines + "''' >> ~/.bashrc" |
62 | 62 | - print "[*] As we want to be transparent, the command that is being run is the following:\n" + command |
63 | - a = os.popen(command).read() | |
63 | - a = os.popen(command).read() | |
64 | 64 | - except: |
65 | 65 | - IS_VIRTUAL_ENV = True |
66 | 66 | - else: |
70 | 70 | + |
71 | 71 | +# command = "echo '''" + new_lines + "''' >> ~/.bashrc" |
72 | 72 | +# print "[*] As we want to be transparent, the command that is being run is the following:\n" + command |
73 | +# a = os.popen(command).read() | |
73 | +# a = os.popen(command).read() | |
74 | 74 | +# except: |
75 | 75 | +# IS_VIRTUAL_ENV = True |
76 | 76 | +# else: |
103 | 103 | - print "[*] No OSRFramework installation found in the system." |
104 | 104 | -else: |
105 | 105 | - print "[*] OSRFramework seems to be installed using `virtualenv`." |
106 | - | |
107 | -HERE = os.path.abspath(os.path.dirname(__file__)) | |
108 | 106 | +# if os.path.isdir(osrframeworkSystemPath): |
109 | 107 | +# print "[!] Found an old installation at: " + osrframeworkSystemPath |
110 | 108 | +# try: |
118 | 116 | +# print "[*] No OSRFramework installation found in the system." |
119 | 117 | +#else: |
120 | 118 | +# print "[*] OSRFramework seems to be installed using `virtualenv`." |
121 | +# | |
119 | ||
120 | -HERE = os.path.abspath(os.path.dirname(__file__)) | |
122 | 121 | +#HERE = os.path.abspath(os.path.dirname(__file__)) |
123 | 122 | |
124 | 123 | # Importing the temporal scripts for the setup and taking the new version number |
148 | 147 | |
149 | 148 | # Reading the .md file |
150 | 149 | try: |
151 | @@ -218,101 +218,101 @@ setup( | |
150 | @@ -206,49 +206,49 @@ setup( | |
152 | 151 | ############################ |
153 | 152 | ### Creating other files ### |
154 | 153 | ############################ |
176 | 175 | - os.path.join("config", "browser.cfg"), |
177 | 176 | - os.path.join("config", "general.cfg"), |
178 | 177 | - ], |
179 | - paths["appPathTransforms"] : [ | |
180 | - os.path.join("osrframework", "alias_generator.py"), | |
181 | - os.path.join("osrframework", "entify.py"), | |
182 | - os.path.join("osrframework", "phonefy.py"), | |
183 | - os.path.join("osrframework", "searchfy.py"), | |
184 | - os.path.join("osrframework", "mailfy.py"), | |
185 | - os.path.join("osrframework", "usufy.py"), | |
186 | - os.path.join("osrframework", "domainfy.py"), | |
187 | - os.path.join("osrframework", "transforms", "aliasToKnownDomains.py"), | |
188 | - os.path.join("osrframework", "transforms", "aliasToKnownEmails.py"), | |
189 | - os.path.join("osrframework", "transforms", "aliasToSkypeAccounts.py"), | |
190 | - os.path.join("osrframework", "transforms", "aliasToSkypeIP.py"), | |
191 | - os.path.join("osrframework", "transforms", "bitcoinAddressToBlockchainDetails.py"), | |
192 | - os.path.join("osrframework", "transforms", "coordinatesToGoogleMapsBrowser.py"), | |
193 | - os.path.join("osrframework", "transforms", "coordinatesToTwitterBrowser.py"), | |
194 | - os.path.join("osrframework", "transforms", "domainToGoogleSearchUriWithEmails.py"), | |
195 | - os.path.join("osrframework", "transforms", "domainToTld.py"), | |
196 | - os.path.join("osrframework", "transforms", "emailToAlias.py"), | |
197 | - os.path.join("osrframework", "transforms", "emailToBreachedAccounts.py"), | |
198 | - os.path.join("osrframework", "transforms", "emailToDomain.py"), | |
199 | - os.path.join("osrframework", "transforms", "emailToSkypeAccounts.py"), | |
200 | - os.path.join("osrframework", "transforms", "expandPropertiesFromI3visioEntity.py"), | |
201 | - os.path.join("osrframework", "transforms", "hashToMD5crackDotCom.py"), | |
202 | - os.path.join("osrframework", "transforms", "ipToIp_ApiInformation.py"), | |
203 | - os.path.join("osrframework", "transforms", "phoneToMoreInfo.py"), | |
204 | - os.path.join("osrframework", "transforms", "phoneToPerson.py"), | |
205 | - os.path.join("osrframework", "transforms", "textToEntities.py"), | |
206 | - os.path.join("osrframework", "transforms", "textToGoogleSearchUri.py"), | |
207 | - os.path.join("osrframework", "transforms", "textToPlatformSearch.py"), | |
208 | - os.path.join("osrframework", "transforms", "textToProfiles.py"), | |
209 | - os.path.join("osrframework", "transforms", "uriToBrowser.py"), | |
210 | - os.path.join("osrframework", "transforms", "uriToDomain.py"), | |
211 | - os.path.join("osrframework", "transforms", "uriToEntities.py"), | |
212 | - os.path.join("osrframework", "transforms", "uriToGoogleCacheUri.py"), | |
213 | - os.path.join("osrframework", "transforms", "uriToPort.py"), | |
214 | - os.path.join("osrframework", "transforms", "uriToProtocol.py"), | |
215 | - ], | |
216 | 178 | - paths["appPathWrappers"] : [ |
217 | 179 | - os.path.join("config", "plugins", "wrapper.py.sample"), |
218 | 180 | - ], |
219 | 181 | - paths["appPathPatterns"] : [ |
220 | 182 | - os.path.join("config", "plugins", "pattern.py.sample"), |
221 | - ], | |
222 | - paths["appPathServer"] : [ | |
223 | - os.path.join("osrframework", "static"), | |
224 | - os.path.join("osrframework", "templates"), | |
225 | 183 | - ] |
226 | 184 | -} |
227 | 185 | +#print "[*] Copying relevant files..." |
236 | 194 | +# os.path.join("config", "browser.cfg"), |
237 | 195 | +# os.path.join("config", "general.cfg"), |
238 | 196 | +# ], |
239 | +# paths["appPathTransforms"] : [ | |
240 | +# os.path.join("osrframework", "alias_generator.py"), | |
241 | +# os.path.join("osrframework", "entify.py"), | |
242 | +# os.path.join("osrframework", "phonefy.py"), | |
243 | +# os.path.join("osrframework", "searchfy.py"), | |
244 | +# os.path.join("osrframework", "mailfy.py"), | |
245 | +# os.path.join("osrframework", "usufy.py"), | |
246 | +# os.path.join("osrframework", "domainfy.py"), | |
247 | +# os.path.join("osrframework", "transforms", "aliasToKnownDomains.py"), | |
248 | +# os.path.join("osrframework", "transforms", "aliasToKnownEmails.py"), | |
249 | +# os.path.join("osrframework", "transforms", "aliasToSkypeAccounts.py"), | |
250 | +# os.path.join("osrframework", "transforms", "aliasToSkypeIP.py"), | |
251 | +# os.path.join("osrframework", "transforms", "bitcoinAddressToBlockchainDetails.py"), | |
252 | +# os.path.join("osrframework", "transforms", "coordinatesToGoogleMapsBrowser.py"), | |
253 | +# os.path.join("osrframework", "transforms", "coordinatesToTwitterBrowser.py"), | |
254 | +# os.path.join("osrframework", "transforms", "domainToGoogleSearchUriWithEmails.py"), | |
255 | +# os.path.join("osrframework", "transforms", "domainToTld.py"), | |
256 | +# os.path.join("osrframework", "transforms", "emailToAlias.py"), | |
257 | +# os.path.join("osrframework", "transforms", "emailToBreachedAccounts.py"), | |
258 | +# os.path.join("osrframework", "transforms", "emailToDomain.py"), | |
259 | +# os.path.join("osrframework", "transforms", "emailToSkypeAccounts.py"), | |
260 | +# os.path.join("osrframework", "transforms", "expandPropertiesFromI3visioEntity.py"), | |
261 | +# os.path.join("osrframework", "transforms", "hashToMD5crackDotCom.py"), | |
262 | +# os.path.join("osrframework", "transforms", "ipToIp_ApiInformation.py"), | |
263 | +# os.path.join("osrframework", "transforms", "phoneToMoreInfo.py"), | |
264 | +# os.path.join("osrframework", "transforms", "phoneToPerson.py"), | |
265 | +# os.path.join("osrframework", "transforms", "textToEntities.py"), | |
266 | +# os.path.join("osrframework", "transforms", "textToGoogleSearchUri.py"), | |
267 | +# os.path.join("osrframework", "transforms", "textToPlatformSearch.py"), | |
268 | +# os.path.join("osrframework", "transforms", "textToProfiles.py"), | |
269 | +# os.path.join("osrframework", "transforms", "uriToBrowser.py"), | |
270 | +# os.path.join("osrframework", "transforms", "uriToDomain.py"), | |
271 | +# os.path.join("osrframework", "transforms", "uriToEntities.py"), | |
272 | +# os.path.join("osrframework", "transforms", "uriToGoogleCacheUri.py"), | |
273 | +# os.path.join("osrframework", "transforms", "uriToPort.py"), | |
274 | +# os.path.join("osrframework", "transforms", "uriToProtocol.py"), | |
275 | +# ], | |
276 | 197 | +# paths["appPathWrappers"] : [ |
277 | 198 | +# os.path.join("config", "plugins", "wrapper.py.sample"), |
278 | 199 | +# ], |
279 | 200 | +# paths["appPathPatterns"] : [ |
280 | 201 | +# os.path.join("config", "plugins", "pattern.py.sample"), |
281 | +# ], | |
282 | +# paths["appPathServer"] : [ | |
283 | +# os.path.join("osrframework", "static"), | |
284 | +# os.path.join("osrframework", "templates"), | |
285 | 202 | +# ] |
286 | 203 | +#} |
287 | 204 | |
288 | 205 | # Iterating through all destinations to write the info |
289 | 206 | -for destiny in files_to_copy.keys(): |
290 | - # Grabbing each source file to be moved | |
207 | +#for destiny in files_to_copy.keys(): | |
208 | # Grabbing each source file to be moved | |
291 | 209 | - for sourceFile in files_to_copy[destiny]: |
292 | 210 | - fileToMove = os.path.join(HERE,sourceFile) |
293 | - | |
294 | +#for destiny in files_to_copy.keys(): | |
295 | +# # Grabbing each source file to be moved | |
296 | 211 | +# for sourceFile in files_to_copy[destiny]: |
297 | 212 | +# fileToMove = os.path.join(HERE,sourceFile) |
298 | +# | |
213 | ||
299 | 214 | # Choosing the command depending on the SO |
300 | 215 | - if sys.platform == 'win32': |
301 | 216 | - if os.path.isdir(fileToMove): |
320 | 235 | #print cmd |
321 | 236 | - output = os.popen(cmd).read() |
322 | 237 | +# output = os.popen(cmd).read() |
323 | ||
324 | ||
325 | -print "[*] Last part: trying to configure Maltego Transforms..." | |
326 | ||
327 | +#print "[*] Last part: trying to configure Maltego Transforms..." | |
328 | # Creating the configuration file | |
329 | -try: | |
330 | - import osrframework.transforms.lib.configure_maltego as maltego | |
331 | - maltego.configureMaltego(transformsConfigFolder=paths["appPathTransforms"], base=os.path.join(HERE,"osrframework/transforms/lib/osrframework-maltego-settings"), debug=False, backupPath=paths["appPathDefaults"]) | |
332 | -except Exception, e: | |
333 | - print "[!] The Maltego configuration file to use i3visio transforms could not be created and thus, cannot be used. Check the following error:" | |
334 | - print str(e) | |
335 | ||
336 | +#try: | |
337 | +# import osrframework.transforms.lib.configure_maltego as maltego | |
338 | +# maltego.configureMaltego(transformsConfigFolder=paths["appPathTransforms"], base=os.path.join(HERE,"osrframework/transforms/lib/osrframework-maltego-settings"), debug=False, backupPath=paths["appPathDefaults"]) | |
339 | +#except Exception, e: | |
340 | +# print "[!] The Maltego configuration file to use i3visio transforms could not be created and thus, cannot be used. Check the following error:" | |
341 | +# print str(e) | |
342 |
7 | 7 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
8 | 8 | --- a/osrframework/mailfy.py |
9 | 9 | +++ b/osrframework/mailfy.py |
10 | @@ -42,7 +42,7 @@ import sys | |
10 | @@ -33,7 +33,7 @@ import sys | |
11 | 11 | |
12 | 12 | # Email verification libraries |
13 | 13 | import emailahoy |
14 | 14 | -import validate_email |
15 | 15 | +#import validate_email |
16 | 16 | |
17 | import osrframework | |
17 | 18 | import osrframework.thirdparties.haveibeenpwned_com.hibp as hibp |
18 | import osrframework.utils.banner as banner | |
19 | 19 | --- a/setup.py |
20 | 20 | +++ b/setup.py |
21 | @@ -196,7 +196,7 @@ setup( | |
21 | @@ -184,7 +184,7 @@ setup( | |
22 | 22 | "tweepy", |
23 | 23 | "networkx", |
24 | 24 | "decorator", |
6 | 6 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
7 | 7 | --- a/setup.py |
8 | 8 | +++ b/setup.py |
9 | @@ -201,7 +201,7 @@ setup( | |
9 | @@ -189,7 +189,7 @@ setup( | |
10 | 10 | "tabulate", |
11 | 11 | "oauthlib>=1.0.0", |
12 | 12 | # Added to dinamically import wrappers: |
0 | Description: alias_generator contains two functions "main" | |
1 | alias_generator.py contains two functions named "main". The command fails | |
2 | with the error message | |
3 | "TypeError: main() got an unexpected keyword argument 'name' " | |
4 | Author: Sophie Brun <[email protected]> | |
5 | Forwarded: https://github.com/i3visio/osrframework/issues/302 | |
6 | Last-Update: 2018-01-24 | |
7 | --- | |
8 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ | |
9 | --- a/osrframework/alias_generator.py | |
10 | +++ b/osrframework/alias_generator.py | |
11 | @@ -45,7 +45,7 @@ LEET_TRANSFORMS = { | |
12 | } | |
13 | ||
14 | ||
15 | -def main(name=None, surname1=None, surname2=None, city=None, country=None, year=None, useNumbers=False, useCommonWords=False, useLeet=False, useLocales=False, extraWords=[]): | |
16 | +def mainalias(name=None, surname1=None, surname2=None, city=None, country=None, year=None, useNumbers=False, useCommonWords=False, useLeet=False, useLocales=False, extraWords=[], outputFile="./output.txt"): | |
17 | """ | |
18 | The main method that generates the given aliases. | |
19 | ||
20 | @@ -2808,9 +2808,9 @@ def main(name=None, surname1=None, surna | |
21 | print("\nGenerated nicks:\n") | |
22 | print(general.success(json.dumps(listaFinal, indent=2, sort_keys=True))) | |
23 | print("\nUp to " + general.emphasis(str(len(listaFinal))) + " nicks generated.\n") | |
24 | - print("Writing the results onto the file:\n\t" + general.emphasis(args.outputFile)) | |
25 | + print("Writing the results onto the file:\n\t" + general.emphasis(outputFile)) | |
26 | ||
27 | - oF=open(args.outputFile, "w") | |
28 | + oF=open(outputFile, "w") | |
29 | for l in listaFinal: | |
30 | oF.write(l+"\n") | |
31 | oF.close() | |
32 | @@ -2901,7 +2901,7 @@ def main(params=None): | |
33 | if args.country != "": | |
34 | print("Country: ".ljust(20, " ") + args.country) | |
35 | ||
36 | - main( | |
37 | + mainalias( | |
38 | name=args.name, | |
39 | surname1=args.surname1, | |
40 | surname2=args.surname2, | |
41 | @@ -2912,7 +2912,8 @@ def main(params=None): | |
42 | useCommonWords=args.common_words, | |
43 | useLeet=args.leet, | |
44 | useLocales=args.locales, | |
45 | - extraWords=extraWords | |
46 | + extraWords=extraWords, | |
47 | + outputFile=args.outputFile | |
48 | ) | |
49 | ||
50 | # Urging users to place an issue on Github... |
1 | 1 | Upstream creates and initializes the ~/.config/OSRFramework in the |
2 | 2 | setup.py. We disable this for Kali and create a function |
3 | 3 | initialize_config_files to manage the creation and installation of all |
4 | the required files, including maltego settings. | |
4 | the required files. | |
5 | 5 | Author: Sophie Brun <[email protected]> |
6 | 6 | Last-Update: 2017-09-18 |
7 | 7 | --- |
8 | 8 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
9 | 9 | --- a/osrframework/utils/configuration.py |
10 | 10 | +++ b/osrframework/utils/configuration.py |
11 | @@ -22,8 +22,52 @@ | |
12 | ||
11 | @@ -23,9 +23,40 @@ | |
12 | import ConfigParser | |
13 | 13 | import os |
14 | 14 | import sys |
15 | 15 | +import shutil |
16 | 16 | +import glob |
17 | 17 | import osrframework.utils.errors as errors |
18 | 18 | |
19 | + | |
19 | ||
20 | 20 | +def initialize_config_files(): |
21 | 21 | + """ |
22 | 22 | + Function to create and initialize the configuration files and |
23 | 23 | + directories. |
24 | 24 | + """ |
25 | 25 | + LOCAL_CONFIG_DIR = getConfigPath()["appPath"] |
26 | + LOCAL_CONFIG_TRANSFORMS_DIR = getConfigPath()["appPathTransforms"] | |
26 | +# LOCAL_CONFIG_TRANSFORMS_DIR = getConfigPath()["appPathTransforms"] | |
27 | 27 | + INSTALL_PATH = '/usr/lib/python2.7/dist-packages/osrframework' |
28 | 28 | + |
29 | 29 | + # Copy default config file into osrframework local config |
30 | + for dirconf in ["default", "plugins", "server"]: | |
30 | + for dirconf in ["default", "plugins"]: | |
31 | 31 | + shutil.copytree(os.path.join('/etc/osrframework',dirconf), os.path.join(LOCAL_CONFIG_DIR, dirconf)) |
32 | 32 | + |
33 | 33 | + # Create directory data |
34 | 34 | + os.mkdir(getConfigPath()["appPathData"]) |
35 | 35 | + |
36 | 36 | + # Create directory Transforms before copy *.py files |
37 | + os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR) | |
37 | +# os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR) | |
38 | 38 | + |
39 | 39 | + # Copy *.py files in transforms directory |
40 | + for f in glob.glob(os.path.join(INSTALL_PATH, "transforms/[a-z]*.py")): | |
41 | + shutil.copy(f, LOCAL_CONFIG_TRANSFORMS_DIR) | |
42 | + for f in ["alias_generator.py", "entify.py", "phonefy.py", "searchfy.py", "mailfy.py", "usufy.py", "domainfy.py"]: | |
43 | + shutil.copy((os.path.join(INSTALL_PATH, f)), LOCAL_CONFIG_TRANSFORMS_DIR) | |
40 | +# for f in glob.glob(os.path.join(INSTALL_PATH, "transforms/[a-z]*.py")): | |
41 | +# shutil.copy(f, LOCAL_CONFIG_TRANSFORMS_DIR) | |
42 | +# for f in ["alias_generator.py", "entify.py", "phonefy.py", "searchfy.py", "mailfy.py", "usufy.py", "domainfy.py", "enumerate-profiles.py"]: | |
43 | +# shutil.copy((os.path.join(INSTALL_PATH, f)), LOCAL_CONFIG_TRANSFORMS_DIR) | |
44 | 44 | + |
45 | 45 | + # Copy default config files for the user |
46 | 46 | + for f in ["browser.cfg", "general.cfg"]: |
47 | 47 | + shutil.copy((os.path.join(getConfigPath()["appPathDefaults"], f)),LOCAL_CONFIG_DIR) |
48 | 48 | + |
49 | + # Configure maltego | |
50 | + LOCAL_CONFIG_DEFAULT_DIR = getConfigPath()["appPathDefaults"] | |
51 | + try: | |
52 | + import osrframework.transforms.lib.configure_maltego as maltego | |
53 | + maltego.configureMaltego(transformsConfigFolder=LOCAL_CONFIG_TRANSFORMS_DIR, | |
54 | + base=os.path.join(LOCAL_CONFIG_DEFAULT_DIR, "osrframework-maltego-settings"), | |
55 | + debug=False, backupPath=LOCAL_CONFIG_DEFAULT_DIR) | |
56 | + except Exception, e: | |
57 | + print "[!] The Maltego configuration file to use i3visio transforms could not be created and thus, cannot be used. Check the following error:" | |
58 | + print str(e) | |
59 | + | |
60 | + | |
61 | 49 | def changePermissionsRecursively(path, uid, gid): |
62 | 50 | """ |
63 | Function to recursively change the user id and group id. It sets 700 | |
64 | @@ -84,9 +128,10 @@ def getConfigPath(configFileName = None) | |
51 | Function to recursively change the user id and group id. | |
52 | @@ -92,9 +123,10 @@ def getConfigPath(configFileName = None) | |
65 | 53 | } |
66 | 54 | |
67 | 55 | # Creating them if they don't exist |
75 | 63 | |
76 | 64 | return paths |
77 | 65 | |
78 | @@ -100,6 +145,8 @@ def returnListOfConfigurationValues(util | |
79 | ''' | |
66 | @@ -117,6 +149,8 @@ def returnListOfConfigurationValues(util | |
67 | """ | |
80 | 68 | |
81 | 69 | VALUES = {} |
82 | 70 | + if not os.path.exists(getConfigPath()["appPath"]): |
0 | fix-syntax-error.patch | |
1 | 0 | cleanup-setup.patch |
2 | 1 | dont-use-validate-email.patch |
3 | 2 | drop-explicit-need-of-importlib.patch |
4 | 3 | upgrade-installation.patch |
5 | fix-exit-function.patch | |
6 | 4 | initalize-config.patch |
7 | 5 | add-script-config-upgrade.patch |
8 | drop-check-updates.patch | |
9 | create-real-temporary-dir.patch | |
6 | fix-alias-generator.patch |
9 | 9 | This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
10 | 10 | --- a/setup.py |
11 | 11 | +++ b/setup.py |
12 | @@ -22,6 +22,8 @@ | |
12 | @@ -23,6 +23,7 @@ | |
13 | 13 | |
14 | 14 | import os |
15 | 15 | import sys |
16 | 16 | +import glob |
17 | + | |
18 | from setuptools import setup | |
19 | ||
20 | # Checking if obsolete versions are installed in the machine | |
21 | @@ -179,6 +181,11 @@ setup( | |
22 | "osrframework.searchengines", | |
23 | "osrframework.domains", | |
17 | from setuptools import setup, find_packages | |
18 | import shutil | |
19 | import site | |
20 | @@ -168,6 +169,11 @@ setup( | |
21 | 'Topic :: Text Processing :: Markup :: HTML' | |
24 | 22 | ], |
23 | packages=find_packages(), | |
25 | 24 | + data_files=[ |
26 | 25 | + ("/etc/osrframework/default", glob.glob("config/*.cfg")), |
27 | 26 | + ("/etc/osrframework/plugins/patterns", ["config/plugins/pattern.py.sample"]), |