UNDERCODE COMMUNITY
2.67K subscribers
1.23K photos
31 videos
2.65K files
79.6K links
πŸ¦‘ Undercode Cyber World!
@UndercodeCommunity


1️⃣ World first platform which Collect & Analyzes every New hacking method.
+ AI Pratice
@Undercode_Testing

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE

✨ Web & Services:
β†’ Undercode.help
Download Telegram
100 % anonymous>

5) Tips and tricks to keep hidden online
Even if you take all the precautions listed above, if unsafe habits persist, they will immediately destroy your online privacy. Cultivating a new mindset is the best way to stay hidden. Here are some common pitfalls and other measures you can take to protect your online anonymity.

6) Use privacy-oriented browser plugins -Although plugins can bring new threats to your identity, the correct plugin can help you stay hidden. Privacy Badger is a good start because it removes harmful scripts and tracks code that can be followed on the web. HTTPS Everywhere forces many websites to use the HTTPS protocol, which encrypts information to keep it confidential.

7) Private mode won't let you hide -Modern browsers have an incognito or private mode that allows you to surf without leaving traces. Unfortunately, this does not extend to the Internet, only to your local device. Incognito mode will only keep your activities away from the browser's history, which is good for local privacy, but it does not help any online issues.

8) Free VPNs can be dangerous -free VPNs are everywhere, and they promise everything from unlimited bandwidth to incredible encryption at no cost. In fact, many of these services store and sell user-generated data and transfer your browsing information to third parties without your consent. You never know that your information will end with a free VPN, which is why you should stick to a reliable paid service.

Written by Undercode
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
This media is not supported in your browser
VIEW IN TELEGRAM
This media is not supported in your browser
VIEW IN TELEGRAM
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Best Chrome Extensions 2020 VERIFIED AND CHOOSED BY UNDERCODE:
T.me/UndercodeTesting


1) https://chrome.google.com/webstore/detail/grammarly-for-chrome/kbfnbcaeplbcioakkpcpgfkobkghlhen

2) https://chrome.google.com/webstore/detail/grammar-and-spell-checker/oldceeleldhonbafppcapldpdifcinji

3) https://chrome.google.com/webstore/detail/grammarbase-web-grammar-c/plklmneddckmpnnkjldofmaegchjmoea

4) https://chrome.google.com/webstore/detail/my-grammar-check/ecpbljknammclncihheaiehdahccgmnk

5) https://chrome.google.com/webstore/detail/grammar-and-spelling-chec/kdfieneakcjfaiglcfcgkidlkmlijjnh

6) https://chrome.google.com/webstore/detail/prowritingaid/npnbdojkgkbcdfdjlfdmplppdphlhhcf

7) https://chrome.google.com/webstore/detail/plagly-plagiarism-checker/dhkdaobajijkikfmfhnebdocgfimnpag

8) https://chrome.google.com/webstore/detail/plagiarism-checker-for-ch/pkgnahhgdacdodckgdpomajapacjhjbf

9) https://chrome.google.com/webstore/detail/mybib-free-citation-gener/phidhnmbkbkbkbknhldmpmnacgicphkf

10) https://chrome.google.com/webstore/detail/cite-this-for-me-web-cite/nnnmhgkokpalnmbeighfomegjfkklkle

11) https://chrome.google.com/webstore/detail/easybib-toolbar/hmffdimoneaieldiddcmajhbjijmnggi

12) https://chrome.google.com/webstore/detail/google-dictionary-by-goog/mgijmajocgfcbeboacabfgobmjgjcoja

13) https://chrome.google.com/webstore/detail/power-thesaurus/hhnjkanigjoiglnlopahbbjdbfhkndjk

14) https://chrome.google.com/webstore/detail/quillbot/iidnbdjijdkbmajdffnidomddglmieko

15) https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji

16) https://chrome.google.com/webstore/detail/evernote-web-clipper/pioclpoplcdbaefihamjohnefbikjilc

17) https://chrome.google.com/webstore/detail/todoist-to-do-list-and-ta/jldhpllghnbhlbpcmnajkpdmadaolakh

18) https://chrome.google.com/webstore/detail/dualless/bgdpkilkheacbboffppjgceiplijhfpd

19) https://chrome.google.com/webstore/detail/auto-highlight/dnkdpcbijfnmekbkchfjapfneigjomhh

20) https://chrome.google.com/webstore/detail/kami-extension-pdf-and-do/ecnphlgnajanjnkcmbpancdjoidceilk

21) https://chrome.google.com/webstore/detail/nimbus-screenshot-screen/bpconcjcammlapcogcnnelfmaeghhagj

22) https://chrome.google.com/webstore/detail/lastpass-free-password-ma/hdokiejnpimakedhajhdlcegeplioahd


Written by Undercode
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ How to extract password in Google Chrome ?BY UNDERCODE
instagram.com/undercodeTesting

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

> Extract Chrome password in real time from local computer (take Windows as an example)

> In order to extract the Chrome password from the Windows computer, I will use password recovery software (Elcomsoft Internet PasswordBreaker EINPB). Please note that it only applies to systems where you will log in with the password you want to extract.

2) Why perform extraction on the system being logged in? Because the Windows system has a protection mechanism. Although it is technically possible to extract passwords from offline systems or disk images, if the user is not logged in, the required encryption keys are difficult to access and extract.

πŸ¦‘ Prepare the extraction conditions first:

1) Self-generated system (live system) or virtual system;

2) Log in as the user who extracted the password;

3) Elcomsoft Internet Password Breaker is downloaded and installed in advance;

πŸ¦‘ Steps to use Elcomsoft Internet Password Breaker to extract Chrome password:

1) Start Elcomsoft Internet Password Breaker:


2) Click Web Password-Google Chrome:


3) After a few minutes, a window with a list of accounts and passwords will open.


4) You can view your personal password or export the account and password list to a text file, however, I recommend using "Export Password" to create a filtering dictionary of all passwords found on the user's computer. This dictionary may be used such as ElcomSoft Distributed Password Recovery (a powerful distributed password brute force cracking tool), Advanced Office Password Recovery

> ((can crack and recover word, ppt, excel and other office format encrypted documents, is a versatile Office password Cracking tool, powerful, compatible with all versions of office) or other password cracking tools used to brute force password cracking.


5) The system will prompt you to enter the name and location of the text file containing the password

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Extract Chrome password from Google account
pinterest.com/undercode_Testing

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

1) Google accounts can collect, store, and process a large amount of information, including the account and password used in Google Chrome. The password is stored in the user ’s Google account and is automatically synchronized to the device and Chrome instances that are logged into the same account.

> Elcomsoft Cloud Explorer 1.30 or higher is required to extract text messages from Google account. In order to download text messages, please perform the following steps:

1) Start Elcomsoft Cloud Explorer 1.30 (or newer version)

2) Click on the file to add Google snapshot

3) Verify Google account by providing username and password


4) If the user enables two-factor authentication, the system will prompt you to enter the relevant authentication code. Elcomsoft Cloud Explorer automatically detects the type of two-factor authentication on the user account. For example, if an account is protected by Google prompts, you will be asked to confirm the interactive prompt on one of the trusted devices. If no trusted device is available, it will automatically select "Try another method". In this case, you will be able to use the 8-bit backup code or 6-bit TOTP code generated by the Authenticator application.


5) After verification is complete, select Chrome.


6) Elcomsoft Cloud Explorer will download Chrome data from the Google account, which may take a few minutes, depending on the amount of data stored in the Google account.


7) After the download is complete, you can access Chrome data.


8) Click Chrome, and the password will be displayed in the window that opens.


9) You can use the "Export" button to export the Chrome account and password to an Excel-compatible spreadsheet. If you need to build a filtering password dictionary to use Elcomsoft Distributed Password Recovery, you can copy the password directly from the Excel spreadsheet, it will filter out the duplicate entries and save it to a text file.

πŸ¦‘ Chrome password synchronization protection

1) If it is easy to extract passwords from a user ’s Google account, does that mean that their protection is not in place? Not exactly. By default, the login name and password are protected by the user ’s Google credentials.

2) However, users can also protect their passwords by setting their own passwords.

3) Google ’s official documentation describes these two protection methods and the differences between them.

4) It is worth noting that if the user forgets the password, they cannot access the password. Google recommends disabling and re-enabling password synchronization, which will delete all previously stored passwords from the user ’s account.

5) If Elcomsoft Cloud Explorer detects an additional password protection policy, it will prompt for the sync password before downloading the data.

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘How to View Computer Account Tool-Credential Manager Graphic User Guide to Remember Password by undercode :
>When we use the browser, we are used to saving the login account by remembering the password, which is convenient for the next login, but how to view these passwords? If I forgot an account, how can I retrieve the password remembered through the browser?
> this trick only works with windows 10
pinterest.com/undercode_Testing

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

1) Click the computer start menu, find the control panel in the windows system, select open

2) After opening, use the "big icon" view to find the "credential manager" and click to open.

3) After opening, our user name and URL are saved under web credentials

4) Then click to view specific information

5) After clicking, you will see that the password is hidden. You can click Show to display the password in the form of clear text. Windows security pops up. Enter the power-on password here.

6) If no power-on password is set, click the display and the password will appear directly

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Is automatic login safe? You can extract the password saved by the browser in a few easy steps follow this guide by undercode:
instagram.com/undercodeTesting

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

In order to save the trouble of entering the account and password every time, not only do clients like QQ and so on have the function of remembering passwords and automatic login, but now browsers have the functions of saving account passwords and auto-filling. But is it safe to save the browser password? The answer may scare you, it is super insecure!

1) open the browser's settings in turn β†’ other or advanced settings (because of different browsers, the path will be different) β†’ manage the saved password.

2) now you can see the website, account and password replaced by the little black dot in the browser saved password.

3) So how to show the password? Double-click the password and click display.

4) In addition, if your computer has a power-on password, you need to enter the computer's startup password after clicking the display , and then you can view our account password. So sometimes, setting a password for the computer is very important to protect personal privacy.


πŸ¦‘ But do you think it is safe to set a power-on password? Experts generally think so. Directly bypass the power-on password and go straight to your account and password.

1) let's open a website and log in. You can see that the account and password of the login interface have been automatically filled in by the browser. We click the input box of the password, and right-click the mouse to see the last item "check". Other browsers call the review element or review and so on.

2) Then you can see a lot of codes appear on the right side of the interface. It doesn't matter if you don't understand it. Use the mouse to select. When the mouse is placed on a line of code, the corresponding area will be displayed in the interface. Find the code that shades the password input box.

3) At this time, find "type = password" in the corresponding code, change "password" to "text", and press Enter. Then look at the password input box, the password has been displayed.

4) In fact, the masters of the masters (the ones who know the code, there are so many programmers, there should be a lot of masters) can also be seen in this way, even changing "password" to "text" is saved . Open the corresponding content directly, you can view the code.

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Bypass Chrome password management, check the saved password of browser, pay attention to computer security
T.ME/UNDERCODETesting

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

> In the office or other places, when a colleague or friend is out of business, the computer leaves the seat without a lock screen, you can use this gap to view his account password saved on the Chrome browser.

1) Enter chrome: // settings / passwords in the address bar to view a list of all saved passwords

2) Come out this interface:


Click the eye logo to pop up the Google Chrome protection password.


3) Use the mobile 10086 website for testing here, click on the website 10086.cn


4) Enter this interface, see if there is, the password is invisible:

5) Position the mouse pointer to the SMS password box, right-click [Check], or [Ctrl + Shift + i], and the code window will come out. If it is not easy to find, you can position the mouse pointer to the password input box again Right mouse button 【Check】

6) Rewrite type = "password" to type = "Text", and then look at the password box to see the password.

7) Firefox browser in [Settings]-[Options]-[Security]-[Saved Security Information]-[Display Password], you can directly view the password, without any credentials, so it is best not to get used to the public computer It is good to save the password, and the personal computer should also be safe.

8) For the sake of convenience, many people like to save passwords with their browsers for the next use, but they must be security-conscious. People are no longer at the computer and remember to lock the screen. If you like it, just give it a follower!

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Memory read crack QQ password full
instagram.com/undercodeTesting

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

1) We complete the QQ login by entering the correct account password. In this process, in addition to sending the account password to the server for verification, QQ will also store at least one hash value of the password in memory.

2) This value can be After the verification of some access, such as opening QQ games. We need to obtain the QQ password by reading from the memory, we first need to know where the QQ password hash value is placed in the memory. Of course, we do not need to program the location of the hash value ourselves.

3) There is an open source software called Cheat Engine, which was originally used to cheat when playing games, but we can use it to complete the search for the hash value. Mission.

4) First run QQ, if the version is different, the memory location of the hash value may also be different), enter your own account password after logging in, you don't have to worry about it. Then we need to obtain the hash value of our QQ password. This value will be used to search the location of the password hash value in the QQ process space. The hash value of the QQ password is calculated using the MD5 algorithm, so we also need an MD5 calculation tool to calculate the hash value of our own password.

5) There are many such calculation tools, both online and local. It is a tool called HASH. We create a new text file, write the password in it and then save the file. Use this tool to open the text file where the password is saved and you can see the hash value of the password is 21232F297A57A5A743894AOE4A801FC3.


6) Open Cheat Engine 5.4, click the icon of the small computer in the upper left corner to select the process "QQ.exe" that we want to open. Select "Array fo Bytes" for "Value type" on the interface, indicating that we want to search for consecutive bytes, check the check box in front of the "Hex" label, and then paste the hash value obtained before into the text after "Hex9" frame.

7) Click "First Scan" to start the first search. The left side of the software interface immediately shows three locations for storing hash values: OOf07494, Ola9a364, and Olaba97c. These three values ​​are just the addresses where the password hashes are stored. These positions may change, and I will continue to look for pointers to these addresses. Change "Value fo type" to "4 Bytes", paste the above three addresses into the search box, you can get the address pointing to OOf07494 is Ola2e448, the address pointing to Ola9a364 is 019749ec, the value of Olaba97c was not found. Now we start to wonder, which address above is the base address?

8) Since it is a base address, it is certain that its location in the same environment will not change. Therefore, we can open another QQ decisively and complete the above process again in the newly opened QQ process. This time, I still got 3 sets of data similar to the previous ones: the address pointing to OOf07494 is Ola2e448, the address pointing to Ola99c e4 is 01974aac, and Olaca34c was not found. It is not difficult to see that the pointer at address Ola2e448 has not changed in the two QQs. We can use this address to programmatically read the memory hash value.

9) I have written a GUI program with MFC, but for the sake of explanation, I re-written a console interface program to avoid the interference of MFC content. This program is written and run through using VC6.0.
10) The main idea of ​​the program code is to cite all processes named "QQ.exe" (the main code is in the function GetAllHashValue), and after opening the process, read the data pointed to by the pointer we obtained above (the main code is in the function GetHashValueByProcessID and ReadMemoryData), and finally convert and display the data (the main code is in the ShowHashValue function). The specific function of the function in the above code is already explained in the comments in front of the function, and there are some system calls in it. If you are not clear about the detailed usage, you can check it online.

11) Now we can build and execute the program, the console interface will display the password hashes of all running QQ. We right-click on the console interface, click on the marker, then select the string of text of the MD5 value, then right-click on the title bar, and click "Edit One> Copy" to copy the text. Get this string of text and go straight to the major MD5 cracking stations. If the password is not strong enough, it can be reversed immediately. For example, the MD5 value in the previous example can be reversed to get the plain text "admin".

12) Attentive friends here should find that the read MD5 value does not output the corresponding QQ number. If multiple QQs are opened on a computer, it is difficult to determine which QQ the password is. In fact, the same method can be used to find the QQ number stored in memory, which is relatively simpler than finding a password. Interested friends can continue to practice.

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘PROGRAMMING IMPROVE YOUR SKILLS BY UNDERCODE
> Instructions and examples of fopen (), fwrite (), fread () functions (detailed explanation)
twitter.com/undercodeNews

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

open () function:

1) nction:


Businessmen and statistical trends


In C language, the fopen () function is used to open a file at a specified path and obtain a pointer to the file.

2) Function prototype:

FILE * fopen(const char * path,const char * mode);

-path: file path, such as: "F: \ Visual Stdio 2012 \ test.txt"

-mode: File opening method, for example:

"r" opens the file as read-only. The file must exist.

"w" opens the write-only file. If the file exists, the file length is cleared to 0, that is, the content of the file will disappear. If the file does not exist, the file is created.

"w +" opens a readable and writable file. If the file exists, the file length is cleared to zero, that is, the content of the file will disappear. If the file does not exist, the file is created.

"a" opens the write-only file in an additional way. If the file does not exist, the file will be created. If the file exists, the written data will be added to the end of the file, that is, the original content of the file will be retained. (EOF character reserved)

"a +" opens readable and writable files in an additional way. If the file does not exist, it will be created. If the file exists, the written data will be added to the end of the file, that is, the original content of the file will be retained. (The original EOF character is not retained)



"wb" write only opens or creates a binary file, and only allows writing data.

"wb +" read-write opens or creates a binary file, allowing reading and writing.

"ab" additionally opens a binary file and writes data at the end of the file.

"ab +" read and write opens a binary file, allowing reading, or appending data at the end of the file.

--Return value: After the file is successfully opened, the file pointer to the stream will be returned. If the file fails to open, it returns NULL, and the error code is stored in errno.


πŸ¦‘ fwrite () function:

1) Function:

In C language, the fwrite () function is used to write data in a memory area to local text.

2) Function prototype:

size_t fwrite(const void* buffer, size_t size, size_t count, FILE* stream);



-buffer: pointer to data block

-size: the size of each data, the unit is Byte (for example: sizeof (int) is 4)

-count: number of data

-stream: file pointer

Note: The return value varies with the calling format:

(1) Call format: fwrite (buf, siz eof (buf), 1, fp);

Successful write return value is 1 (ie count)

(2) Call format: fwrite (buf, 1, siz eof (buf), fp);

Successful write returns the actual number of data written (unit is Byte)

3) Matters needing attention:


After writing the data, call fclose () to close the stream. Without closing the stream, each time the data is read or written, the file pointer will point to the next pointer to be written or read.


πŸ¦‘ Example description:

Code 1: The following code can write 1024 words (int) to a text file. In the call of fwrite, size is sizeof (int) and count is DATA_SIZE

[cpp] view plain copy

<code class="language-cpp">#include "stdafx.h"

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#include <stdlib.h>

#define DATA_SIZE 1024

int main ()

{

unsigned int *dataPtr = NULL;

dataPtr = (unsigned int *)malloc(sizeof(int)*DATA_SIZE);

for(unsigned int i=0;i<DATA_SIZE;i++)



{

dataPtr [i] = i; // Initialize the cache area

}

FILE *fp = fopen("F:\\Labwindows cvi\\test.txt","w");

fwrite(dataPtr,sizeof(int),DATA_SIZE,fp);

fclose(fp);

free(dataPtr);

system("pause");

return 0;

}

</code>

Code 2: The following code can also write 1024 words into the text. Although the size in the fwrite function is 1, the count is DATA_SIZE * sizeof (int). Same result as code 1.

// datasave.cpp: defines the entry point of the console application.

//

#include "stdafx.h"

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#include <stdlib.h>



#define DATA_SIZE 1024
int main ()

{

unsigned int *dataPtr = NULL;

dataPtr = (unsigned int *)malloc(sizeof(int)*DATA_SIZE);

for(unsigned int i=0;i<DATA_SIZE;i++)

{

dataPtr [i] = i; // Initialize the cache area

}

FILE *fp = fopen("F:\\Labwindows cvi\\test.txt","ab+");

fwrite(dataPtr,1,DATA_SIZE*sizeof(unsigned int),fp);

<pre name="code" class="cpp"> fclose(fp);

<pre name="code" class="cpp"> free(dataPtr);



system("pause"); return 0;}

Code 3: The following code writes 4096 char data to the text. The maximum value of the written data is 255, which is different from the above code 1, 2 because the data type of the buffer area is different

// datasave.cpp: defines the entry point of the console application.

//

#include "stdafx.h"

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#include <stdlib.h>

#define DATA_SIZE 1024

int main ()

{

unsigned char *dataPtr = NULL;

dataPtr = (unsigned char *) malloc (sizeof (int) * DATA_SIZE); // The area applied for is 4096 chars, that is, the area of ​​1024 words

for(unsigned int i=0;i<DATA_SIZE;i++)

{

dataPtr [i] = i; // Initialize the cache area

}

FILE *fp = fopen("F:\\Labwindows cvi\\test.txt","ab+");

fwrite(dataPtr,sizeof(char),DATA_SIZE*sizeof(int),fp);

fclose(fp);

free(dataPtr);

system("pause");

return 0;

}

Code 4: When applying for an area with the malloc function, it is a char * area that can be applied. Unsigned int data can be installed after forced type conversion.

// datasave.cpp: defines the entry point of the console application.

//

#include "stdafx.h"

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

#include <stdlib.h>

#define DATA_SIZE 1024

int main ()

{

unsigned char *dataPtr = NULL;

unsigned int *Ptr = NULL;

dataPtr = (unsigned char *)malloc(sizeof(int)*DATA_SIZE);

Ptr = (unsigned int *) dataPtr;

for(unsigned int i=0;i<DATA_SIZE;i++)

{

Ptr[i] = i;

}

FILE *fp = fopen("F:\\Labwindows cvi\\test.txt","ab+");

fwrite(Ptr,sizeof(unsigned int),DATA_SIZE,fp);

fclose(fp);

free(dataPtr);

system("pause");

return 0;

}


fread () function:
1) Function:

Read data from a file stream

2) The function prototype is as follows:

size_t fread(void *buffer, size_t size, size_t count, FILE *stream);

-buffer: pointer to data block

-size: the size of each data, the unit is Byte (for example: sizeof (int) is 4)

-count: number of data

-stream: file pointer

Note: The return value varies with the calling format:

(1) Call format: fread (buf, sizeof (buf), 1, fp);

When the reading is successful: when the amount of data read is exactly sizeof (buf) Byte, the return value is 1 (ie count)

Otherwise, the return value is 0 (the amount of read data is less than sizeof (buf))

(2) Call format: fread (buf, 1, sizeof (buf), fp);

The successful return value is the actual number of data read back (unit is Byte)

Code reference:

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main(int argc, char *argv[])

{

FILE *filp = NULL;

char fileDir[] = "/home/yangzhiyuan/Documents/test.txt";

char dataPtr[] = "Helloworld";

printf("sizeof(dataPtr) = %ld\n",sizeof(dataPtr));

filp = fopen (fileDir, "w +"); / * readable and writable, create if it does not exist * /

int writeCnt = fwrite (dataPtr, sizeof (dataPtr), 1, filp); / * The return value is 1 * /

// int writeCnt = fwrite (dataPtr, 1, sizeof (dataPtr), filp); / * The return value is 11 * /

printf("writeCnt = %d\n",writeCnt);

fclose(filp);

FILE *fp = NULL;

fp = fopen(fileDir,"r");

char buffer[256];

int readCnt = fread (buffer, sizeof (buffer), 1, fp); / * The return value is 0 * /

// int readCnt = fread (buffer, 1, sizeof (buffer), fp); / * The return value is 11 * /

printf("readCnt = %d\n",readCnt);

fclose(fp);

printf("%s\n",buffer);

exit(0);

}

Note: In this example code, two FILE variables are defined, one for write and one for read. After writing, close the file, then open it, and read. If you use a FILE variable directly, you will get an error!

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ The most complete C language file operation is not to mention, the file operation of the C language basic tutorial
t.me/undercodeTesting

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

1) C language file reading and writing

A file, whether it is a text file or a binary file, represents a series of bytes. The C language not only provides access to the top-level functions, but also provides low-level (OS) calls to process files on storage devices. The basic process of document management is as follows:


2) open a file

Close file
open a file

For more C / C ++ learning materials, please privately mail me "Code" to get it
You can use the fopen () function to create a new document or open an existing file, the call will initialize the type FILE an object of type FILE contains all information necessary to control the flow. The following is the prototype of this function call:

3) For more C / C ++ learning materials, please privately mail me "Code" to get it
Here, filename is a string used to name a file, and the access mode

4) If you are dealing with binary files, you need to use the following access mode to replace the above access mode:

"rb", "wb", "ab", "rb+", "r+b", "wb+", "w+b", "ab+", "a+b"

5) Close file
To close the file, use the fclose () function. The prototype of the function: int fclose (FILE * fp);

6) If the file is successfully closed, the fclose () function returns zero. If an error occurs while closing the file, the function returns EOF . This function actually clears the data in the buffer, closes the file, and frees all memory used for the file. EOF is a constant defined in the header file stdio.h . The C language standard library provides various functions to read and write files as characters or as fixed-length strings.


7) Write file
Write in the form of characters: int fputc (int c, FILE * fp);

Write in the form of a string: int fputs (const char * s, FILE * fp);

Format write: int fprintf (FILE * fp, const char * format, ...) ;


8) Here is the simplest function to read a single character from a file:

Read in the form of characters: int fgetc (FILE * fp);

Read as a string: char * fgets (char * buf, int n, FILE * fp);

Format read: int fscanf (FILE * fp, const char * format, ...);


9) C / C ++ learning materials, please privately mail me "Code" to get it
Binary I / O function

10) C / C ++ learning materials, please privately mail me "Code" to get it
The following two functions are used for binary input and output:

...
11) Both of these functions are used to read and write memory blocks-usually arrays or structures.

12) File pointer
Move the file pointer to the specified position to read, or insert to write: int fseek (FILE * stream, long offset, int whence);

13) fseek sets the current read-write point to offset, whence can be SEEK_SET, SEEK_CUR, SEEK_END These values ​​determine whether to calculate the offset offset from the file header, current point and end of file.

14) You can define a file pointer FILE * fp , when you open a file, the file pointer points to the beginning, how many bytes you want to refer to, as long as you control the offset, for example, move one byte backward relative to the current position : Fseek (fp, 1, SEEK_CUR); the middle value is the offset. If you want to move forward one byte, you can directly change to a negative value: fseek (fp, -1, SEEK_CUR) .

15) Repoint the position pointer inside the file to the beginning of a stream (data stream / file): void rewind (FILE * stream);

WRITTEN BY UNDERCODE
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Website or Ip Hacker for Termux
pinterest.com/undercode_testing

πŸ¦‘ π•ƒπ”Όπ•‹π•Š π•Šπ•‹π”Έβ„π•‹ :

apt update

==> apt upgrade

==> apt install python

==> apt install python2

==> apt install git

==> cd $HOME

==> git clone https://github.com/Bhai4You/Bull-Attack

==> cd Bull-Attack

==> chmod +x B-attack.py

==> python2 B-attack.py

▁ β–‚ β–„ ο½•π•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁