en:tecdoc:abusenotif

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:tecdoc:abusenotif [2021/03/17 16:17]
jomat
en:tecdoc:abusenotif [2021/03/17 16:18]
jomat [Content Reports]
Line 60: Line 60:
  
 <code - /usr/local/bin/matrix_event_reported> <code - /usr/local/bin/matrix_event_reported>
-#!/usr/bin/zsh 
- 
-AT='MDMA...' 
-ROOM='!x1y2z3:example.com' 
-IP=$1 
-SI=`/bin/cat` 
-echo `date` $SI >> /tmp/newuserlog 
-U=`echo $SI|jq -r .user_id` 
- 
-[ -z "$U" ] && exit 0 
-[ "null" = "$U" ] && exit 0 
- 
-curl -X PUT "https://asra.gr/_matrix/client/r0/rooms/${ROOM}/send/m.room.message/"`uuid -m -F SIV`"?access_token=${AT}" -H  "accept: application/json" -H  "Content-Type: application/json" -d " \"body\": \"@room New user registered: ${U} from ${IP}\",  \"msgtype\": \"m.text\"}" >> /tmp/reguser.txt 2>> /tmp/reguser.txt 
- 
-➜  ~ cat /usr/local/bin/matrix_event_reported 
 #!/bin/sh #!/bin/sh
  
Line 81: Line 66:
  
 echo date $* >> /tmp/report.log  echo date $* >> /tmp/report.log 
- 
  
 #https://asra.gr/.well-known/matrix/support #https://asra.gr/.well-known/matrix/support
  • en/tecdoc/abusenotif.txt
  • Last modified: 2021/08/22 10:04
  • by jomat