Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] wrap links into html tags and other features #69

Open
1 of 5 tasks
Box333 opened this issue Oct 19, 2023 · 7 comments
Open
1 of 5 tasks

[Request] wrap links into html tags and other features #69

Box333 opened this issue Oct 19, 2023 · 7 comments
Assignees
Labels
all platforms Issue related to all platforms enhancement New feature or request

Comments

@Box333
Copy link

Box333 commented Oct 19, 2023

Hi KnugiHK,

Thanks for the great script !!

  • 1. would be great to have all external links matchig http*// to be wrapped into html tag, so that they can be klicked in messages
  • 2. after all html files have been created, add a function that will create an overview html file, such as index.html with 2 frames (panes) or by using "aside" html tag, where the left pane will contain the contacts list, each contact linked to their single html file, that will then be displayed in the right pane.
  • 3. add a function that would pull the message info details from the db such as the timestamps when a message was delivered and viewed.
  • 4. add an option to preserve original filedate when extracting files.
  • 5. add an option to preserve subdirs
    code here: jsharkey13/iphone_backup_decrypt@95f6f37
    Best regards
@KnugiHK KnugiHK self-assigned this Oct 19, 2023
@KnugiHK KnugiHK added the enhancement New feature or request label Oct 19, 2023
@KnugiHK
Copy link
Owner

KnugiHK commented Oct 23, 2023

1, 2, and 3. Good suggestions. Will look into it.
4. Duplication of #65.
5. It should already be implemented. You can try it by switching to the dev branch and updating to the latest iphone_backup_decrypt.

@KnugiHK
Copy link
Owner

KnugiHK commented Nov 12, 2023

Feature 1 released in 0.9.7.

@anaxonda
Copy link

Regarding (2), it would be useful for the "index.html" page to be able to sort contacts by most recently contacted (to mirror conversation order in the app).

@KnugiHK
Copy link
Owner

KnugiHK commented Sep 9, 2024

Regarding (2), it would be useful for the "index.html" page to be able to sort contacts by most recently contacted (to mirror conversation order in the app).

Tracked on #101.

@KnugiHK KnugiHK added the all platforms Issue related to all platforms label Sep 9, 2024
KnugiHK added a commit that referenced this issue Feb 9, 2025
For now, only the time for "delivered" (android & ios) and "read" (android only)  is support.
@KnugiHK
Copy link
Owner

KnugiHK commented Feb 9, 2025

For feature 3, the following have been implemented in cfe04c8:

  • "Delivered" and "Read" timestamps on Android
  • "Delivered" timestamp on iOS

The following are yet to be supported:

  • "Read" timestamp on iOS

Please note that to view the timestamps, you must use the new theme with --experimental-new-theme. There are no plans to incorporate this feature into the old theme.

@Box333
Copy link
Author

Box333 commented Feb 15, 2025

i had solved it this way before

in ios_handler.py:

       if content["ZISFROMME"] == 1 and content["ZMESSAGETYPE"] < 9:
            msgtimedel, msgtimeread = check_ns_time_keys(content)
            if msgtimedel: message.timedelivered = msgtimedel
            if msgtimeread: message.timeread = msgtimeread

def check_ns_time_keys(content):
    try:
        # Check if msginfos is None or empty
        if not content["msginfos"]:
            #print("No blob data found (NULL or empty). Skipping...")
            return None, None
       
        # Parse the bplist
        msginfos = BPListReader(content["msginfos"]).parse()
        # Check if "$objects" exists
        if "$objects" not in msginfos:
            print("Invalid structure: '$objects' not found.")
            return None, None

        objects = msginfos["$objects"]
        msgtimedel, msgtimeread = None, None

        # Check objects 5, 6, and 8 for "NS.time"
        if len(objects) > 5 and isinstance(objects[5], dict) and "NS.time" in objects[5]:
            msgtimedel = objects[5]["NS.time"][1]
        if len(objects) > 6 and isinstance(objects[6], dict) and "NS.time" in objects[6]:
            msgtimeread = objects[6]["NS.time"][1]
        if len(objects) > 8 and isinstance(objects[8], dict) and "NS.time" in objects[8]:
            msgtimedel = objects[8]["NS.time"][1]

        print(f"NS.time values: {msgtimedel}, {msgtimeread}")
        return msgtimedel, msgtimeread

    except Exception:
        return None, None

and added to message class:

        self.timesend = None
        self.timeread = None
        self.timedelivered = None

and my modified query is:

    c.execute(f"""SELECT ZCONTACTJID,
                        ZWAMESSAGE.Z_PK,
                        ZISFROMME,
                        ZMESSAGEDATE,
                        ZSENTDATE,
                        ZTEXT,
                        ZMESSAGETYPE,
                        ZWAGROUPMEMBER.ZMEMBERJID,
			ZMETADATA,
                        ZSTANZAID,
                        ZGROUPINFO,
			ZWAMESSAGEINFO.ZRECEIPTINFO AS msginfos
                    FROM ZWAMESSAGE
                        LEFT JOIN ZWAMESSAGEINFO
                            ON ZWAMESSAGE.Z_PK=ZWAMESSAGEINFO.ZMESSAGE
                        LEFT JOIN ZWAGROUPMEMBER
                            ON ZWAMESSAGE.ZGROUPMEMBER = ZWAGROUPMEMBER.Z_PK
                        LEFT JOIN ZWAMEDIAITEM
                            ON ZWAMESSAGE.Z_PK = ZWAMEDIAITEM.ZMESSAGE
                        INNER JOIN ZWACHATSESSION
                            ON ZWAMESSAGE.ZCHATSESSION = ZWACHATSESSION.Z_PK
                    WHERE 1=1 
.......
.......

@KnugiHK
Copy link
Owner

KnugiHK commented Feb 25, 2025

I tested your code and observed that the value in the ZWAMESSAGEINFO.ZRECEIPTINFO column in my test database isn't in BPlist format. I also selected three text messages, but there are no corresponding records in the ZWAMESSAGEINFO table. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all platforms Issue related to all platforms enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants