Jump to content
Fi8sVrs

Getjarpy - Download applications from Getjar

Recommended Posts

  • Active Members
Posted

Github Link

Informations

Getjarpy is easy-to-use script/software with main use to download particular files from website GetJar | Mobile - Appsolutely Everything - worlds biggest open appstore, the oldest living database for downloading JAR files (applications, games, etc.) primary for older mobile phones. Getjarpy is transforming user-data and tricking website that it's been accessed over mobile phone and allowing user to automatically download JAR application. Note that GetJar official website is not allowing users to download files from PC as you can see from screencast bellow!

KkyTa3b.gif

getjarpy.py

__author__ = 'dn5'

__blog__ = 'http://dn5.ljuska.org'

__github__ = 'https://github.com/dn5/getjarpy'

__twitter__ = 'https://twitter.com/dn5__'

__email__ = 'dn5@dn5.ljuska.org'

import BeautifulSoup

import urllib2

import socket

import re

import sys

########################## Details setting / About

gjpyLogo = " _ _ \n"\

" __ _ ___| |_ (_) __ _ _ __ _ __ _ _ \n"\

" / _` |/ _ \ __|| |/ _` | '__| '_ \| | | |\n"\

"| (_| | __/ |_ | | (_| | | | |_) | |_| |\n"\

" \__, |\___|\__|/ |\__,_|_| | .__/ \__, |\n"\

" |___/ |__/ |_| |___/ \n"\

"Simple GetJar java application downloader "\

gjpyInfo = "Coded by dn5 / http://dn5.ljuska.org / @dn5__ \n"

gjpyUsage = "Usage: python getjarpy.py http://getjar.mobi/mobile/xxxxxx/name-of-app-model localFileName"

gjpyExample = "Example: python getjarpy.py http://www.getjar.mobi/mobile/567704/fooddash-for-nokia-5130-xpressmusic/ FoodDash"

########################## Basic testing for arguments

if len(sys.argv) == 1:

print gjpyLogo

print gjpyInfo

print "You didn't supply arguments! Use getjar.py --help for details."

sys.exit()

if len(sys.argv) == 2:

if sys.argv[1] == "--help":

print gjpyLogo

print gjpyInfo

print gjpyUsage

print gjpyExample

sys.exit()

if len(sys.argv) == 3:

print gjpyLogo

print gjpyInfo

print gjpyUsage

print gjpyExample

print "\nSetting a link for exploitation!"

permaLink = sys.argv[1]

print permaLink +"\n"

#print "\nYour settings:"

#print "Argument 0: " + sys.argv[0]

#print "Argument 1: " + sys.argv[1]

#print "Argument 2: " + sys.argv[2]

print "\nWriting other settings!"

########################## Setting variables

ua = "Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (J2ME/22.478; U; en) Presto/2.5.25 Version/10.54" # User-agent

ol = "http://m.getjar.mobi/" # Original link

mobileModel = "nokia-5130-xpressmusic/"

setJavaModel = "--java/?d=-java"

localFile = sys.argv[2]+".jar"

########################## Setting particular exploitation constants

mainLink = permaLink.replace("-for-"+mobileModel, "-for"+setJavaModel)

mainLink = mainLink.replace("http://www.", "http://m.")

print "Trying to exploit this URL: " + mainLink

########################## Starting the production

req = urllib2.Request(mainLink)

req.add_unredirected_header('User-Agent', ua)

response = urllib2.urlopen(req)

#print req.header_items()

try:

html = response.read()

# print html

except urllib2.URLError, e:

print "w00t w00t - Error while reading data. Are you connected to the interwebz?!", e

sys.exit()

print "Extracting some files from URL ..."

soup = BeautifulSoup.BeautifulSoup(html)

form = soup.find('form', id='form_product_page').get('action')

reqDownload = urllib2.Request(ol + form)

responseDownload = urllib2.urlopen(reqDownload)

responseRead = responseDownload.read()

print "Getting file data and extracting installation!"

print #responseRead

pLink = re.search("(?P<url>http?://[^\s]+)", responseRead).group("url") # Extracting URL from "responseRead"

print "Getting a JAR file for the last time, I promise."

jarFile = urllib2.urlopen(pLink)

print "Opening a file for testing, just to make sure everything works!"

output = open(localFile,'wb')

print "Writting data ..."

output.write(jarFile.read())

output.close()

print "w00t w00t, your file is ready to be transfered or reverse engineered! Filename: " + localFile

Usage

To use Getjarpy you will need Python 2.7 with additional modules, read Dependencies for more information. Basic usage of Getjarpy is to edit line 63 and it's variable data "mobileModel" which is at the moment of writting set to nokia-5130-xpressmusic/. You can get your model name parsed by visiting GetJar | Mobile - Appsolutely Everything - worlds biggest open appstore, selecting your model and visiting any application listed.

Then, it's just a matter of using predefined commands listed bellow. Please, make sure to change coresponding phone model, in case you don't, all files will be downloaded to the resolution of Nokia 5130 XpressMusic.

cJlFHFX.gif

To list usage / help use "--help" argument without quotes.


$ python getjarpy.py --help
_ _
__ _ ___| |_ (_) __ _ _ __ _ __ _ _
/ _` |/ _ \ __|| |/ _` | '__| '_ \| | | |
| (_| | __/ |_ | | (_| | | | |_) | |_| |
\__, |\___|\__|/ |\__,_|_| | .__/ \__, |
|___/ |__/ |_| |___/
Simple GetJar java application downloader
Coded by dn5 / http://dn5.ljuska.org / @dn5__

Usage: python getjarpy.py http://getjar.mobi/mobile/xxxxxx/name-of-app-model localFileName
Example: python getjarpy.py http://www.getjar.mobi/mobile/567704/fooddash-for-nokia-5130-xpressmusic/ FoodDash

To download particular file use URL as 1st argument, and local file name as 2nd argument. Files will be sored inside directory from which application is started.


$ python getjarpy.py http://www.getjar.mobi/mobile/567704/fooddash-for-nokia-5130-xpressmusic/ FoodDash
_ _
__ _ ___| |_ (_) __ _ _ __ _ __ _ _
/ _` |/ _ \ __|| |/ _` | '__| '_ \| | | |
| (_| | __/ |_ | | (_| | | | |_) | |_| |
\__, |\___|\__|/ |\__,_|_| | .__/ \__, |
|___/ |__/ |_| |___/
Simple GetJar java application downloader
Coded by dn5 / http://dn5.ljuska.org / @dn5__

Usage: python getjarpy.py http://getjar.mobi/mobile/xxxxxx/name-of-app-model localFileName
Example: python getjarpy.py http://www.getjar.mobi/mobile/567704/fooddash-for-nokia-5130-xpressmusic/ FoodDash

Setting a link for exploitation!
http://www.getjar.mobi/mobile/567704/fooddash-for-nokia-5130-xpressmusic/

Writing other settings!
Trying to exploit this URL: http://m.getjar.mobi/mobile/567704/fooddash-for--java/?d=-java
Extracting some files from URL ...
Getting file data and extracting installation!

Getting a JAR file for the last time, I promise.
Opening a file for testing, just to make sure everything works!
Writting data ...
w00t w00t, your file is ready to be transfered or reverse engineered! Filename: FoodDash.jar

Dependencies

  • Python 2.7
  • BeautifulSoup ( pip install BeautifulSoup )
  • urllib2 (should come installed by default)
  • socket (should come installed by default)

About & License

This software is not intended to replace mobile downloading operation from GetJar, it is used for testing purpose and is not suported to use for illegal act. Me, dn5 coded this software for testing purpose and learning experience with Python. Software is licensed under GNU General Public License v3.0 (GPL-3.0).

Author: dn5

Blog: htp:/dn5.ljuska.org

Twitter: @dn5__

Email: dn5@dn5.ljuska.org

Getjarpy - Download applications from Getjar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...