我正在尝试npm install apn --save
并使用过npm audit fix --force
。“希望你知道自己在做什么”的信息让我意识到我不知道自己在做什么。之后我原本得到
node /home/ec2-user/myapp/bin/www: symbol lookup error:
/home/ec2-user/myapp/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: undefined symbol: napi_add_finalizer
Run Code Online (Sandbox Code Playgroud)
所以我将节点更新为V14.16.0
但这没有帮助所以我决定删除package-lock.json
并node_modules
运行npm install
。现在会出现这个错误,
PM2 error: Error: spawn node ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Run Code Online (Sandbox Code Playgroud)
我意识到 PM2 没有使用新的节点版本。我升级了 PM2,现在它显示我的应用程序online
反对errored
.
但如果我的节点服务器正在运行(端口 8080),当尝试运行我的网站时,我仍然会收到 502 错误
[proxy_http:error] [pid 22860] (20014)Internal error
(specific information not available): [client my IP address]
AH01102: error reading status line from remote server 127.0.0.1:8080
Run Code Online (Sandbox Code Playgroud)
如果我停止节点服务器,则会出现 …
我无法为APN上传.p12.这是我收到的错误消息.知道是什么导致这个错误吗?
SubCode=40000. Failed to validate credentials with APNS. Error is The credentials supplied to the package were not recognized..TrackingId:b18f483e-6285-9d5b-895c-12e2fcc26dcf_M1_G12,TimeStamp:4/21/2014 3:16:19 AM
Run Code Online (Sandbox Code Playgroud) 我正在针对基于MMS的攻击进行一些Android恶意软件研究.我正在寻找一种手动方式来检索或下载收到的彩信.我希望能找到一些curl
或一些wget
能够做到这一点,但没有找到任何有用的东西.
到目前为止,我从内部数据库获得了一些MMS信息,发现者:
# find / -iname "*.db" |grep -iE "mms|sms"
...
/data/data/com.android.providers.telephony/databases/mmssms.db
/data/data/com.google.android.gms/databases/icing_mmssms.db
/data/data/com.android.mms/databases/message.db
/data/data/com.android.mms/databases/message_glance.db
# cd /data/data/com.android.providers.telephony/databases/
# echo "select * from pdu;" | sqlite3 -header mmssms.db
...
# echo "select date,sub,ct_l,tr_id from pdu;" | sqlite3 -header mmssms.db
date|sub|ct_l|tr_id
1495xxxxxx|Download this message|http://mmsc32:10021/mmsc/3_2?Ae_xxxx_xxxxx-xxx|Ae_xxxx_xxxxx-xxx
Run Code Online (Sandbox Code Playgroud)
如何解读这mmsc32:10021
部分?
然后查看消息设置MMSC
,Proxy
并且port
,我想构建一个有效的CLI单行或浏览器请求,下载文件进行检查.
在手机设置设置中,我们可以通过以下方式找到MMSC:
Settings > More > Mobile network > Access Point Names > MMS: <your operator>
MMSC: http://mms.company.net:8002/
MMS Proxy: 194.xx.xx.xx
MMS Port: 8080 …
Run Code Online (Sandbox Code Playgroud) 通过APNS发送推送确实存在一些问题.因为看起来我们确实从苹果得到了错误的回应.推送已发送,但我们收到错误响应,导致多次发送推送.有没有其他人遇到类似的问题或我错过了什么?
<?php
private function checkAppleErrorResponse($apns, PushToken $token)
{
//byte1=always 8, byte2=StatusCode, bytes3,4,5,6=identifier(rowID). Should return nothing if OK.
$apple_error_response = fread($apns, 6);
if ($apple_error_response) {
//unpack the error response (first byte 'command" should always be 8)
$error_response = unpack('Ccommand/Cstatus_code/Nidentifier', $apple_error_response);
if ($error_response['status_code'] == '0') {
$error_response['status_code'] = '0-No errors encountered';
} else if ($error_response['status_code'] == '1') {
$error_response['status_code'] = '1-Processing error';
} else if ($error_response['status_code'] == '2') {
$error_response['status_code'] = '2-Missing device token';
} else if ($error_response['status_code'] == '3') {
$error_response['status_code'] …
Run Code Online (Sandbox Code Playgroud) 我在Android v4.2中读取APN时遇到问题(是的,不是写APNS),它引发了一个安全异常:
无权编写APN设置:用户10068和当前进程都没有android.permission.WRITE_APN_SETTINGS.
用于在以前所有平台上运行的相同代码,有没有人知道任何相关的工作?
谢谢!
我需要使用命令在互联网上连接usb 3g加密狗.
我的apn提供者是:
APN = tim.br
Username = tim
Password = tim
Run Code Online (Sandbox Code Playgroud)
如何仅使用命令连接?这是可能的?
谢谢.
Apple将APNs Auth Key更改为p8后,当前的库(如https://github.com/immobiliare/ApnsPHP) 仍然使用旧的pem和cert文件进行连接
$push = new ApnsPHP_Push(
ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
'server_certificates_bundle_sandbox.pem'
);
// Set the Provider Certificate passphrase
// $push->setProviderCertificatePassphrase('test');
// Set the Root Certificate Autority to verify the Apple remote peer
$push->setRootCertificationAuthority('entrust_root_certification_authority.pem');
// Connect to the Apple Push Notification Service
$push->connect()
Run Code Online (Sandbox Code Playgroud)
使用Node.js示例(https://eladnava.com/send-push-notifications-to-ios-devices-using-xcode-8-and-swift-3/),我可以像这样发送:
var apnProvider = new apn.Provider({
token: {
key: 'APNsAuthKey_Q34DLF6Z6J.p8', // Path to the key p8 file
keyId: 'Q34DLF6Z6J', // The Key ID of the p8 file (available at https://developer.apple.com/account/ios/certificate/key)
teamId: 'RLAHF6FL89', // The Team ID …
Run Code Online (Sandbox Code Playgroud) 我们有这个iOS应用程序,我们使用Apple推送通知服务(APN)发送推送通知.我们现在转移到Firebase Cloud Manager(FCM)发送通知,我们不想重建应用程序并再次发布.有没有办法FCM
通过APNs
使用(旧)推送通知令牌注册的用户发送通知.我们还尝试了batchimport(将APN令牌更改为FCM令牌).
curl -X POST -H "Authorization: key=SERVER API KEY" -H "Content-Type: application/json" -d '{
"application": "ApplciationID",
"sandbox":false,
"apns_tokens":[
"BF939410B9F5D1A7411128A674951917A6CFCDFA0C1D304AEDCFFC2187FBB4Q1"
]}' "https://iid.googleapis.com/iid/v1:batchImport"
Run Code Online (Sandbox Code Playgroud) apn apple-push-notifications ios firebase firebase-cloud-messaging
我正在使用NotificationService Extension目标来在推送通知之前修改推送通知.它运行良好,但有一些通知我不想在处理后呈现给用户.
我试图将bestAttemptContent标题和正文设置为"",但它会返回完整的通知.
我也尝试将aps ["content-available"]设置为1,将body设置为""但是我得到了相同的效果.
我被困了好几天了,需要你的帮助。
\n我想接收静默推送通知(又称后台通知)来更新我的应用程序内容。
\nAppDelegate 中的以下部分不会被调用。
\nfunc application(_ application: UIApplication,\n didReceiveRemoteNotification userInfo: [AnyHashable: Any],\n fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult)\n -> Void) {\n \n if let messageID = userInfo[gcmMessageIDKey] {\n print("Message ID: \\(messageID)") // Does not get printed\n }\n\n print("success") // Does not get printed\n\n completionHandler(UIBackgroundFetchResult.newData)\n \n}\n
Run Code Online (Sandbox Code Playgroud)\n下面是服务器端的Python代码。服务器端说向设备发送通知成功,所以我认为问题出在前端。
\ndef send_notifications_to_fcm_token(fcm_token):\n try:\n message = messaging.Message(\n apns=messaging.APNSConfig(\n headers={\n 'apns-push-type': 'background',\n 'apns-priority': '5',\n },\n payload=messaging.APNSPayload(\n aps=messaging.Aps(content_available=True)\n ),\n ),\n token=fcm_token,\n )\n response = messaging.send(message)\n except:\n response = False\n return response\n
Run Code Online (Sandbox Code Playgroud)\n一些附加说明。
\n …