Ich versuche, Benutzerinformationen aus einem Flash-Spiel zu erhalten.
Ich habe den Python 2.7-Code im Internet gefunden und in Python Version 3.8 übersetzt
Ich erhalte jedoch einen Py3AMF-Fehler. | Hinweis: (Alle Anforderungen wurden installiert.)
In Python 2.7 geschriebener Code: guidedhacking.com/threads/how-…orial-python-client.7970/
(repl.it site) Ich bekomme diesen Fehler :
Mein Code ist hier :
Code-Tags angepasst ~ EaranMaleasi
Ich habe den Python 2.7-Code im Internet gefunden und in Python Version 3.8 übersetzt
Ich erhalte jedoch einen Py3AMF-Fehler. | Hinweis: (Alle Anforderungen wurden installiert.)
In Python 2.7 geschriebener Code: guidedhacking.com/threads/how-…orial-python-client.7970/
(repl.it site) Ich bekomme diesen Fehler :
Python-Quellcode
- Traceback (most recent call last):
- File "grabber.py", line 70, in <module>
- main()
- File "grabber.py", line 62, in main
- decoded = remoting.decode(data)
- File "C:\Python38\lib\site-packages\pyamf\remoting\__init__.py", line 631, in decode
- raise pyamf.DecodeError(pyamf.DecodeError: Malformed stream (amfVersion=15393)
Mein Code ist hier :
Python-Quellcode
- # -*- coding: utf-8 -*-
- #Created on Mon Sep 10 20:46:18 2020
- #@author: UnKnown
- #@contributor: UnKnown
- def main():
- try:
- import os
- from time import sleep
- import http.client
- from pyamf import AMF3
- from pyamf import remoting
- except:
- os.system('color 4')
- print('Import Error Please Install All Requirements...')
- print('\tOR PRESS ENTER!')
- input(' ')
- os.system('cls')
- print('INSTALLING REQUIREMENTS')
- os.system('pip install Py3AMF')
- os.system('cls')
- print('ALL REQUIREMENTS INSTALLED')
- input('Press Enter!')
- os.system('python grabber.py')
- # GET VERIABLES FROM USER
- os.system('color a')
- login = input('Username > ')
- password = input('Password > ')
- try:
- os.system('color a')
- os.system('cls')
- # SET HEADERS AND HOST
- headers = { "Host":"ws-tr.mspapis.com", "Origin":"https://moviestarplanet.com.tr/", "X-Requested-With":"ShockwaveFlash/17.0.0.188", "User-Agent":"Chrome/43.0.2357.81", "Content-Type":"application/x-amf", "Accept":"*/*" }
- host = "ws-tr.mspapis.com"
- # SET ALL VERIABLES
- requestTarget = "MovieStarPlanet.WebService.User.AMFUserServiceWeb.Login"
- loginInfo = [ login, password, [ 1234567890.0 ], None ]
- message = remoting.Envelope(amfVersion=AMF3)
- message['/1'] = remoting.Request(target=requestTarget, body=loginInfo)
- # SEND REQUEST TO SERVER
- body = remoting.encode(message).getvalue()
- connection = http.client.HTTPConnection(host)
- connection.request("POST", "/msp/91.0.5/Gateway.aspx?", body, headers)
- response = connection.getresponse()
- # GET RESPONSE ABD READ
- data = response.read()
- connection.close()
- except:
- os.system('color 4')
- print('AN ERROR HAS OCCURRED WHILE SENDING REQUEST...')
- print('Please check code...')
- # DECODE RESPONSE AND PRINT TO SCREEN
- print("Successfully connected to the server")
- decoded = remoting.decode(data)
- playerId = decoded['/1'].body.get('loginStatus').get('actor').get('ActorId')
- ticket = decoded['/1'].body.get('loginStatus').get('ticket')
- print("Player ID : " + str(playerId))
- print("Ticket : " + str(ticket))
- print('Sleeping...')
- input(' ')
- main()
Code-Tags angepasst ~ EaranMaleasi
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „EaranMaleasi“ ()