Code Monkey home page Code Monkey logo

altserver-linux-pyscript's Introduction

About me

A student interested in penetration testing and software development

learning penetration testing, programming and software development

I am training Java, C#, Python, Swift and Dart

powen's GitHub stats

Contact Me

Others

My Work

Projects
permasigneriOS Sign ipa permanetly on iOS
AltServer-Linux-ShellScript make easier to use AltServer-Linux
AltServer-Linux-PyScript replacement of AltServer-Linux-ShellScript for better experience
ModMyIPA An app to modify ipa files

powen's Commit Snake

altserver-linux-pyscript's People

Contributors

kontr0x avatar olivertzeng avatar powenn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

altserver-linux-pyscript's Issues

The script can't handle the ampersand character "&" in the Apple ID password

This took me way too long too figure out so I make it brief:

Let's say for example your Apple ID Password is: a23&s&b443d
This will brake the script:

[...]
Enter your Apple ID : example@appleid.com
Enter password of the Apple ID : 
Do you want to install AltStore ? (y/n) [n for select your own iPA] : y
/bin/sh: 1: b443d: not found
/bin/sh: 1: s: not found
[...]

/bin/sh: 1: b443d: not found matches the &b443d part of the password, while /bin/sh: 1: s: not found matches &s

The script does not seem to handle the ampersand character "&" (and I am not sure about other special characters).

Packages already newest version, nothing happens

Trying to use python route to install but every time I run the two commands it tells me 254 not upgraded and nothing new seems to appear to continue to next step.

root@debian:# sudo apt-get install usbmuxd libimobiledevice6 libimobiledevice-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
libimobiledevice-utils is already the newest version (1.2.1
git20181030.92c5462-2+deb10u1).
libimobiledevice6 is already the newest version (1.2.1git20181030.92c5462-2+deb10u1).
usbmuxd is already the newest version (1.1.1
git20181007.f838cf6-1).
0 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.
root@debian:~# sudo apt-get install wget curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
curl is already the newest version (7.64.0-4+deb10u2).
wget is already the newest version (1.20.1-1.1).
0 upgraded, 0 newly installed, 0 to remove and 254 not upgraded.

Enter the index of the device for installation

As the main title I'm trying to figure out what is the meaning of this request, I type my AppleID and didn't work, then came out this:

Invalid index
Enter OPTION to continue : Other Socket:9. Port: 64886. Error: 0
Receiving request size...
Checking socket: 9
Received bytes: 4(of 4)
Receiving 48 bytes...
Checking socket: 9
Received bytes: 48(of 48)
parse anisette data ret
Represented Value: 241
Sent Bytes Count: 4 (4)
Sent Data: 4 Bytes
Failed to handle request:Failed to cSent Bytes Count: 241 (241)
Sent Data: onnect to any resolved endp241 Bytes
oint
Detected device:Tobia’s iPhone
Starting notification connection to device: Tobia’s iPhone
Sent wired server connection available response!
Started wired server connection!
Receiving request size...
Receiving 48 bytes...
parse anisette data ret
Represented Value: 241
Failed to handle request:Failed to connect to any resolved endpoint

Very glad if you could help me.
PS: I'm very new to ios (1 month) so if my request is a little noob be kind

Plugging in the connection cable doesn't work

Plugging in the connection cable doesn't work.
How to fix this.
I found this error:

Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 25000; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
p
No devices found
Enter OPTION to continue : 

This is cat /etc/os-release :

PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
VERSION_ID="2023.3"
VERSION="2023.3"
VERSION_CODENAME=kali-rolling
ID=kali
ID_LIKE=debian
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
ANSI_COLOR="1;31"

Failed to connect to any resolved endpoint

Connected my device with USB and trust the connection on the device. It can then be paired with idevicepair pair.

Running the script from this repo starts things and these two lines are written every second or so:

Removing <udid>
Adding device <udid>

Then when trying to renew an app:

Other Socket:6. Port: 60693. Error: 0
Receiving request size...
Checking socket: 6
Received bytes: 4(of 4)
Receiving 48 bytes...
Checking socket: 6
Received bytes: 48(of 48)
parse anisette data ret
Represented Value: 241
Sent Bytes Count: 4 (4)
Sent Data: 4 Bytes
Failed to handle request:Failed to connect to any resolved endpoint
Sent Bytes Count: 241 (241)
Sent Data: 241 Bytes

Any idea what might be wrong?

"No module named 'requests'"

Here's what returned in the terminal (I'm on Debian Stable on a Pi 4)

root@pi:~# python3 main.py
Traceback (most recent call last):
  File "/root/main.py", line 5, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

constantly adding and removing

On running the script, sometimes (hard to reproduce, sometimes it happens sometimes it doesn't) my device keeps getting added and removed (alternating every two seconds). It makes it difficult to refresh or install apps because normally a refresh takes longer than 2 seconds.

Anyone else run into this or have any ideas?

I'm running the script as root using 'screen' and WiFi tethering.


Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E
Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E
Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E
Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E
Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E
Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E
Adding device 00008110-001A002426F1801E
Removing 00008110-001A002426F1801E

Cannot get wifi sync to work on opensuse tumbleweed

#####################################

Welcome to the AltServer script

#####################################

ScriptUsage: [OPTION]

OPTIONS
i, --Install AltStore or ipa files
Install AltStore or ipa files to your device
w, --Switch to wifi Daemode mode (Default using it after launch)
Switch and restart to wifi Daemode mode to refresh apps or AltStore
t, --Switch to usb tethered Daemode mode
Switch and restart to usb tethered Daemode mode to refresh apps or AltStore
e, --Exit
Exit script
h, --Help
Show this message
p, --Pair
Show paired devices
u, --Update
Update this script

For more information:
https://github.com/powenn/AltServer-Linux-PyScript

Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 62914; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait();
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html
DNSServiceRegister result: 0

This is what I see when running script but it does not detect my iphone. Note that when switching to usb tethered mode it does work.

Install on alpine

I keep getting
Error loading shared library libdns_sd.so
I'm not sure if it is possible on alpine, but I'm pretty sure it should be.

AltJIT

Could you add AltJIT? Thanks for this project!

"No argument supplied" when running main.py in rewrite

> python3 main.py
Fetching version ...
Done
Enter sudo password : 


#####################################
#  Welcome to the AltServer script  #
#####################################

ScriptUsage: [OPTION]

OPTIONS
    i, --Install AltStore or ipa files
        Install AltStore or ipa files to your device
    w, --Switch to wifi Daemode mode (Default using it after launch)
        Switch and restart to wifi Daemode mode to refresh apps or AltStore
    t, --Switch to usb tethered Daemode mode
        Switch and restart to usb tethered Daemode mode to refresh apps or AltStore
    e, --Exit
        Exit script
    h, --Help
        Show this message
    p, --Pair
        Show paired devices
    u, --Update
        Update this script
        
For more information: 
https://github.com/powenn/AltServer-Linux-PyScript


Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 23527; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
i
No devices found
Enter OPTION to continue : ^C
Ctrl+C pressed, aborting

when i run the script, it asks for a sudo password, i put it in, and it gives warnings. when i enter i, it just says no device found, even though my iphone is plugged in and trusted

WiFi refresh not working

I'm facing issues using WiFi refresh (option -w in the script). I can install AltStore on my iphone 14 without problems, and the refresh using usb (-t option) is working fine. The WiFi deamon instead gives me this error, and the phone can't find the AltServer to refresh the apps. How can I solve?


Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 55246; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
*** WARNING *** The program 'python3.10' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
**DNSServiceRegister result: -65537**

filesystem error

Alert: Could not install AltStore.ipa to unknown.
filesystem error: directory iterator cannot open directory: No such file or directory [C:\ProgramData\Apple Computer\iTunes\adi]

Not able to Wifi refresh on altserver raspberry pi 4

I can properly use tethered mode in order to install altstore and refresh it but the wifi refresh does not work even though both the avahi daemon and socket are both running and active. The computer is trusted by the iPhone but when I refresh with altserver it says "altserver could not find this device" and on my linux machine it says "Sent Bytes Count: 4 (4)
Sent Data: 4 Bytes
Sent Bytes Count: 86 (86)
Sent Data: 86 Bytes
Failed to handle request:AltServer could not find the device."

raspberry pi glibc (solved)

not able to install altstore using the tethered mode to my iphone or my ipad,I keep trying so many times but it won't install the altstore onto my phone.

Python 3.11 Issues

Python 3.11 brought a lot of changes, and because of that, parts of the script no longer work as intended. Especially the AltStore logo is affected by this.

Thus, Python 3.11 support should be worked on, to ensure that everything works smoothly on the latest version of Python.

LXC password issue

I'm trying to run your script in a LXC container with Proxmox. The container does not have a root password / sudo password. Is it possible to use your script without a sudo passwort prompt? Right now it fails at the stage when it prompts for the sudo password.

Stopped working

Everything used to work fine but today when refreshing, i got an error: Could not copy provisioning profiles. Error code: -256

I thought it was a altstore issue but sometimes i get this on altserver it says failed to send -1 bytes OR

Received bytes: 33965(of 33965)
Represented Value: 191
Sent Bytes Count: 4 (4)
Sent Data: 4 Bytes
Failed to handle requestSent Bytes Count: 191 (191)
:CouldSent Data: 191 Bytes n
ot copy provisioning profiles. Error code: -256.

it seems to work tethered

another issue that’s happening is that it keeps on saying Removing (device-number) Adding device (device-number)

Can't install AltStore.ipa

Enter OPTION to continue : p
iPhone SE 2 , 00008030-000XXXXXXXXX
Enter OPTION to continue : i
[0] : iPhone SE 2 , 00008030-000XXXXXXXXX
Enter the index of the device for installation : 0
Enter your Apple ID : [email protected]
Enter password of the Apple ID :
Do you want to install AltStore ? (y/n) [n for select your own iPA] : y
Installing app...
parse anisette data ret
Alert: Could not install AltStore.ipa to unknown.
Failed to connect to any resolved endpoint
Press any key to continue...

Exception: Failed to connect to any resolved endpoint
0# 0x00000000005CF298
1# 0x000000000099EC2C

Finished!

Sync does not work (WiFi/USB)

Here the error i get while syncing in WiFi or USB method:

Other Socket:6. Port: 53820. Error: 0
Receiving request size...
Checking socket: 6
Received bytes: 4(of 4)
Receiving 48 bytes...
Checking socket: 6
Received bytes: 48(of 48)
parse anisette data ret
Represented Value: 241
Failed to haSent Bytes Count: 4 (ndle req4)
Sent Data: 4 Bytes
uest:Failed to connect to any resolveSent Bytes Count: 241 (241)
Sent Data: 241 Bytes
d endpoint

JIT not working?

Everytime I try to use JIT on AltStore it says "AltStore received an invalid request from AltServer"

Arch compatable?

Some of these packages arent on arch, and im not sure if thats why it isnt working.

Can you please create a version without sudo?

Hi,

I am running this script inside docker.
For now, I can not run this as a daemon, because I need to enter sudo password(even if the user is root).
Can you please create a version without sudo or skip enter sudo password for root user.

Thanks.

Cannot run script

Hi, i installed all dependecies, but i cannot run the script.

Traceback (most recent call last): File "main.py", line 363, in <module> class DeviceManager: File "main.py", line 367, in DeviceManager def getDevices(self) -> list[iDevice]: TypeError: 'type' object is not subscriptable

Failed to handle HTTP status line

I successfully installed AltStore using the script and I left the server running and tried to login to Altstore using Apple id, got an error "Failed to handle HTTP status line."

What's wrong?

Error while fetching version

python3 main.py
version.json not exists
Fetching version ...
Traceback (most recent call last):
File "/home/mdmusaibali/Desktop/Altserver/AltServer-Linux-PyScript-1.0.2/main.py", line 530, in
main()
File "/home/mdmusaibali/Desktop/Altserver/AltServer-Linux-PyScript-1.0.2/main.py", line 434, in main
CheckResource()
File "/home/mdmusaibali/Desktop/Altserver/AltServer-Linux-PyScript-1.0.2/main.py", line 139, in CheckResource
latest_version_json: dict = FetchVersion()
File "/home/mdmusaibali/Desktop/Altserver/AltServer-Linux-PyScript-1.0.2/main.py", line 104, in FetchVersion
"https://api.github.com/repos/NyaMisty/AltServer-Linux/releases/latest", headers=headers if CUSTOM_HEADERS_ENABLED else "").json()["tag_name"]
File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 518, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
File "/usr/lib/python3/dist-packages/simplejson/scanner.py", line 79, in scan_once
return _scan_once(string, idx)
File "/usr/lib/python3/dist-packages/simplejson/scanner.py", line 70, in _scan_once
raise JSONDecodeError(errmsg, string, idx)
simplejson.errors.JSONDecodeError: Expecting value: line 2 column 1 (char 2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.