This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TeamVega

Pages: [1] 2
1
Scripting Languages / Re: [Python] Udemy course extractor
« on: January 26, 2016, 03:41:22 PM »
Why dont you use
https://github.com/nishad/udemy-dl-windows

register on udemy using a fake email, click on start Free Preview and then run the utility, it will download in the background all the videos.

2
General discussion / Cobalt Strike 3.0
« on: September 25, 2015, 10:05:19 AM »
Hi Guys

Has anybody checked out Cobalt Strike 3.0?

3
General discussion / Re: Passware vs Elcomsoft
« on: July 30, 2015, 06:20:42 PM »
Thanks 0E 800

4
General discussion / Re: Passware vs Elcomsoft
« on: July 30, 2015, 11:19:55 AM »
not really, just wanted to know if anybody is using either one of them and if it fulfills their needs.

5
General discussion / Passware vs Elcomsoft
« on: July 30, 2015, 09:42:51 AM »
Hi Guys

Does anybody use this software:

www.lostpassword.com/kit-forensic.htm or www.elcomsoft.com  or any of their other products?

6
Scripting Languages / Re: Udemy Video downloader Python script
« on: July 16, 2015, 11:19:08 AM »
HI Guys

This guy fixed it github.com/nishad:




Code: [Select]
#!/usr/bin/env python
# -*- coding: utf8 -*-

import requests
import requests.sessions
import argparse
import getpass
import sys
import re
import os
import json
from .download import download, DLException


class Session:
    headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0',
               'X-Requested-With': 'XMLHttpRequest',
               'Host': 'www.udemy.com',
               'Referer': 'https://www.udemy.com/join/login-popup'}

    def __init__(self):
        self.session = requests.sessions.Session()
       
    def set_auth_headers(self, access_token, client_id):
        self.headers['X-Udemy-Bearer-Token'] = access_token
        self.headers['X-Udemy-Client-Id'] = client_id

    def get(self, url):
        return self.session.get(url, headers=self.headers)

    def post(self, url, data):
        return self.session.post(url, data, headers=self.headers)


session = Session()


def get_csrf_token():
    response = session.get('https://www.udemy.com/join/login-popup')
    match = re.search("name=\'csrfmiddlewaretoken\' value=\'(.*)\'", response.text)
    return match.group(1)

def login(username, password):
    locale = 'en_US'
    login_url = 'https://www.udemy.com/join/login-popup'
    csrf_token = get_csrf_token()
    payload = {'isSubmitted': 1, 'email': username, 'password': password,
               'displayType': 'json', 'csrfmiddlewaretoken': csrf_token, 'locale': locale, 'DEBUG':True }
    session.headers.update({'referer': 'https://www.udemy.com/join/login-popup'})
    response = session.post(login_url, payload)

    access_token = response.cookies.get('access_token')
    client_id = response.cookies.get('client_id')
    session.set_auth_headers(access_token, client_id)

    response = response.text
    if 'error' in response:
        print(response)
        sys.exit(1)


def get_course_id(course_link):
    response = session.get(course_link)
    matches = re.search('data-courseid="(\d+)"', response.text, re.IGNORECASE)
    return matches.groups()[0] if matches else None


def parse_video_url(lecture_id, hd=False):
    '''A hacky way to find the json used to initalize the swf object player'''
    embed_url = 'https://www.udemy.com/embed/{0}'.format(lecture_id)
    html = session.get(embed_url).text

    data = re.search(r'\$\("#player"\).jwplayer\((.*?)\);.*</script>', html,
                     re.MULTILINE | re.DOTALL).group(1)
    video = json.loads(data)

    if 'playlist' in video and 'sources' in video['playlist'][0]:
        if hd:
            for source in video['playlist'][0]['sources']:
                if '720' in source['label'] or 'HD' in source['label']:
                    return source['file']

        # The 360p case and fallback if no HD version
        source = video['playlist'][0]['sources'][0]
        return source['file']
    else:
        print("Failed to parse video url")
        return None


def get_video_links(course_id, hd=False):
    course_url = 'https://www.udemy.com/api-1.1/courses/{0}/curriculum?fields[lecture]=@min,completionRatio,progressStatus&fields[quiz]=@min,completionRatio'.format(course_id)
    course_data = session.get(course_url).json()

    chapter = None
    video_list = []

    lecture_number = 0
    chapter_number = 0
    # A udemy course has chapters, each having one or more lectures
    for item in course_data:
        if item['__class'] == 'chapter':
            chapter = item['title']
            chapter_number += 1
            lecture_number = 1
        elif item['__class'] == 'lecture' and item['assetType'] == 'Video':
            lecture = item['title']
            try:
                lecture_id = item['id']
                video_url = parse_video_url(lecture_id, hd)
                video_list.append({'chapter': chapter,
                                   'lecture': lecture,
                                   'video_url': video_url,
                                   'lecture_number': lecture_number,
                                   'chapter_number': chapter_number})
            except:
                print('Cannot download lecture "%s"' % (lecture))
            lecture_number += 1
    return video_list


def sanitize_path(s):
    return "".join([c for c in s if c.isalpha() or c.isdigit() or c in ' .-_,']).rstrip()


def mkdir(directory):
    if not os.path.exists(directory):
        os.makedirs(directory)


def get_video(directory, filename, link):
    print('Downloading %s  ' % (filename.encode('utf-8')))
    previous_dir = os.getcwd()
    mkdir(directory)
    os.chdir(directory)
    try:
        download(link, filename)
    except DLException as e:
        print('Couldn\'t download this lecture: {0}'.format(e))
    os.chdir(previous_dir)
    print('\n'),

def udemy_dl(username, password, course_link, dest_dir=""):
    login(username, password)

    course_id = get_course_id(course_link)
    if not course_id:
        print('Failed to get course ID')
        return

    for video in get_video_links(course_id, hd=True):
        directory = '%02d %s' % (video['chapter_number'], video['chapter'])
        directory = sanitize_path(directory)

        if dest_dir:
            directory = os.path.join(dest_dir, directory)

        filename = '%03d %s.mp4' % (video['lecture_number'], video['lecture'])
        filename = sanitize_path(filename)

        get_video(directory, filename, video['video_url'])

    session.get('http://www.udemy.com/user/logout')


def main():
    parser = argparse.ArgumentParser(description='Fetch all the videos for a udemy course')
    parser.add_argument('link', help='Link for udemy course', action='store')
    parser.add_argument('-u', '--username', help='Username/Email', default=None, action='store')
    parser.add_argument('-p', '--password', help='Password', default=None, action='store')
    parser.add_argument('-o', '--output-dir', help='Output directory', default=None, action='store')

    args = vars(parser.parse_args())

    username = args['username']
    password = args['password']
    link = args['link'].rstrip('/')

    if args['output_dir']:
        # Normalize the output path if specified
        output_dir = os.path.normpath( args['output_dir'] )
    else:
        # Get output dir name from the URL
        output_dir = os.path.join( ".", link.rsplit('/', 1)[1] )

    if not username:
        try:
            username = raw_input("Username/Email: ")  # Python 2
        except NameError:
            username = input("Username/Email: ")  # Python 3

    if not password:
        password = getpass.getpass(prompt='Password: ')

    print('Downloading to: %s\n' % (os.path.abspath(output_dir)) )

    udemy_dl(username, password, link, output_dir)


if __name__ == '__main__':
    main()

7
Scripting Languages / Re: Udemy Video downloader Python script
« on: July 16, 2015, 06:37:33 AM »
Thanks Guys.  8)

8
Scripting Languages / Udemy Video downloader Python script
« on: July 15, 2015, 03:41:14 PM »
Hi guys

does anybody have an updated udemy video downloader as i have check out this project:
github.com/gaganpreet/udemy-dl

However it seems as though Udemy has updated their login pages. csrfmiddlewaretoken is introduced instead of csrf and it throws up CSRF verification failed.Request aborted.And it seems as though they are also using a csrftoken cookie as well.

I know there was an old one here on the forum but that one is out of date.

9
Hacking and Security / Cobalt Strike
« on: March 23, 2015, 05:51:41 AM »
HI Guys

Does anybody have a copy of the dvd that has cobalt strike and the labs that is given out by Raphael?

Thanks

10
You can change the registry entries to allow you access - so disable the registry and the command prompt, also ensure that they cant install another browser

11
Found it on the Webs / Kali Alternative
« on: August 27, 2014, 12:20:00 PM »
HI Guys

Check out Parrot OS:

http://www.parrotsec.org/index.php/Main_Page

Looks very cool.

12
Hacking and Security / Re: Terminals XML File Decryption
« on: April 01, 2014, 05:04:04 PM »
Thanks noncetonic

13
Hacking and Security / Terminals XML File Decryption
« on: April 01, 2014, 10:44:41 AM »
HI Guys

does anybody know how to decrypt the xml file that Terminals creates?

terminals.codeplex.com/SourceControl/latest#Main/Source/Terminals/Security/PasswordFunctions2.cs

the above link is to the source

I would like to learn how to decrypt the string below:

mhZHWa3gaWbAQGoKbe7ydDKHVr4Omu+lAdanhbhkmzs=

Any help would be great thanks.

14
Projects and Discussion / Cobol
« on: February 10, 2014, 06:04:55 PM »
Hi Guys


does anybody have any ideas on how to extract or view data stored in cobol flat files?

15
Found it on the Webs / BlackArch Linux
« on: January 14, 2014, 06:49:59 AM »
Hi Guys


BlackArch Linux has released new ISO and they contain over 600 tools, check it out:


http://blackarch.org/download.html


Pages: [1] 2


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.