Forwarded from Backup Legal Mega
Amazon Carding Tutorial-1_2.pdf
29.9 KB
Forwarded from Backup Legal Mega
β β β ο½ππ»βΊπ«Δπ¬πβ β β ββ
π¦How to get the maximum storage size of localStorage ?
A brief introduction to localStorage, sessionStorage, cookies
1) localStorage: Only the client storage does not participate in server communication. The storage size is generally 5M. If it is not manually cleared, then it will always exist even if the browser is closed.
2) sessionStorage: Only the client storage does not participate in server communication, the storage size is generally 5M, session-level storage, which means that it will be cleared if the current page or browser is closed
3) cookie: client storage, participate in server communication, storage size is 4k, can set life cycle, effective within the set life cycle
β β β ο½ππ»βΊπ«Δπ¬πβ β β ββ
π¦How to get the maximum storage size of localStorage ?
A brief introduction to localStorage, sessionStorage, cookies
1) localStorage: Only the client storage does not participate in server communication. The storage size is generally 5M. If it is not manually cleared, then it will always exist even if the browser is closed.
2) sessionStorage: Only the client storage does not participate in server communication, the storage size is generally 5M, session-level storage, which means that it will be cleared if the current page or browser is closed
3) cookie: client storage, participate in server communication, storage size is 4k, can set life cycle, effective within the set life cycle
β β β ο½ππ»βΊπ«Δπ¬πβ β β ββ
Forwarded from Backup Legal Mega
π¦The code :
function() {
if(!window.localStorage) {
console.log('-localStorage!')
}
var test = '0123456789';
var add = function(num) {
num += num;
if(num.length == 10240) {
test = num;
return;
}
add(num);
}
add(test);
var sum = test;
var show = setInterval(function(){
sum += test;
try {
window.localStorage.removeItem('test');
window.localStorage.setItem('test', sum);
console.log(sum.length / 1024 + 'KB');
} catch(e) {
alert(sum.length / 1024 + 'KB');
clearInterval(show);
}
}, 0.1)
})()
π¦Run the above method directly in the browser console.
The local storage in the Chrome browser is 5120kb, which is 5M.
This undercode post about how to get the maximum storage size of localStorage is introduced here. For more related localStorage maximum storage content"
β β β ο½ππ»βΊπ«Δπ¬πβ β β ββ
function() {
if(!window.localStorage) {
console.log('-localStorage!')
}
var test = '0123456789';
var add = function(num) {
num += num;
if(num.length == 10240) {
test = num;
return;
}
add(num);
}
add(test);
var sum = test;
var show = setInterval(function(){
sum += test;
try {
window.localStorage.removeItem('test');
window.localStorage.setItem('test', sum);
console.log(sum.length / 1024 + 'KB');
} catch(e) {
alert(sum.length / 1024 + 'KB');
clearInterval(show);
}
}, 0.1)
})()
π¦Run the above method directly in the browser console.
The local storage in the Chrome browser is 5120kb, which is 5M.
This undercode post about how to get the maximum storage size of localStorage is introduced here. For more related localStorage maximum storage content"
β β β ο½ππ»βΊπ«Δπ¬πβ β β ββ
Forwarded from Backup Legal Mega
β β β ο½ππ»βΊπ«Δπ¬πβ β β ββ
π¦Pro hacking -Use the pandas library to filter and save csv files-
1) This operation does not seem to be difficult now, but in undercode I have been searching for relevant information for a long time.
2) Most of the gangsters are directly throwing me on the pandas official website, and then give an entry-level example.
https://pandas.pydata.org/docs/reference/index.html
3) First import the pandas library
import pandas as pd
4) Then use read_csv to open the specified csv file
df = pd.read_csv('./IP2LOCATION.csv',encoding= 'utf-8')
5)In this function, the path of the csv file needs to be written. If the csv file is saved to the python project folder, only the ./ file name is needed, and encoding = 'utf-8' is encoded using utf-8 , Sometimes need to change to gbk.
6) Although we are reading csv files, in fact, because we are using the pandas library, so we actually get a DataFrame data structure.
7) You can use print (type (df)) to check
π¦Pro hacking -Use the pandas library to filter and save csv files-
1) This operation does not seem to be difficult now, but in undercode I have been searching for relevant information for a long time.
2) Most of the gangsters are directly throwing me on the pandas official website, and then give an entry-level example.
https://pandas.pydata.org/docs/reference/index.html
3) First import the pandas library
import pandas as pd
4) Then use read_csv to open the specified csv file
df = pd.read_csv('./IP2LOCATION.csv',encoding= 'utf-8')
5)In this function, the path of the csv file needs to be written. If the csv file is saved to the python project folder, only the ./ file name is needed, and encoding = 'utf-8' is encoded using utf-8 , Sometimes need to change to gbk.
6) Although we are reading csv files, in fact, because we are using the pandas library, so we actually get a DataFrame data structure.
7) You can use print (type (df)) to check
Forwarded from Backup Legal Mega
π¦DataFrame is a table-type data structure. Therefore, we can use it as a table. The DataFrame is displayed similar to a table, and also contains row labels and column labels.
We can add a column label using pandas.DataFrame.columns
In our example, the variable of DataFrame type is df, so the usage method is df.columns, and the column labels we add are a, b, c, d, e, f
> df.columns = ['a','b','c','d','e','f']
We can add a column label using pandas.DataFrame.columns
In our example, the variable of DataFrame type is df, so the usage method is df.columns, and the column labels we add are a, b, c, d, e, f
> df.columns = ['a','b','c','d','e','f']
Forwarded from Backup Legal Mega
π¦Then, we want to extract those rows that are equal to a certain value in a certain column
You can think of the read content as a list, and then the elements of this list are each row in the table, and then each row is also a list, that is, a list in the list.
For example, I want to extract the row with the value of Andhra Pradesh in the fifth column of the table, and because we defined the column label of the fifth column as e
So the code is as example :
> data = df[df['e'] == 'Andhra Pradesh']
You can think of the read content as a list, and then the elements of this list are each row in the table, and then each row is also a list, that is, a list in the list.
For example, I want to extract the row with the value of Andhra Pradesh in the fifth column of the table, and because we defined the column label of the fifth column as e
So the code is as example :
> data = df[df['e'] == 'Andhra Pradesh']
Forwarded from Backup Legal Mega
π¦Finally, we can use to_csv in pandas to save the filtered data to a new csv file.
data.to_csv('my_IP2LOCATION.csv')
Usage is table name.to_csv ('path to save place / table name.csv')
Finally, summarize our code
> import pandas as pd
df = pd.read_csv('./IP2LOCATION.csv',encoding= 'utf-8')
# print(type(df))
df.columns = ['a','b','c','d','e','f']
data = df[df['e'] == 'Andhra Pradesh']
data.to_csv('my_IP2LOCATION.csv')
data.to_csv('my_IP2LOCATION.csv')
Usage is table name.to_csv ('path to save place / table name.csv')
Finally, summarize our code
> import pandas as pd
df = pd.read_csv('./IP2LOCATION.csv',encoding= 'utf-8')
# print(type(df))
df.columns = ['a','b','c','d','e','f']
data = df[df['e'] == 'Andhra Pradesh']
data.to_csv('my_IP2LOCATION.csv')
Forwarded from Backup Legal Mega
Then my_IP2LOCATION.csv after our screening
Forwarded from Backup Legal Mega
π¦Only 3461 rows
PS: You can use print (len (df.values)) to view the number of rows
PS: You can use print (len (df.values)) to view the number of rows