UNDERCODE COMMUNITY
2.69K subscribers
1.24K photos
31 videos
2.65K files
81K links
πŸ¦‘ Undercode World!
@UndercodeCommunity


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

2️⃣ Cyber & Tech NEWS:
@Undercode_News

3️⃣ CVE @Daily_CVE


✨ Youtube.com/Undercode
by Undercode.help
Download Telegram
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ Best command line tools for monitoring and diagnosing Linux GPUs :

Linux GPU Diagnostics
We can use the following tools to monitor, diagnose and test our Linux or * BSD based systems.

Finding GPU Information on Linux
To get GPU information, just run:

sudo lshw -C display -short
lspci -v | more

Output example:

H/W path Device Class Description
===============================================================
/0/100/1/0 display TU117M [GeForce GTX 1650 Mobile / Max-Q]
/0/100/2 /dev/fb0 display UHD Graphics 630 (Mobile)
1.glmark2 - stress testing GPU performance in Linux
glmark2 is a command line utility for testing OpenGL 2.0 and ES 2.0 performance.

We can install it like this:

$ sudo apt install glmark2

Now run it like this:

$ glmark2

He will then stress test your GPU on Linux:

My test result for an Nvidia GeForce GTX 1650 running on Ubuntu Linux 20.04 LTS:
=======================================================
glmark2 2014.03 + git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce GTX 1650 with Max-Q Design/PCIe/SSE2
GL_VERSION: 4.6.0 NVIDIA 450.80.02
=======================================================
[build] use-vbo=false: FPS: 4980 FrameTime: 0.201 ms
[build] use-vbo=true: FPS: 6927 FrameTime: 0.144 ms
[texture] texture-filter=nearest: FPS: 5144 FrameTime: 0.194 ms
[texture] texture-filter=linear: FPS: 4979 FrameTime: 0.201 ms
[texture] texture-filter=mipmap: FPS: 4030 FrameTime: 0.248 ms
[shading] shading=gouraud: FPS: 6358 FrameTime: 0.157 ms
[shading] shading=blinn-phong-inf: FPS: 5810 FrameTime: 0.172 ms
[shading] shading=phong: FPS: 6425 FrameTime: 0.156 ms
[shading] shading=cel: FPS: 5720 FrameTime: 0.175 ms
[bump] bump-render=high-poly: FPS: 4772 FrameTime: 0.210 ms
[bump] bump-render=normals: FPS: 7187 FrameTime: 0.139 ms
[bump] bump-render=height: FPS: 6724 FrameTime: 0.149 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 5278 FrameTime: 0.189 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 3649 FrameTime: 0.274 ms
[pulsar] light=false:quads=5:texture=false: FPS: 5793 FrameTime: 0.173 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 2776 FrameTime: 0.360 ms
[desktop] effect=shadow:windows=4: FPS: 3913 FrameTime: 0.256 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1555 FrameTime: 0.643 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 1703 FrameTime: 0.587 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 1800 FrameTime: 0.556 ms
[ideas] speed=duration: FPS: 5480 FrameTime: 0.182 ms
[jellyfish] : FPS: 4283 FrameTime: 0.233 ms
[terrain] : FPS: 746 FrameTime: 1.340 ms
[shadow] : FPS: 4878 FrameTime: 0.205 ms
[refract] : FPS: 1580 FrameTime: 0.633 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 5081 FrameTime: 0.197 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 4556 FrameTime: 0.219 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 5293 FrameTime: 0.189 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 5048 FrameTime: 0.198 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 4602 FrameTime: 0.217 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 4744 FrameTime: 0.211 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 4515 FrameTime: 0.221 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 4948 FrameTime: 0.202 ms
=======================================================
glmark2 Score: 4584
=======================================================
2. glxgears is a simple tool for testing Linux GPU performance.
It will display the frame rate at regular intervals.
It has become quite popular as a primary benchmarking tool for Linux and Unix-like systems like FreeBSD.

Install and run it like this:

$ apt install mesa-utils
$ glxgears

The GPU frame rate is measured and displayed on the screen every five seconds.

The final output will look like this:

Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
299 frames in 5.0 seconds = 59.416 FPS
299 frames in 5.0 seconds = 59.731 FPS
300 frames in 5.0 seconds = 59.940 FPS
300 frames in 5.0 seconds = 59.968 FPS
300 frames in 5.0 seconds = 59.943 FPS
300 frames in 5.0 seconds = 59.967 FPS
299 frames in 5.0 seconds = 59.742 FPS
300 frames in 5.0 seconds = 59.951 FPS
.....
...
...
3. gpustat is a simple tool to get statistics for Nvidia GPUs on Linux and FreeBSD Unix.
It is written in Python and is an ideal tool for CLI users, especially ML / AI developers.

It can be installed as follows using PIP:

$ pip install gpustat
$ pip3 install gpustat

Run it like this:
$ gpustat
$ gpustat -cp
Here we will see the name of the running process and their PID running on the Nvidia GPU:
itsecforu-wks01 Tue Nov 24 15:46:37 2020 450.80.02
[0] GeForce GTX 1650 with Max-Q Design | 39'C, ?? %, 2 % | 962 / 3911 MB | Xorg/2454(100M) Xorg/3504(325M) gnome-shell/3689(181M) firefox/4614(1M) firefox/5036(1M) firefox/5143(1M)
Reference:

$ gpustat -h


▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
Forwarded from UNDERCODE NEWS
For clients to exert more power over their voice data, Microsoft offers new setting options.
#Updates
Forwarded from UNDERCODE NEWS
Samsung Launches Earphone Protective Case Anycall Nostalgic Limited Edition.
#Technologies
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘Android Activity life cycle analysis under non-abnormal circumstances :

1. OnCreate(): Indicates that the Activity is being created. This is the first method of the life cycle. This method is only called once. In this method, variables are generally initialized, such as binding the Id of a Button control.

2. onRestart(): Indicates that the Activity is restarting. Under normal circumstances, if the foremost Activity changes from invisible to visible, the onRestart() method will be called. Generally, it is caused by user operations; For example, the current Activity is called A, and the user starts a new Activity called B, then A will be suspended, that is, onPause() and onStop() are called, and then when the user returns to this A, it will appear This situation.

3. onStart(): Indicates that the Activity is being started and is about to start. At this time, the Activity is visible, but it is not displayed to the foreground, and it is not able to interact with the user. In fact, the Activity has been displayed, but we can’t see it. That's it

4. onResume(): Indicates that the Activity is already visible, that is, it is presented on the foreground, that is, it can be seen by our naked eyes. We should pay attention to the difference between onResume() and onStart(). Both onStart() and onResume() represent the visible state of Activity, but when the onStart() method is called, the Activity is in the background, and when the onResume() method is called, the Activity is At the front desk.

5. onPause(): Indicates that the Activity is stopping. At this time, the status of the Activity is invisible, but it is still displayed in the foreground; in general, the method onStop() of the next life cycle will be called. Some data storage operations can be done here, but not too time-consuming, because it will affect the effect of the Activity display.

6. onStop(): Indicates that the Activity is about to stop. At this time, the status of the Activity is not visible, nor is it displayed on the foreground. You can do some heavyweight recycling work here, and it can't be too time-consuming.

7. onDestroy(): Indicates that the Activity is about to be destroyed. This is the last method of the Activity's life cycle, where you can release some resources.

(don't clone any tutorial fro here, you can forward as well)
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
Forwarded from UNDERCODE NEWS
The first digital bank in Japan, everybody's bank opening in May, the "insane" of finance.
#International
Forwarded from UNDERCODE NEWS
WINDTRE: scam that deprived the company of 21 million euros.
#CyberAttacks
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁

πŸ¦‘ The principle of gesture operation

First of all, in the Android system, each gesture interaction will be executed in the following order.

1. The moment the touch screen is touched, a MotionEvent event is triggered.

2. The event is monitored by OnTouchListener, and the MotionEvent object is obtained in its onTouch() method.

3. Forward the MotionEvent object to OnGestureListener through GestureDetector (gesture recognizer).

4. OnGestureListener obtains the object, listens to the information encapsulated by the object, and makes appropriate feedback.

This sequence can be said to be the principle of gesture operation.

Gesture operation class and interface

Let's take a look at MotionEvent, GestureDetector and OnGestureListener together .

MotionEvent: This class is used to encapsulate motion events such as gestures, touch pens, trackballs, etc. Two important attributes X and Y are encapsulated inside, which are used to record the coordinates of the horizontal axis and the vertical axis respectively.

GestureDetector: Recognize various gestures.

OnGestureListener: This is a gesture interaction monitoring interface, which provides multiple abstract methods, and calls the corresponding method according to the gesture recognition result of GestureDetector.

Gesture operation example

Next, I will demonstrate the implementation of gesture interaction through a code example of switching beautiful pictures, so that everyone has a deeper understanding and memory of the execution sequence above and the distinction between gestures.

First, provide a layout file with only ImageView-main.xml.

πŸ”΅XML/HTML code

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:id="@+id/image" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center"/>
</LinearLayout>

(don't clone any tutorial fro here, you can forward as well)
▁ β–‚ β–„ Uπ•Ÿπ”»β’Ίπ«Δ†π”¬π““β“” β–„ β–‚ ▁
Forwarded from UNDERCODE NEWS
It's not possible to charge MacBook Pro, netizens collectively fry pot, Apple responds: device issue.
#Bugs
Forwarded from UNDERCODE NEWS
Microsoft patches odd defects in the successful execution of malware in Windows Defender.
#Vulnerabilities