Tripper

What this page?

This page is written how to implement the feature to spot imposter

The idea

Actually, if you watch a some topic of 2ch, you can find a poster like:

1 名前:Name◆doui./as  2009/05/17(日) 10:06:30.60
And, if you spoof to him and post something, everybody finds out that you are imposter because of the following difference:
1 名前:Name◇doui./as  2009/05/17(日) 10:06:30.60

Why I can't spoof to him?

The system, which is like that, is called Hitoriyo Cap in 2ch. Posting the following string as your name:

AAA#BBB
the server will crypt "BBB" with first 2 bytes as salt.
Additionally, it joins the crypted string and the name before "#" with "◆" as a glue. If "◆" exists, it can spot imposter by replacing "◇" before that behavior.

Implementation code

The implementation code is here:

  1. <?php
  2. function getTripName($name){
  3. $after_name=str_replace("@","|",$name]);
  4. $TripArray=explode("#",$after_name,2);
  5. if(count($TripArray)>1){
  6. $salt=substr($TripArray[1],0,2);
  7. $TripArray[1]=strrev($TripArray[1]);
  8. $TripArray[1]=crypt($TripArray[1],$salt);
  9. $TripArray[1]=substr($TripArray[1],-10);
  10. $after_name=implode("@",$TripArray);
  11. }
  12. return $after_name;
  13. }
  14. ?>

Notice

Unlike 2ch one, This script uses the "reversed" key as salt, because if this script outputs the same of 2ch one, making a lot of thread is expected. Moreover, the glue is different, because "◇" and "◆" is not supported on ASCII; this may cause greeking.

How to use it

1:Execute the function with the name as a argument.
2:The returned name is string after conversion. Thus, it is used as name
3:Use the string returned by execution of 2 as name