Codebase list osrframework / debian/0.18.0-0kali1
Import new upstream release (Closes 4469) Sophie Brun 6 years ago
14 changed file(s) with 113 addition(s) and 170 deletion(s). Raw diff Collapse all Expand all
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
08 osrframework (0.17.2-0kali1) kali-dev; urgency=medium
19
210 * Initial release (Closes: 3042)
66 Homepage: https://github.com/i3visio/osrframework
77 Vcs-Git: git://git.kali.org/packages/osrframework.git
88 Vcs-Browser: http://git.kali.org/gitweb/?p=packages/osrframework.git;a=summary
9 Testsuite: autopkgtest-pkg-python
109
1110 Package: osrframework
1211 Architecture: all
1514 This package contains a set of libraries developed by i3visio to perform Open
1615 Source Intelligence tasks. They include references to a bunch of different
1716 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.
22 Source: https://github.com/i3visio/osrframework
33
44 Files: *
5 Copyright: 2014-2017 F. Brezo and Y. Rubio, i3visio
5 Copyright: 2014-2018 F. Brezo and Y. Rubio, i3visio
66 License: AGPL-3+
77
88 Files: debian/*
9 Copyright: 2017 Sophie Brun <[email protected]>
9 Copyright: 2017-2018 Sophie Brun <[email protected]>
1010 License: AGPL-3+
1111
1212 License: AGPL-3+
0 osrframework/transforms/lib/TUTORIAL-MALTEGO.txt
10 README.md
21 doc/*
+0
-2
debian/osrframework.install less more
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/
013 --- /dev/null
114 +++ b/osrframework/utils/upgrade_config.py
215 @@ -0,0 +1,12 @@
1427 + configuration.initialize_config_files()
1528 --- a/osrframework/utils/configuration.py
1629 +++ 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"]:
1932 shutil.copytree(os.path.join('/etc/osrframework',dirconf), os.path.join(LOCAL_CONFIG_DIR, dirconf))
2033
2134 - # Create directory data
2639 + os.mkdir(getConfigPath()["appPathData"])
2740
2841 # Create directory Transforms before copy *.py files
29 os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR)
42 # os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR)
6060 -
6161 - command = "echo '''" + new_lines + "''' >> ~/.bashrc"
6262 - 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()
6464 - except:
6565 - IS_VIRTUAL_ENV = True
6666 - else:
7070 +
7171 +# command = "echo '''" + new_lines + "''' >> ~/.bashrc"
7272 +# 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()
7474 +# except:
7575 +# IS_VIRTUAL_ENV = True
7676 +# else:
103103 - print "[*] No OSRFramework installation found in the system."
104104 -else:
105105 - print "[*] OSRFramework seems to be installed using `virtualenv`."
106 -
107 -HERE = os.path.abspath(os.path.dirname(__file__))
108106 +# if os.path.isdir(osrframeworkSystemPath):
109107 +# print "[!] Found an old installation at: " + osrframeworkSystemPath
110108 +# try:
118116 +# print "[*] No OSRFramework installation found in the system."
119117 +#else:
120118 +# print "[*] OSRFramework seems to be installed using `virtualenv`."
121 +#
119
120 -HERE = os.path.abspath(os.path.dirname(__file__))
122121 +#HERE = os.path.abspath(os.path.dirname(__file__))
123122
124123 # Importing the temporal scripts for the setup and taking the new version number
148147
149148 # Reading the .md file
150149 try:
151 @@ -218,101 +218,101 @@ setup(
150 @@ -206,49 +206,49 @@ setup(
152151 ############################
153152 ### Creating other files ###
154153 ############################
176175 - os.path.join("config", "browser.cfg"),
177176 - os.path.join("config", "general.cfg"),
178177 - ],
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 - ],
216178 - paths["appPathWrappers"] : [
217179 - os.path.join("config", "plugins", "wrapper.py.sample"),
218180 - ],
219181 - paths["appPathPatterns"] : [
220182 - os.path.join("config", "plugins", "pattern.py.sample"),
221 - ],
222 - paths["appPathServer"] : [
223 - os.path.join("osrframework", "static"),
224 - os.path.join("osrframework", "templates"),
225183 - ]
226184 -}
227185 +#print "[*] Copying relevant files..."
236194 +# os.path.join("config", "browser.cfg"),
237195 +# os.path.join("config", "general.cfg"),
238196 +# ],
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 +# ],
276197 +# paths["appPathWrappers"] : [
277198 +# os.path.join("config", "plugins", "wrapper.py.sample"),
278199 +# ],
279200 +# paths["appPathPatterns"] : [
280201 +# os.path.join("config", "plugins", "pattern.py.sample"),
281 +# ],
282 +# paths["appPathServer"] : [
283 +# os.path.join("osrframework", "static"),
284 +# os.path.join("osrframework", "templates"),
285202 +# ]
286203 +#}
287204
288205 # Iterating through all destinations to write the info
289206 -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
291209 - for sourceFile in files_to_copy[destiny]:
292210 - fileToMove = os.path.join(HERE,sourceFile)
293 -
294 +#for destiny in files_to_copy.keys():
295 +# # Grabbing each source file to be moved
296211 +# for sourceFile in files_to_copy[destiny]:
297212 +# fileToMove = os.path.join(HERE,sourceFile)
298 +#
213
299214 # Choosing the command depending on the SO
300215 - if sys.platform == 'win32':
301216 - if os.path.isdir(fileToMove):
320235 #print cmd
321236 - output = os.popen(cmd).read()
322237 +# output = os.popen(cmd).read()
323
324 -print
325 -print "[*] Last part: trying to configure Maltego Transforms..."
326 +#print
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 -print
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 +#print
77 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
88 --- a/osrframework/mailfy.py
99 +++ b/osrframework/mailfy.py
10 @@ -42,7 +42,7 @@ import sys
10 @@ -33,7 +33,7 @@ import sys
1111
1212 # Email verification libraries
1313 import emailahoy
1414 -import validate_email
1515 +#import validate_email
1616
17 import osrframework
1718 import osrframework.thirdparties.haveibeenpwned_com.hibp as hibp
18 import osrframework.utils.banner as banner
1919 --- a/setup.py
2020 +++ b/setup.py
21 @@ -196,7 +196,7 @@ setup(
21 @@ -184,7 +184,7 @@ setup(
2222 "tweepy",
2323 "networkx",
2424 "decorator",
66 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
77 --- a/setup.py
88 +++ b/setup.py
9 @@ -201,7 +201,7 @@ setup(
9 @@ -189,7 +189,7 @@ setup(
1010 "tabulate",
1111 "oauthlib>=1.0.0",
1212 # 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...
11 Upstream creates and initializes the ~/.config/OSRFramework in the
22 setup.py. We disable this for Kali and create a function
33 initialize_config_files to manage the creation and installation of all
4 the required files, including maltego settings.
4 the required files.
55 Author: Sophie Brun <[email protected]>
66 Last-Update: 2017-09-18
77 ---
88 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
99 --- a/osrframework/utils/configuration.py
1010 +++ b/osrframework/utils/configuration.py
11 @@ -22,8 +22,52 @@
12
11 @@ -23,9 +23,40 @@
12 import ConfigParser
1313 import os
1414 import sys
1515 +import shutil
1616 +import glob
1717 import osrframework.utils.errors as errors
1818
19 +
19
2020 +def initialize_config_files():
2121 + """
2222 + Function to create and initialize the configuration files and
2323 + directories.
2424 + """
2525 + LOCAL_CONFIG_DIR = getConfigPath()["appPath"]
26 + LOCAL_CONFIG_TRANSFORMS_DIR = getConfigPath()["appPathTransforms"]
26 +# LOCAL_CONFIG_TRANSFORMS_DIR = getConfigPath()["appPathTransforms"]
2727 + INSTALL_PATH = '/usr/lib/python2.7/dist-packages/osrframework'
2828 +
2929 + # Copy default config file into osrframework local config
30 + for dirconf in ["default", "plugins", "server"]:
30 + for dirconf in ["default", "plugins"]:
3131 + shutil.copytree(os.path.join('/etc/osrframework',dirconf), os.path.join(LOCAL_CONFIG_DIR, dirconf))
3232 +
3333 + # Create directory data
3434 + os.mkdir(getConfigPath()["appPathData"])
3535 +
3636 + # Create directory Transforms before copy *.py files
37 + os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR)
37 +# os.mkdir(LOCAL_CONFIG_TRANSFORMS_DIR)
3838 +
3939 + # 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)
4444 +
4545 + # Copy default config files for the user
4646 + for f in ["browser.cfg", "general.cfg"]:
4747 + shutil.copy((os.path.join(getConfigPath()["appPathDefaults"], f)),LOCAL_CONFIG_DIR)
4848 +
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 +
6149 def changePermissionsRecursively(path, uid, gid):
6250 """
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)
6553 }
6654
6755 # Creating them if they don't exist
7563
7664 return paths
7765
78 @@ -100,6 +145,8 @@ def returnListOfConfigurationValues(util
79 '''
66 @@ -117,6 +149,8 @@ def returnListOfConfigurationValues(util
67 """
8068
8169 VALUES = {}
8270 + if not os.path.exists(getConfigPath()["appPath"]):
0 fix-syntax-error.patch
10 cleanup-setup.patch
21 dont-use-validate-email.patch
32 drop-explicit-need-of-importlib.patch
43 upgrade-installation.patch
5 fix-exit-function.patch
64 initalize-config.patch
75 add-script-config-upgrade.patch
8 drop-check-updates.patch
9 create-real-temporary-dir.patch
6 fix-alias-generator.patch
99 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
1010 --- a/setup.py
1111 +++ b/setup.py
12 @@ -22,6 +22,8 @@
12 @@ -23,6 +23,7 @@
1313
1414 import os
1515 import sys
1616 +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'
2422 ],
23 packages=find_packages(),
2524 + data_files=[
2625 + ("/etc/osrframework/default", glob.glob("config/*.cfg")),
2726 + ("/etc/osrframework/plugins/patterns", ["config/plugins/pattern.py.sample"]),
0 Skype4Py python-skype4py
10 python_whois python-whois
21 pyexcel python-pyexcel
32 pyexcel_ods python-pyexcel-ods