当前位置: 首页>>代码示例>>Python>>正文


Python MaltegoTransform.getValue方法代码示例

本文整理汇总了Python中MaltegoTransform.getValue方法的典型用法代码示例。如果您正苦于以下问题:Python MaltegoTransform.getValue方法的具体用法?Python MaltegoTransform.getValue怎么用?Python MaltegoTransform.getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MaltegoTransform的用法示例。


在下文中一共展示了MaltegoTransform.getValue方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
import fnmatch, os

from MaltegoTransform import *
from lxml             import etree

m = MaltegoTransform()
m.parseArguments(sys.argv)

filename = m.getValue()

results = []

if os.path.isdir(filename):
  for root, dirnames, filenames in os.walk(filename):
    for result in fnmatch.filter(filenames, 'results.xml'):
      results.append(os.path.join(root, result))
else:
  results.append(filename)

for result in results:
  document = etree.parse(result)

  for host in document.xpath("//host[ports/port[state[@state='open']]]"):
    iface = None

    for addr in host.xpath("address[@addrtype='ipv4']"):
      iface = m.addEntity("maltego.IPv4Address", addr.attrib['addr'])

    if iface != None:
      ports = []
开发者ID:blewetda,项目名称:maltego-nmap,代码行数:32,代码来源:nmap_xml_parser.py

示例2: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#!/usr/bin/env python
import sys
import urllib2
from MaltegoTransform import *

mt = MaltegoTransform()
mt.parseArguments(sys.argv)
SearchString = mt.getValue()
mt = MaltegoTransform()

url = 'http://api.predator.wtf/resolver/?arguments='+SearchString
ipaddress = urllib2.urlopen(url).read()
mt.addEntity("maltego.IPv4Address",ipaddress)
mt.returnOutput()
开发者ID:4sp1r3,项目名称:Skype-Maltego-Client,代码行数:16,代码来源:Skype_GetIP.py

示例3: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#!/usr/bin/python 
import sys
import csv
import os,sys,time,random
from MaltegoTransform import *

me = MaltegoTransform();
me.parseArguments(sys.argv);
csv_file = me.getValue();

csv_reader = csv.reader(open(csv_file), delimiter = ',');
sourceClients = []
for row in csv_reader:
	sourceClients.append(row[0]);

sourceClientsUnique = dict(map(lambda i: (i,1),sourceClients)).keys()
for s in sourceClientsUnique:

	myentity = me.addEntity("IPAddress",s);
	myentity.addAdditionalFields("file","CSV File",None,csv_file);
	
me.returnOutput();
开发者ID:cmlh,项目名称:Maltego-pyCSV,代码行数:24,代码来源:GetSourceClients.py

示例4: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#!/usr/bin/python

#################
# NMAP SCAN TOOL#
#################

import os, sys, re
from MaltegoTransform import *

m_ent = MaltegoTransform();
m_ent.parseArguments(sys.argv);
m_ent.getValue();


ports = "20-25,80,6789"
victim = sys.argv[1] # ip address of victim  
file_name = victim

nmap_cmd_line_args = "nmap -oG " + file_name + " -sV -p" + ports + " " + victim + ">" + file_name + ".txt"

os.system(nmap_cmd_line_args)

# open output file of nmap
f = open(file_name)
for line in f:
    cut_host = re.sub(r'Host(.*)\t', '', line)
    if cut_host[:5] == "Ports":
        cut_ports = re.sub(r'Ports: ', '', cut_host)
        fields = cut_ports.split(", ")
        for field in fields:
            kill_slash = field.replace("//", "/")
开发者ID:Erik-k,项目名称:maltego_project,代码行数:33,代码来源:nmap_middle_xform.py

示例5: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#!/usr/bin/python
from MaltegoTransform import *
import sys
import urllib2
import re
mt = MaltegoTransform()
mt.parseArguments(sys.argv)
domain=mt.getValue()
url="http://safeweb.norton.com/heartbleed?url=www."
getrequrl=url+domain
try:
  response = urllib2.urlopen(getrequrl)
  ser=re.search(r'is vulnerable',response.read())
  if ser:
    print "a"
    mt.addEntity("maltego.Phrase","HeartBleed Vulnerable")
except:
  print ""
mt.returnOutput()
开发者ID:Brentbin,项目名称:Maltego-Transforms,代码行数:21,代码来源:Heartbleed.py

示例6: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#!/usr/bin/python
 
#reverseipdomain.py
#Author: Sudhanshu Chauhan - @Sudhanshu_C
 
#This Script will perform a reverse IP domain check using http://www.yougetsignal.com
#In case yougetsignal is down due to overload, we can also use: http://www.my-ip-neighbors.com/?domain=. Simply change the value of the parameter 'opencnam'.
 
from MaltegoTransform import *
import sys
import urllib2
import re
mt = MaltegoTransform()
mt.parseArguments(sys.argv)
url=mt.getValue()
mt = MaltegoTransform()
opencnam="http://domains.yougetsignal.com/domains.php?remoteAddress="
getrequrl=opencnam+url
header={'User-Agent':'Mozilla',}
req=urllib2.Request(getrequrl,None,header)
response=urllib2.urlopen(req)
domains=re.findall("((?:[0-9]*[a-z][a-z\\.\\d\\-]+)\\.(?:[0-9]*[a-z][a-z\\-]+))(?![\\w\\.])",response.read())
for domain in domains:
  mt.addEntity("maltego.Domain", domain)
mt.returnOutput()
开发者ID:Brentbin,项目名称:Maltego-Transforms,代码行数:27,代码来源:reverseipdomain.py

示例7: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#!/usr/bin/python

# phntocomp.py
# Author: Sudhanshu Chauhan - @Sudhanshu_C

# This Script will retrieve the Company name from the provided Phone Number
# It uses the API provided by https://www.opencnam.com
# For MaltegoTransform library and Installation guidelines go to http://www.paterva.com/web6/documentation/developer-local.php

from MaltegoTransform import *
import sys
import urllib2

mt = MaltegoTransform()
mt.parseArguments(sys.argv)
phn = mt.getValue()
phn = phn.replace(" ", "")
mt = MaltegoTransform()
opencnam = "https://api.opencnam.com/v2/phone/"
getrequrl = opencnam + phn
response = urllib2.urlopen(getrequrl)
mt.addEntity("maltego.Phrase", response.read())
mt.returnOutput()
开发者ID:nkpanda,项目名称:Maltego-Transforms,代码行数:25,代码来源:phntocomp.py

示例8: MaltegoTransform

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#Based upon the service Rapportive: http://www.rapportive.com/
#Credits: This code is based upon the research and code of Jordan Wright.
#Blog Link: http://jordan-wright.github.io/blog/2013/10/14/automated-social-engineering-recon-using-rapportive/
#Code Link: https://github.com/jordan-wright/rapportive
#This code requires the Requests library: https://pypi.python.org/pypi/requests/
#Rapportive Code: https://github.com/SudhanshuC/Rapportive/blob/master/rapportive.py
#For MaltegoTransform library and Installation guidelines go to http://www.paterva.com/web6/documentation/developer-local.php
  
from MaltegoTransform import *
import sys
import urllib2
import requests
mt = MaltegoTransform()
mt.parseArguments(sys.argv)
target_email=mt.getValue()
mt = MaltegoTransform()
random_email="[email protected]"
response = requests.get('https://rapportive.com/login_status?user_email=' + random_email).json()
profile = requests.get('https://profiles.rapportive.com/contacts/email/' + target_email, headers = {'X-Session-Token' : response['session_token']}).json()

if profile['contact']['name']:
  mt.addEntity("maltego.Person", profile['contact']['name'])

if profile['contact']['location']:
  mt.addEntity("maltego.Location", profile['contact']['location'])

if profile['contact']['occupations']:
  for occupation in profile['contact']['occupations']:
    mt.addEntity("maltego.Phrase", "Job Title: " + occupation['job_title'] + " at " + occupation['company'])
开发者ID:Brentbin,项目名称:Maltego-Transforms,代码行数:31,代码来源:Email-Rapportive.py

示例9: Domain

# 需要导入模块: import MaltegoTransform [as 别名]
# 或者: from MaltegoTransform import getValue [as 别名]
#This Script will retrieve the Domain(s) at which the specified account has been compromised
#It uses the API provided by https://haveibeenpwned.com/
#Special Thanks to Troy Hunt - http://www.troyhunt.com/
#For MaltegoTransform library and Installation guidelines go to http://www.paterva.com/web6/documentation/developer-local.php

import sys
import urllib2
import json

from MaltegoTransform import *

HIBP = "https://haveibeenpwned.com/api/breachedaccount/"

mt = MaltegoTransform()
mt.parseArguments(sys.argv)
email = mt.getValue()
mt = MaltegoTransform()
getrequrl = HIBP + email

try:
    response = urllib2.urlopen(getrequrl)
    data = json.load(response)
    response = data
    for rep in response:
        mt.addEntity("maltego.Phrase","Pwned at " + rep)

except urllib2.URLError, e:  # "Response Codes" within https://haveibeenpwned.com/API/v1
    
    if e.code == 400:
        mt.addUIMessage("The e-mail account does not comply with an acceptable format",messageType="PartialError")
    
开发者ID:Brentbin,项目名称:Maltego-Transforms,代码行数:32,代码来源:emailtoHIBP.py


注:本文中的MaltegoTransform.getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。