fca-pretest 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +43 -88
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  'use strict';
2
3
 
3
4
  /**
@@ -36,7 +37,7 @@ global.Fca = new Object({
36
37
  ObjPriyansh: {
37
38
  "Language": "en",
38
39
  "PreKey": "",
39
- "AutoUpdate": true,
40
+ "AutoUpdate": false,
40
41
  "MainColor": "#9900FF",
41
42
  "MainName": "[ FCA-PRIYANSH ]",
42
43
  "Logo": true,
@@ -300,7 +301,7 @@ function ClassicHTML(UserName,Type,link) {
300
301
  icons.style="opacity: 1"
301
302
  call.style="opacity: 1"
302
303
  },6000)
303
-
304
+
304
305
  </script>
305
306
 
306
307
  <style>/* @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300&display=swap'); */
@@ -321,7 +322,7 @@ function ClassicHTML(UserName,Type,link) {
321
322
  height: 100%;
322
323
  width: 100%;
323
324
  }
324
-
325
+
325
326
  }
326
327
  @media only screen and (min-width:46.1875em) and (max-width:63.9375em){
327
328
  video{
@@ -346,7 +347,7 @@ function ClassicHTML(UserName,Type,link) {
346
347
  height: 100%;
347
348
  display: block;
348
349
  }
349
-
350
+
350
351
  }
351
352
  body {
352
353
  height: 100vh;
@@ -387,8 +388,8 @@ body::after {
387
388
  display: none;
388
389
 
389
390
  z-index: 99;
390
-
391
-
391
+
392
+
392
393
  }
393
394
  @keyframes move{
394
395
  0% {
@@ -433,12 +434,12 @@ body::after {
433
434
  background-size: 400%;
434
435
  /* background:linear-gradient(transparent,#45f3ff,#45f3ff,#45f3ff,transparent); */
435
436
  z-index: -1;
436
-
437
+
437
438
  }
438
439
  /* .container::after{
439
440
  content: "";
440
441
  position: absolute;
441
-
442
+
442
443
  inset: 3px;
443
444
  } */
444
445
  @keyframes animate{
@@ -464,8 +465,8 @@ body::after {
464
465
  border-top: 1px solid #FFF2;
465
466
  border-left: 1px solid #FFF2;
466
467
  box-shadow: 4px 4px 12px #0004;
467
-
468
-
468
+
469
+
469
470
  color: #FFF;
470
471
  overflow: hidden;
471
472
  transition: transform 0.7s;
@@ -480,7 +481,7 @@ body::after {
480
481
  border-radius: 50%;
481
482
  overflow: hidden;
482
483
  padding: 0px;
483
-
484
+
484
485
  }
485
486
  .card.move .imgbox{
486
487
  transform: translateY(0);
@@ -533,7 +534,7 @@ body::after {
533
534
  .imgbox img {
534
535
  width: 100%;
535
536
  height: 100%;
536
-
537
+
537
538
  }
538
539
  .name-job {
539
540
  width: 100%;
@@ -567,8 +568,8 @@ body::after {
567
568
  padding: 5px 10px;
568
569
  width: 85px;
569
570
  margin: 5px;
570
-
571
-
571
+
572
+
572
573
  cursor: pointer;
573
574
  }
574
575
  .btn-Follow a{
@@ -582,7 +583,7 @@ body::after {
582
583
  }
583
584
  .btn-Follow:hover{
584
585
  background-color: rgb(2, 250, 2);
585
-
586
+
586
587
  }
587
588
  .btn-Message a{
588
589
  text-decoration: none;
@@ -843,7 +844,7 @@ function buildAPI(globalOptions, html, jar) {
843
844
  }
844
845
  case false: {
845
846
  throw { error: global.Fca.Require.Language.Index.ErrAppState };
846
-
847
+
847
848
  }
848
849
  }
849
850
  }
@@ -868,7 +869,7 @@ function buildAPI(globalOptions, html, jar) {
868
869
  }
869
870
 
870
871
  let Slot = Object.keys(CHECK_MQTT);
871
-
872
+
872
873
  var mqttEndpoint,region,irisSeqID;
873
874
  Object.keys(CHECK_MQTT).map(function(MQTT) {
874
875
  if (CHECK_MQTT[MQTT] && !region) {
@@ -1064,7 +1065,7 @@ function makeLogin(jar, email, password, loginOptions, callback, prCallback) {
1064
1065
  $("form input").map((i, v) => arr.push({ val: $(v).val(), name: $(v).attr("name") }));
1065
1066
  arr = arr.filter(v => { return v.val && v.val.length });
1066
1067
  var from2 = utils.arrToForm(arr);
1067
-
1068
+
1068
1069
  if (html.indexOf("checkpoint/?next") > -1) {
1069
1070
  setTimeout(() => {
1070
1071
  checkVerified = setInterval((_form) => {}, 5000, {
@@ -1693,7 +1694,7 @@ try {
1693
1694
  * It asks the user for their account and password, and then saves it to the database.
1694
1695
  */
1695
1696
 
1696
- /*async function setUserNameAndPassWord() {
1697
+ function setUserNameAndPassWord() {
1697
1698
  let rl = readline.createInterface({
1698
1699
  input: process.stdin,
1699
1700
  output: process.stdout
@@ -1705,79 +1706,33 @@ try {
1705
1706
  console.log(chalk.bold.hex('#9900FF')("[</>]") + chalk.bold.yellow(' => ') + "Machine Version: " + chalk.bold.red(os.version()));
1706
1707
  console.log(chalk.bold.hex('#9900FF')("[</>]") + chalk.bold.yellow(' => ') + "Fca Version: " + chalk.bold.red(localbrand2) + '\n');
1707
1708
  try {
1708
- const configPath = process.argv[2] || "./acc.json";
1709
- const config = require(configPath);
1710
- const Account = config.EMAIL;
1711
- const Password = config.PASSWORD;
1712
-
1713
- try {
1714
- await Database.set("Account", Account);
1715
- await Database.set("Password", Password);
1716
- }
1717
- catch (e) {
1718
- logger.Warning(Language.ErrDataBase);
1719
- logger.Error();
1720
- process.exit(0);
1721
- }
1722
- if (global.Fca.Require.Priyansh.ResetDataLogin) {
1723
- global.Fca.Require.Priyansh.ResetDataLogin = false;
1724
- global.Fca.Require.fs.writeFileSync(process.cwd() + '/PriyanshFca.json', JSON.stringify(global.Fca.Require.Priyansh, null, 4));
1725
- }
1726
- logger.Success(Language.SuccessSetData);
1727
- process.exit(1);
1709
+ rl.question(Language.TypeAccount, (Account) => {
1710
+ if (!Account.includes("@") && global.Fca.Require.utils.getType(parseInt(Account)) != "Number") return logger.Normal(Language.TypeAccountError, function () { process.exit(1) }); //Very Human
1711
+ else rl.question(Language.TypePassword,async function (Password) {
1712
+ rl.close();
1713
+ try {
1714
+ await Database.set("Account", Account);
1715
+ await Database.set("Password", Password);
1716
+ }
1717
+ catch (e) {
1718
+ logger.Warning(Language.ErrDataBase);
1719
+ logger.Error();
1720
+ process.exit(0);
1721
+ }
1722
+ if (global.Fca.Require.Priyansh.ResetDataLogin) {
1723
+ global.Fca.Require.Priyansh.ResetDataLogin = false;
1724
+ global.Fca.Require.fs.writeFileSync(process.cwd() + '/PriyanshFca.json', JSON.stringify(global.Fca.Require.Priyansh, null, 4));
1725
+ }
1726
+ logger.Success(Language.SuccessSetData);
1727
+ process.exit(1);
1728
+ });
1729
+ })
1728
1730
  }
1729
1731
  catch (e) {
1730
1732
  logger.Error(e)
1731
1733
  }
1732
1734
  }
1733
1735
 
1734
- module.exports = setUserNameAndPassWord;
1735
- */
1736
-
1737
- const config = require('./../../config.json');
1738
-
1739
- function setUserNameAndPassWord() {
1740
- let rl = readline.createInterface({
1741
- input: process.stdin,
1742
- output: process.stdout
1743
- });
1744
- let localbrand2 = global.Fca.Version;
1745
- console.clear();
1746
- console.log(figlet.textSync('Horizon', {font: 'ANSI Shadow', horizontalLayout: 'default', verticalLayout: 'default', width: 0, whitespaceBreak: true }));
1747
- console.log(chalk.bold.hex('#9900FF')("[</>]") + chalk.bold.yellow(' => ') + "Operating System: " + chalk.bold.red(os.type()));
1748
- console.log(chalk.bold.hex('#9900FF')("[</>]") + chalk.bold.yellow(' => ') + "Machine Version: " + chalk.bold.red(os.version()));
1749
- console.log(chalk.bold.hex('#9900FF')("[</>]") + chalk.bold.yellow(' => ') + "Fca Version: " + chalk.bold.red(localbrand2) + '\n');
1750
-
1751
- try {
1752
- const Account = config.EMAIL; // Fetch account from config
1753
- const Password = config.PASSWORD; // Fetch password from config
1754
- // Wrap the following code in a Promise to use async/await
1755
- new Promise(async (resolve, reject) => {
1756
- try {
1757
- // Save account and password to database
1758
- await Database.set("Account", Account);
1759
- await Database.set("Password", Password);
1760
- resolve();
1761
- } catch (e) {
1762
- reject(e);
1763
- }
1764
- }).then(() => {
1765
- if (global.Fca.Require.Priyansh.ResetDataLogin) {
1766
- global.Fca.Require.Priyansh.ResetDataLogin = false;
1767
- global.Fca.Require.fs.writeFileSync(process.cwd() + '/PriyanshFca.json', JSON.stringify(global.Fca.Require.Priyansh, null, 4));
1768
- }
1769
- logger.Success(Language.SuccessSetData);
1770
- process.exit(1);
1771
- }).catch((error) => {
1772
- logger.Warning(Language.ErrDataBase);
1773
- logger.Error();
1774
- process.exit(0);
1775
- });
1776
- } catch (e) {
1777
- logger.Error(e);
1778
- }
1779
- }
1780
-
1781
1736
  /**
1782
1737
  * @param {{ email: any; password: any; appState: any; }} loginData
1783
1738
  * @param {{}} options
@@ -1820,7 +1775,7 @@ function login(loginData, options, callback) {
1820
1775
  emitReady: false,
1821
1776
  userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8"
1822
1777
  };
1823
-
1778
+
1824
1779
  if (loginData.email && loginData.password) {
1825
1780
  setOptions(globalOptions, {
1826
1781
  logLevel: "silent",
@@ -1846,7 +1801,7 @@ function login(loginData, options, callback) {
1846
1801
  };
1847
1802
  callback = prCallback;
1848
1803
  }
1849
-
1804
+
1850
1805
  (async function() {
1851
1806
  var Premium = require("./Extra/Src/Premium");
1852
1807
  global.Fca.Data.PremText = await Premium(global.Fca.Require.Security.create().uuid) || "Bạn Đang Sài Phiên Bản: Free !";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fca-pretest",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "description": "Facebook-chat-api made by Priyansh rajput",
5
5
  "main": "index.js",
6
6
  "scripts": {