Joke Collection Website - Blessing messages - How to realize iMessage group sending

How to realize iMessage group sending

How to realize iMessage group sending

Apples are all over the mac.

FaceTime and iMessage are built into os and ios. The perfect substitute for SMS and phone calls of operators. And FaceTime and iMessage accounts are not just Apple's.

ID binding, but also with the mobile phone number using this Apple ID, such loopholes naturally provide a back door for mass spammers everywhere in China.

In this way, iMessage of iPhone can receive spam iMessage from time to time, especially taxis are sent most frequently. I heard it was a company in Xiamen. In view of the large-scale delivery of iMessage, the press release said that it would take several minutes to write the script. It's a pity that I spent time studying it several times, but I didn't achieve mass sending. But put your own apples.

The computer with ID is out of sync with the mobile phone.

My research on how to realize iMessage group sending started with XMPP protocol, because Apple.

Measurement and Control (measurement and control)

Ichat on os is an XMPP client, which can connect with iMessage server and send private messages between gtalk and Weibo. However, it was later discovered that the server authentication of iMessage was encrypted, and non-ichat could not be realized.

The XMPP client is connected to the imessage server, so it is naturally impossible to control the program to send information to the imessage server in batches.

Only through MAC

The program that comes with OS or iOS sends information to the iMeesage server, so to realize mass sending, we can only find a way to call the ichat client that comes with it, on the MAC.

On the OS system, Apple provided a script called Apple script to automatically realize the task. Maybe by telling

The application "Messages" can activate the iMessage client to send messages automatically. The idea of mass sending realized in this way is very clear.

1. Batch register the itune account through AppleScript.

2. Automatically take an itune account and send it to 100 Apple via AppleScript.

IMessage of ID

Set the e-mail to "email _ del _ destination"-El destinariha de Tenir l 'Message Activation.

Set the message to "COS_DEL_MISSATGE"

Set n to 1000-vegetarian name.

Set APPLE_ID to "e:"-la teva apple id queha de Tenir imessage activation.

Repeat n times

Tell the application "message"

Send a message to a friend who serves APPLE_ID.

End the story

End repetition

It seems that there is nothing wrong with the press release. It really only takes a few minutes to write a script to realize the mass delivery of iMessage. However, users who know how to use iMessage are obviously not users who are forced to use the iPhone. What effect can your mass iMessage bring besides harassment?

Later, I searched online for a more detailed blog description, which is reproduced as follows:

Introduction to IMessage

IMessage is an Apple device (iPad, iPhone, iPod).

Touch) comes with a free messaging application. Its information is sent through the network, which is different from the SMS of the operator. At present, there are 654.38+0.9 billion daily active users of iMessage, and about 2 billion messages are sent every day.

IMessage advantage

IMessage is different from traditional SMS and has the following advantages:

The target group is very clear, and they are all Apple users with strong spending power.

There is no limit to the number of words, and you can also add expressions and pictures.

You can add web addresses, download links, etc. , users can access directly through their mobile phones.

Will not be intercepted by mobile phone security guards.

Forwarding is as convenient as SMS.

There is no transmission cost

The probability of reaching the finish line is extremely high.

Implementation of iMessage Push Technology

There are two main technical difficulties to overcome in mass iMessage. One is the acquisition of iMessage account, and the other is the mass iMessage.

IMessage account acquisition

At present, the main method to obtain iMessage account is to scan the mobile phone number. Scanning the mobile phone number can automatically scan the code or manually filter it. I haven't found a good way to scan the code automatically. I suggest you start from the following two aspects:

1. Write AppleScript script to control Mac.

OS comes with iMessage client for verification, which is similar to mass iMessage. After sending iMessage, if you catch an exception that failed to send, it is not an iMessage account.

2. Learn messages in the iOS system.

Private api in the framework, verified by private api.

For manual filtering, you can also use Mac.

The iMessage client that comes with OS. The method is to write a program to output the numbers to be verified to a comma-separated file. Then paste the number in the file into the address bar of the iMessage client, and the iMessage client will automatically check whether the number is an iMessage account one by one according to the network speed. Among them, red indicates that it is not an iMessage account, and blue indicates iMessage account and unverified account. As shown in the figure:

There may be a pause during the inspection. You can select all the numbers, cut and paste them to continue checking.

IMessage group sending

After checking all the accounts, you can choose an iMessage account for group sending. There are two ways to send a group, one is through the iMessage client, and the other is to control the iMessage client to send it through the AppleScript script.

Send through iMessage client, you can paste the number directly into the address bar, fill in the content and send it.

The script for controlling the iMessage client through ApplseScript is as follows:

Tell the application "message"

Set csvData to "/Users/xxxx/Desktop/test.csv"

Set csvEntries to paragraphs of csvData.

Repeat I from 1 to calculate C inventory.

Set the phone to the text of (commodity I)

Set myid to get the id of the first service.

Set Buddy as a buddy phone with a service id of myid.

It's sunny in Beijing today, and the temperature is 13 to 27 degrees; Tuesday is fine, the temperature is 1 1 to 26 degrees, and the north wind is 3-4; It was sunny on Wednesday, with the temperature 1 1 to 24 degrees and the breeze < 3 degrees.

End repetition

End the story

The above code can read the iMessage account from a csv file and send iMessage messages one by one through the iMessage client.

Need to pay attention to the following questions:

1. Because this script controls the iMessage client to send, it must be in the MacOS.

Run in the system above 10.8 (the beta version of iMessage is no longer available in the system above 10.7), and open the iMessage program at the same time.

2. When sending iMessage, you don't send scripts in the background, so when sending a large amount, the iMessage client will run slowly or even can't be opened. It can be solved by clearing all the sent iMessage or canceling the account.

3. The iMessage account sent through the script must be verified in the current iMessage client, otherwise it will be reported as an "unavailable" friend.

id " c 0 b 35 e 7 f-A0FB-49e 1-BDD 7-c 867 BC 06d 920:+86 136 xxxx 0000 " " .

As can be seen from the blog post reprinted above, this buddy mainly wanted to make a few simple figures, and he didn't really send them in large quantities, but in the end, he also suggested that there would be problems in really sending them in groups. The solutions to the three problems are as follows:

The first question is mac.

Black Apple with Os system or 10.8 operating system will have its own Messages program. This program system comes with it. You will never find that you can't open it and delete the message program. You can only reinstall the system if you delete it. And open the Messages program first, and then start apple.

Script script, otherwise it can't run normally.

Second, the synchronously deleted codes are added during the sending process, but sometimes the synchronous deletion will fail one by one. Therefore, the normal program should be to open the message program->; Cyclic number base->; Read a number-> Send message-> Wait 1 sec-> Delete this message-> Judge whether more than 100 items have not been deleted, which belongs to batch deletion->; Cyclic number library. This ensures that the messaging program will not occupy more than 100% of the CPU or several gigabytes of memory.

Tell the application "message"

Set csvData to "/Users/xxxx/Desktop/test.csv"

Set csvEntries to paragraphs of csvData.

Repeat I from 1 to calculate C inventory.

Set the phone to the text of (commodity I)

Set myid to get the id of the first service.

Set Buddy as a buddy phone with a service id of myid.

It's sunny in Beijing today, and the temperature is 13 to 27 degrees; Tuesday is fine, the temperature is 1 1 to 26 degrees, and the north wind is 3-4; It was sunny on Wednesday, with the temperature 1 1 to 24 degrees and the breeze < 3 degrees.

Delay 1- delay for one second, or you won't get the developed content.

Set FailNum to (get chat count)

If FailNum & gt Then 100

Repeat j from 1 to FailNum.

Set the phone to (get the chat name (FailNum-j))

Set DelMsg to "iMessage-; "& Telephone

If (text chat id DelMsg) exists, then

Delete text chat id DelMsg

If ... it will be over.

End repetition

If ... it will be over.

End repetition

End the story

Third, set up the mass imessage account in the imessage account of the messages program. It won't be a problem.