9

Is there anyway to get source code back from a .pyt file? when I try to open all i get is a bunch of symbols. I had an .exe file then converted files to .pyc but the main source code seems to be in .pyt although this is me assuming as the file name was "FILE", but when reading through you can see it has the file name of .pyt in the source code.

I tried using online tools to decode but no luck.

Example of what i get:

c           @   sG  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m Z d  d l    Z   d  d l
 m Z d  d l m
 Z
 d  d l m Z d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m Z d  d    l m Z d  d
 l m Z d a d a e a e a e a d a d
 Z d Z e     j ƒ  a  e   j ƒ  a! e   j ƒ  a" d „  Z# d „  Z$ d „  Z% d „  Z& d „  Z' d „  Z( d „  Z) d „  Z* d „  Z+ d „  Z, d „  Z- d „  Z. d „  Z/ d „  Z0 d „  Z1 d „  Z2 d „  Z3 d  „  Z4 d! „  Z5 d" „  Z6 d# „  Z7 d$ „  Z8 d% „  Z9 e: d& k rCe   j; ƒ  e5 ƒ  n  d S('   iÿÿÿÿN(   t    UserAgent(   t   randint(   t   sleep(   t   ThreadPoolExecutor(   t   partial(   t   captcha(   t
   twitchAuth(   t   auth(   t   proxiesi    t   unlinks     _____
wjandrea
  • 28,235
  • 9
  • 60
  • 81
zZehix
  • 109
  • 1
  • 2
    Possible duplicate of [Is it possible to decompile a compiled .pyc file into a .py file?](https://stackoverflow.com/questions/5287253/is-it-possible-to-decompile-a-compiled-pyc-file-into-a-py-file) – Slawomir Chodnicki May 28 '19 at 15:18
  • hello, no i wish it were as I found that solution. this file is a PYT and i just cant seem to get the raw data from it, just a bunch of symbols – zZehix May 28 '19 at 15:33
  • 2
    Can you please provide a hexdump instead of the raw data of that portion of the file? It would be more readable. – daxim May 29 '19 at 11:37
  • 2
    Is this .pyt file in any way related to ESRI ArcGIS? – RobertBaron Jun 03 '19 at 13:34
  • 1
    I have never used this library before but I came across this library which may help https://github.com/rocky/python-uncompyle6 – smitty_werbenjagermanjensen Jun 05 '19 at 13:00
  • 2
    Are you sure, this is the source Code? Usually .pyt files are toolboxes in python – NewEyes Jun 05 '19 at 13:01
  • when using uncompyle6, i get some PYC files which i have converted to .py, however, this file is sitting in the main extracted directory with no extention type, but i know its the main part of the code. i change the extension to .py/pyc/pyt and all i get are symbols as above. – zZehix Jun 06 '19 at 19:30

0 Answers0