Commit Diff


commit - /dev/null
commit + ba2c849f0d9dcfe9a5affba37c7a64fba4a539cd
blob - /dev/null
blob + 6ef4c827a73fbe5cce472aca1312a39432fbef62 (mode 644)
--- /dev/null
+++ user_fingerprint.org
@@ -0,0 +1,122 @@
+#+TITLE: User fingerprinting and approval
+#+DATE: <2024-09-21 Sat>
+
+* Preamble
+
+This document explains how to review user request for freeirc services
+(shell, bnc, email).
+
+* Process
+
+** !help
+
+The !help commands allows an user to request a service
+
+** Ask user to accept IRCNOW conditions
+
+Example of a message to be sent to the user :
+
+#+begin_quote
+just email support@freeirc.org and say that you approve this
+https://ircnow.org/index.php?n=Terms.Terms and what service you want
+to use ok?
+#+end_quote
+
+** Approval
+
+First, message FreeIRC, which is a bot. Then, in the query window, you
+can type the following commands :
+
+#+begin_quote
+!bnc approve $username
+!shell approve $username
+!mail approve $username
+#+end_quote
+
+* Fingerprinting in Botnow's database
+
+See : [[eww:https://wiki.ircnow.org/?n=Police.Fingerprints][IRCNOW wiki entry]]
+
+** Find the user's ip and log history
+
+#+begin_src sh :results output
+    USER=MR_SOHAIB;
+    IP=39.38.109.231;
+    doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+    'select nick, ip, date from irc where nick=\"$USER\" \
+    or ip=\"$IP\";'"
+#+end_src
+
+#+RESULTS:
+: ZidBot|39.38.109.231|20240920
+: ZidBot|39.38.109.231|20240921
+: ZidBot|39.38.109.231|20240920
+: ZidBot|39.38.109.231|20240920
+
+** Find if user has already requested a shell account
+
+#+begin_src sh :results output
+   EMAIL="mendoanp45@gmail.com";
+   USER="samin";
+
+   doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+   'select id, ircid, username, email from shell where email =\"$EMAIL\" \
+   or username = \"$USER\";'"
+#+end_src
+
+#+RESULTS:
+
+** Find if user has already requested a bnc account
+
+#+begin_src sh :results output
+  EMAIL="mendoanp45@gmail.com";
+  USER="samin";
+  doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+  'select id, ircid, username, email from bnc where email =\"$EMAIL\" \
+  or username = \"$USER\";'"
+#+end_src
+
+#+RESULTS:
+: test
+: 109|4929705759429656576|samin|mendoanp45@gmail.com
+
+** Find if user has already requested an email account
+
+#+begin_src sh :results output
+  EMAIL="mendoanp45@gmail.com";
+  USER="samin";
+
+   doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+   'select id, ircid, username, email from mail where email =\"$EMAIL\" \
+   or username = \"$USER\";'"
+#+end_src
+
+#+RESULTS:
+
+** Find if user has already requested an email, bnc, shell account
+
+#+begin_src sh :results output
+  EMAIL="mendoanp45@gmail.com";
+  USER="samin";
+
+  echo 'has user already requested an email account?'
+  doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+     'select id, ircid, username, email from mail where email =\"$EMAIL\" \
+     or username = \"$USER\";'"
+
+  echo 'has user already requested a bnc account?'
+  doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+  'select id, ircid, username, email from bnc where email =\"$EMAIL\" \
+  or username = \"$USER\";'"
+
+  echo 'has user already requested an email account?'
+  doas su botnow -c "sqlite3 /var/www/botnow/botnow.db \
+   'select id, ircid, username, email from shell where email =\"$EMAIL\" \
+   or username = \"$USER\";'"
+#+end_src
+
+#+RESULTS:
+: has user already requested an email account?
+: has user already requested a bnc account?
+: 109|4929705759429656576|samin|mendoanp45@gmail.com
+: has user already requested an email account?