Benign go Download

github.com/filamentphp/upgrade v3.3.40+incompatible

Calls PHP file_put_contents()Calls PHP unlink()
SHA-256b9d75d37c420a51972eff003c8b49514cda676ba3dcb1506aedefcee9cb18b4a

Evidence

PHP script path suffix lines 1–14
1#!/usr/bin/env php
2<?php
3
4use Composer\InstalledVersions;
5use Illuminate\Support\Str;
6use function Termwind\{ask, render};
7
8require 'vendor/autoload.php';
9
10render(<<<'HTML'
⋯4 lines
Discord service name lines 15–38
15:18… >
16
17 <div>
18 Welcome to the <strong>Filament v3</strong> upgrade process!
19
20 <br />
21
22 This script will attempt to handle most of the breaking changes for you.
23
24 <br />
25
26 If you have any questions, please reach out to us on <a href="https://filamentphp.com/discord" class="underline font-bold">Discord</a> or <a href="https://github.com/filamentphp/filament/discussions/new?category=q-a" class="underline font-bold">GitHub</a>.
27 </div>
28
29 <div>
30 To begin, please ensure that you are using a version control system such as Git.
31
32 <br />
33
34 We will make changes directly to your files, and you will need to be able to revert them if something goes wrong.
35
36 <br />
37
38 …
Calls PHP unlink() lines 65–73
65:8… >
66HTML);
67
68if (file_exists('config/filament-support.php')) {
69 unlink('config/filament-support.php');
70
71 render(<<<HTML
72 <p>
73 Removed <strong>config/filament-support.php</strong …
PHP reads content from a variable source lines 118–133
118:5… IndividualFilamentPackagesInstalled = false;
119
120foreach ([
121 ...glob('resources/css/*.css'),
122 ...glob('resources/css/**/*.css'),
123] as $file) {
124 $fileContents = file_get_contents($file);
125
126 if (str_contains($fileContents, 'filament/forms/dist/module.esm.css')) {
127 $hasIndividualFilamentPackagesInstalled = true;
128
129 $fileContents = preg_replace('/.*filament\/forms\/dist\/module\.esm\.css.*\n/', '', $fileContents);
130
131 render(<<<HTML
132 <p>
133 …
Calls PHP file_put_contents() lines 133–145
133:67… ng>{$file}</strong>.
134 </p>
135 HTML);
136 }
137
138 file_put_contents($file, $fileContents);
139}
140
⋯5 lines

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.