Merge branch 'master' of https://github.com/yhackerbv/VulnNottiProject
Showing
14 changed files
with
447 additions
and
56 deletions
1 | -<?xml version="1.0" encoding="utf-8"?> | 1 | +<?xml version="1.0" encoding="utf-8"?> |
2 | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 2 | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | 3 | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
4 | <PropertyGroup> | 4 | <PropertyGroup> |
5 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 5 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
6 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 6 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
7 | - <ProjectGuid>8b3ec7f4-6106-4f2f-9a57-d10e4bbd93e8</ProjectGuid> | 7 | + <ProjectGuid>{8B3EC7F4-6106-4F2F-9A57-D10E4BBD93E8}</ProjectGuid> |
8 | <OutputType>Library</OutputType> | 8 | <OutputType>Library</OutputType> |
9 | <AppDesignerFolder>Properties</AppDesignerFolder> | 9 | <AppDesignerFolder>Properties</AppDesignerFolder> |
10 | <RootNamespace>AWS_Center</RootNamespace> | 10 | <RootNamespace>AWS_Center</RootNamespace> |
... | @@ -30,24 +30,19 @@ | ... | @@ -30,24 +30,19 @@ |
30 | <WarningLevel>4</WarningLevel> | 30 | <WarningLevel>4</WarningLevel> |
31 | </PropertyGroup> | 31 | </PropertyGroup> |
32 | <ItemGroup> | 32 | <ItemGroup> |
33 | - <Reference Include="System"/> | 33 | + <Reference Include="MySql.Data, Version=8.0.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" /> |
34 | - | 34 | + <Reference Include="System" /> |
35 | - <Reference Include="System.Core"/> | 35 | + <Reference Include="System.Core" /> |
36 | - <Reference Include="System.Xml.Linq"/> | 36 | + <Reference Include="System.Xml.Linq" /> |
37 | - <Reference Include="System.Data.DataSetExtensions"/> | 37 | + <Reference Include="System.Data.DataSetExtensions" /> |
38 | - | 38 | + <Reference Include="Microsoft.CSharp" /> |
39 | - | 39 | + <Reference Include="System.Data" /> |
40 | - <Reference Include="Microsoft.CSharp"/> | 40 | + <Reference Include="System.Net.Http" /> |
41 | - | 41 | + <Reference Include="System.Xml" /> |
42 | - <Reference Include="System.Data"/> | ||
43 | - | ||
44 | - <Reference Include="System.Net.Http"/> | ||
45 | - | ||
46 | - <Reference Include="System.Xml"/> | ||
47 | </ItemGroup> | 42 | </ItemGroup> |
48 | <ItemGroup> | 43 | <ItemGroup> |
49 | <Compile Include="Class1.cs" /> | 44 | <Compile Include="Class1.cs" /> |
50 | <Compile Include="Properties\AssemblyInfo.cs" /> | 45 | <Compile Include="Properties\AssemblyInfo.cs" /> |
51 | </ItemGroup> | 46 | </ItemGroup> |
52 | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | 47 | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
53 | - </Project> | 48 | +</Project> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
AWS_Center/AWS_Center.sln
0 → 100644
1 | + | ||
2 | +Microsoft Visual Studio Solution File, Format Version 12.00 | ||
3 | +# Visual Studio 15 | ||
4 | +VisualStudioVersion = 15.0.27428.2037 | ||
5 | +MinimumVisualStudioVersion = 10.0.40219.1 | ||
6 | +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AWS_Center", "AWS_Center.csproj", "{8B3EC7F4-6106-4F2F-9A57-D10E4BBD93E8}" | ||
7 | +EndProject | ||
8 | +Global | ||
9 | + GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
10 | + Debug|Any CPU = Debug|Any CPU | ||
11 | + Release|Any CPU = Release|Any CPU | ||
12 | + EndGlobalSection | ||
13 | + GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
14 | + {8B3EC7F4-6106-4F2F-9A57-D10E4BBD93E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
15 | + {8B3EC7F4-6106-4F2F-9A57-D10E4BBD93E8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
16 | + {8B3EC7F4-6106-4F2F-9A57-D10E4BBD93E8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
17 | + {8B3EC7F4-6106-4F2F-9A57-D10E4BBD93E8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
18 | + EndGlobalSection | ||
19 | + GlobalSection(SolutionProperties) = preSolution | ||
20 | + HideSolutionNode = FALSE | ||
21 | + EndGlobalSection | ||
22 | + GlobalSection(ExtensibilityGlobals) = postSolution | ||
23 | + SolutionGuid = {EEBEFAA7-7268-4494-ADAF-291BB2AF8588} | ||
24 | + EndGlobalSection | ||
25 | +EndGlobal |
... | @@ -3,7 +3,7 @@ using System.Collections.Generic; | ... | @@ -3,7 +3,7 @@ using System.Collections.Generic; |
3 | using System.Linq; | 3 | using System.Linq; |
4 | using System.Text; | 4 | using System.Text; |
5 | using System.Threading.Tasks; | 5 | using System.Threading.Tasks; |
6 | - | 6 | +using MySql.Data.MySqlClient; |
7 | 7 | ||
8 | // 참고(C# mysql 연결) | 8 | // 참고(C# mysql 연결) |
9 | #region MySql 연결 | 9 | #region MySql 연결 |
... | @@ -40,6 +40,8 @@ namespace AWS_Center | ... | @@ -40,6 +40,8 @@ namespace AWS_Center |
40 | { | 40 | { |
41 | public static class VulnRDS | 41 | public static class VulnRDS |
42 | { | 42 | { |
43 | + public static MySqlConnection Conn { get; set; } | ||
44 | + | ||
43 | public class Vuln | 45 | public class Vuln |
44 | { | 46 | { |
45 | public int Len { get; set; } /* 발견된 취약점 함수 PreFunc 부분의 코드 길이 */ | 47 | public int Len { get; set; } /* 발견된 취약점 함수 PreFunc 부분의 코드 길이 */ |
... | @@ -54,10 +56,30 @@ namespace AWS_Center | ... | @@ -54,10 +56,30 @@ namespace AWS_Center |
54 | // 생성자 | 56 | // 생성자 |
55 | public Vuln() | 57 | public Vuln() |
56 | { | 58 | { |
57 | - | 59 | + |
60 | + | ||
58 | } | 61 | } |
59 | 62 | ||
60 | - | 63 | + |
64 | + } | ||
65 | + | ||
66 | + //connect | ||
67 | + public static void Connect() | ||
68 | + { | ||
69 | + MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder() | ||
70 | + { | ||
71 | + Server = "vulndb.cby38wfppa7l.us-east-2.rds.amazonaws.com", | ||
72 | + UserID = "yhackerbv", | ||
73 | + Password = "guswhd12", | ||
74 | + Database = "vuln", | ||
75 | + Port = 3306, | ||
76 | + }; | ||
77 | + string strConn = builder.ToString(); | ||
78 | + builder = null; | ||
79 | + Conn = new MySqlConnection(strConn); | ||
80 | + | ||
81 | + | ||
82 | + | ||
61 | } | 83 | } |
62 | public static void InsertVulnData(int _len, string _repoName, string _cve, string _funcName, | 84 | public static void InsertVulnData(int _len, string _repoName, string _cve, string _funcName, |
63 | string _preFunc, string _afterFunc, string _hash) | 85 | string _preFunc, string _afterFunc, string _hash) |
... | @@ -66,11 +88,16 @@ namespace AWS_Center | ... | @@ -66,11 +88,16 @@ namespace AWS_Center |
66 | * DB에 취약점 데이터가 이미 있는지 검사해야함 | 88 | * DB에 취약점 데이터가 이미 있는지 검사해야함 |
67 | * | 89 | * |
68 | */ | 90 | */ |
69 | - } | ||
70 | 91 | ||
71 | - public static IEnumerable<string> SearchVulnData(int _len) | 92 | + Conn.Open(); |
72 | - { | 93 | + |
94 | + | ||
73 | 95 | ||
74 | } | 96 | } |
97 | + | ||
98 | + //public static IEnumerable<string> SearchVulnData(int _len) | ||
99 | + //{ | ||
100 | + // | ||
101 | + //} | ||
75 | } | 102 | } |
76 | } | 103 | } | ... | ... |
Tester/App.config
0 → 100644
Tester/Program.cs
0 → 100644
1 | +using System; | ||
2 | +using System.Collections.Generic; | ||
3 | +using System.Linq; | ||
4 | +using System.Text; | ||
5 | +using System.Threading.Tasks; | ||
6 | +using MySql.Data.MySqlClient; | ||
7 | + | ||
8 | +namespace Tester | ||
9 | +{ | ||
10 | + class Program | ||
11 | + { | ||
12 | + static void Main(string[] args) | ||
13 | + { | ||
14 | + | ||
15 | + | ||
16 | + } | ||
17 | + } | ||
18 | +} | ||
19 | + | ||
20 | + | ||
21 | +namespace AWS_Center | ||
22 | +{ | ||
23 | + public static class VulnRDS | ||
24 | + { | ||
25 | + public static MySqlConnection Conn { get; set; } | ||
26 | + | ||
27 | + public class Vuln | ||
28 | + { | ||
29 | + public int VulnId { get; set; } /* 취약점 ID */ | ||
30 | + public int LenBlock { get; set; } /* 취약점 BLOCK 길이 */ | ||
31 | + public string RepositName { get; set; } /* 취약점 레파지토리 이름 */ | ||
32 | + public string Cve { get; set; } /* 취약점 CVE */ | ||
33 | + public string FuncName { get; set; } /* 취약점 함수 이름 */ | ||
34 | + public string Language { get; set; } /* 취약점 언어 종류 */ | ||
35 | + public string CodeOriBefore { get; set; } /* 취약점 패치 전 원본 코드 */ | ||
36 | + public string CodeOriAfter { get; set; } /* 취약점 패치 후 원본 코드 */ | ||
37 | + public string CodeAbsBefore { get; set; } /* 취약점 패치 전 추상화 코드 */ | ||
38 | + public string CodeAbsAfter { get; set; } /* 취약점 패치 후 추상화 코드 */ | ||
39 | + public string BlockHash { get; set; } /* 취약점 블록 해시 값 */ | ||
40 | + // 생성자 | ||
41 | + public Vuln() | ||
42 | + { | ||
43 | + | ||
44 | + | ||
45 | + } | ||
46 | + } | ||
47 | + | ||
48 | + public class User | ||
49 | + { | ||
50 | + public int UserId { get; set; } /* 유저 ID */ | ||
51 | + public string RepositName { get; set; } /* 유저 레파지토리 이름 */ | ||
52 | + public string Cve { get; set; } /* 취약점 CVE */ | ||
53 | + public string CodeOriBefore { get; set; } /* 취약점 패치 전 원본 코드 */ | ||
54 | + public string CodeOriAfter { get; set; } /* 취약점 패치 후 원본 코드 */ | ||
55 | + public string FuncName { get; set; } /* 취약점 함수 이름 */ | ||
56 | + public string DetectDate { get; set; } /* 검사 날짜 */ | ||
57 | + // 생성자 | ||
58 | + public User() | ||
59 | + { | ||
60 | + | ||
61 | + | ||
62 | + } | ||
63 | + | ||
64 | + } | ||
65 | + //connect | ||
66 | + public static void Connect() | ||
67 | + { | ||
68 | + MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder() | ||
69 | + { | ||
70 | + Server = "vulndb.cby38wfppa7l.us-east-2.rds.amazonaws.com", | ||
71 | + UserID = "yhackerbv", | ||
72 | + Password = "guswhd12", | ||
73 | + Database = "vuln", | ||
74 | + Port = 3306, | ||
75 | + }; | ||
76 | + string strConn = builder.ToString(); | ||
77 | + builder = null; | ||
78 | + Conn = new MySqlConnection(strConn); | ||
79 | + } | ||
80 | + public static void InsertVulnData(Vuln vuln) | ||
81 | + { | ||
82 | + /* | ||
83 | + * DB에 취약점 데이터가 이미 있는지 검사해야함 | ||
84 | + * | ||
85 | + */ | ||
86 | + | ||
87 | + Conn.Open(); | ||
88 | + | ||
89 | + } | ||
90 | + | ||
91 | + //public static IEnumerable<string> SearchVulnData(int _len) | ||
92 | + //{ | ||
93 | + // | ||
94 | + //} | ||
95 | + } | ||
96 | +} |
Tester/Properties/AssemblyInfo.cs
0 → 100644
1 | +using System.Reflection; | ||
2 | +using System.Runtime.CompilerServices; | ||
3 | +using System.Runtime.InteropServices; | ||
4 | + | ||
5 | +// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 | ||
6 | +// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 | ||
7 | +// 이러한 특성 값을 변경하세요. | ||
8 | +[assembly: AssemblyTitle("Tester")] | ||
9 | +[assembly: AssemblyDescription("")] | ||
10 | +[assembly: AssemblyConfiguration("")] | ||
11 | +[assembly: AssemblyCompany("")] | ||
12 | +[assembly: AssemblyProduct("Tester")] | ||
13 | +[assembly: AssemblyCopyright("Copyright © 2018")] | ||
14 | +[assembly: AssemblyTrademark("")] | ||
15 | +[assembly: AssemblyCulture("")] | ||
16 | + | ||
17 | +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 | ||
18 | +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 | ||
19 | +// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요. | ||
20 | +[assembly: ComVisible(false)] | ||
21 | + | ||
22 | +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. | ||
23 | +[assembly: Guid("ac204ded-c47f-46fe-b357-01c71849ea76")] | ||
24 | + | ||
25 | +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. | ||
26 | +// | ||
27 | +// 주 버전 | ||
28 | +// 부 버전 | ||
29 | +// 빌드 번호 | ||
30 | +// 수정 버전 | ||
31 | +// | ||
32 | +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 | ||
33 | +// 지정되도록 할 수 있습니다. | ||
34 | +// [assembly: AssemblyVersion("1.0.*")] | ||
35 | +[assembly: AssemblyVersion("1.0.0.0")] | ||
36 | +[assembly: AssemblyFileVersion("1.0.0.0")] |
Tester/Tester.csproj
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
3 | + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
4 | + <PropertyGroup> | ||
5 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
6 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
7 | + <ProjectGuid>{AC204DED-C47F-46FE-B357-01C71849EA76}</ProjectGuid> | ||
8 | + <OutputType>Exe</OutputType> | ||
9 | + <RootNamespace>Tester</RootNamespace> | ||
10 | + <AssemblyName>Tester</AssemblyName> | ||
11 | + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
12 | + <FileAlignment>512</FileAlignment> | ||
13 | + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
14 | + </PropertyGroup> | ||
15 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
16 | + <PlatformTarget>AnyCPU</PlatformTarget> | ||
17 | + <DebugSymbols>true</DebugSymbols> | ||
18 | + <DebugType>full</DebugType> | ||
19 | + <Optimize>false</Optimize> | ||
20 | + <OutputPath>bin\Debug\</OutputPath> | ||
21 | + <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
22 | + <ErrorReport>prompt</ErrorReport> | ||
23 | + <WarningLevel>4</WarningLevel> | ||
24 | + </PropertyGroup> | ||
25 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
26 | + <PlatformTarget>AnyCPU</PlatformTarget> | ||
27 | + <DebugType>pdbonly</DebugType> | ||
28 | + <Optimize>true</Optimize> | ||
29 | + <OutputPath>bin\Release\</OutputPath> | ||
30 | + <DefineConstants>TRACE</DefineConstants> | ||
31 | + <ErrorReport>prompt</ErrorReport> | ||
32 | + <WarningLevel>4</WarningLevel> | ||
33 | + </PropertyGroup> | ||
34 | + <ItemGroup> | ||
35 | + <Reference Include="MySql.Data, Version=8.0.11.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" /> | ||
36 | + <Reference Include="System" /> | ||
37 | + <Reference Include="System.Core" /> | ||
38 | + <Reference Include="System.Xml.Linq" /> | ||
39 | + <Reference Include="System.Data.DataSetExtensions" /> | ||
40 | + <Reference Include="Microsoft.CSharp" /> | ||
41 | + <Reference Include="System.Data" /> | ||
42 | + <Reference Include="System.Net.Http" /> | ||
43 | + <Reference Include="System.Xml" /> | ||
44 | + </ItemGroup> | ||
45 | + <ItemGroup> | ||
46 | + <Compile Include="Program.cs" /> | ||
47 | + <Compile Include="Properties\AssemblyInfo.cs" /> | ||
48 | + </ItemGroup> | ||
49 | + <ItemGroup> | ||
50 | + <None Include="App.config" /> | ||
51 | + </ItemGroup> | ||
52 | + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
53 | +</Project> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -11,6 +11,14 @@ class UserCreationForm(UserCreationForm): | ... | @@ -11,6 +11,14 @@ class UserCreationForm(UserCreationForm): |
11 | help_text=("github 레포지토리를 등록하세요.")) | 11 | help_text=("github 레포지토리를 등록하세요.")) |
12 | 12 | ||
13 | 13 | ||
14 | +class UserEditForm(forms.Form): | ||
15 | + email = EmailField(label=("이메일"), required=True, | ||
16 | + help_text=("이메일을 입력하세요.")) | ||
17 | + | ||
18 | + repository = URLField(label=("레포지토리"), required=True, | ||
19 | + help_text=("github 레포지토리를 입력하세요.")) | ||
20 | + | ||
21 | + | ||
14 | class Meta: | 22 | class Meta: |
15 | model = User | 23 | model = User |
16 | fields = ("username", "email", "repository", "password1", "password2") | 24 | fields = ("username", "email", "repository", "password1", "password2") | ... | ... |
... | @@ -26,6 +26,8 @@ urlpatterns = [ | ... | @@ -26,6 +26,8 @@ urlpatterns = [ |
26 | url(r'^home/', HomeView.as_view(), name='home'), | 26 | url(r'^home/', HomeView.as_view(), name='home'), |
27 | url(r'^myapp/', include('myapp.urls', namespace='myapp')), | 27 | url(r'^myapp/', include('myapp.urls', namespace='myapp')), |
28 | 28 | ||
29 | + url(r'^edit/', EditView.as_view(), name='edit'), | ||
30 | + | ||
29 | url(r'^accounts/', include('django.contrib.auth.urls')), | 31 | url(r'^accounts/', include('django.contrib.auth.urls')), |
30 | url(r'^accounts/register/$', UserCreateView.as_view(), name='register'), | 32 | url(r'^accounts/register/$', UserCreateView.as_view(), name='register'), |
31 | url(r'^accounts/register/done$', UserCreateDoneTV.as_view(), name='register_done'), | 33 | url(r'^accounts/register/done$', UserCreateDoneTV.as_view(), name='register_done'), | ... | ... |
... | @@ -59,6 +59,25 @@ class HomeView(View): | ... | @@ -59,6 +59,25 @@ class HomeView(View): |
59 | # with connection.cursor() as cursor: | 59 | # with connection.cursor() as cursor: |
60 | # cursor.execute(query, param_list) | 60 | # cursor.execute(query, param_list) |
61 | 61 | ||
62 | +class EditView(TemplateView): | ||
63 | + template_name = 'registration/edit.html' | ||
64 | + success_url = reverse_lazy('register_done') | ||
65 | + | ||
66 | + def get(self, request, *args, **kwargs): | ||
67 | + context = {} | ||
68 | + red = 10 | ||
69 | + context['red'] = red | ||
70 | + context['form'] = UserEditForm | ||
71 | + return render(self.request, self.template_name, context) | ||
72 | + | ||
73 | + def post(self, request, *args, **kwargs): | ||
74 | + | ||
75 | + email = self.request.POST['email'] | ||
76 | + repository = self.request.POST['repository'] | ||
77 | + | ||
78 | + print(email, repository) | ||
79 | + return render(self.request, 'index.html') | ||
80 | + | ||
62 | 81 | ||
63 | 82 | ||
64 | class UserCreateView(CreateView): | 83 | class UserCreateView(CreateView): | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -14,6 +14,31 @@ class MypageView(TemplateView): | ... | @@ -14,6 +14,31 @@ class MypageView(TemplateView): |
14 | context = {} | 14 | context = {} |
15 | context['form'] = testform | 15 | context['form'] = testform |
16 | 16 | ||
17 | + query = 'SELECT * FROM vuln.vulnInfo' | ||
18 | + | ||
19 | + param_list = [] | ||
20 | + | ||
21 | + with connection.cursor() as cursor: | ||
22 | + cursor.execute(query, param_list) | ||
23 | + | ||
24 | + columns = [column[0] for column in cursor.description] | ||
25 | + | ||
26 | + object_list = [] | ||
27 | + | ||
28 | + for row in cursor.fetchall(): | ||
29 | + object_list.append(dict(zip(columns, row))) | ||
30 | + | ||
31 | + context = {} | ||
32 | + | ||
33 | + red = 3 | ||
34 | + blue = 4 | ||
35 | + green = 5 | ||
36 | + | ||
37 | + context['red'] = red | ||
38 | + context['blue'] = blue | ||
39 | + context['green'] = green | ||
40 | + context['object_list'] = object_list | ||
41 | + | ||
17 | return render(self.request, self.template_name, context) | 42 | return render(self.request, self.template_name, context) |
18 | 43 | ||
19 | 44 | ... | ... |
... | @@ -37,10 +37,6 @@ | ... | @@ -37,10 +37,6 @@ |
37 | <li class="nav-item mx-0 mx-lg-1"> | 37 | <li class="nav-item mx-0 mx-lg-1"> |
38 | <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="#about">Dynamic</a> | 38 | <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="#about">Dynamic</a> |
39 | </li> | 39 | </li> |
40 | - <li class="nav-item mx-0 mx-lg-1"> | ||
41 | - <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="#contact">Contact</a> | ||
42 | - </li> | ||
43 | - | ||
44 | {% if user.is_active %} | 40 | {% if user.is_active %} |
45 | <!-- <li class="nav-item mx-0 mx-lg-1"> | 41 | <!-- <li class="nav-item mx-0 mx-lg-1"> |
46 | <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="/myapp/mypage">myPage</a> | 42 | <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="/myapp/mypage">myPage</a> |
... | @@ -49,7 +45,7 @@ | ... | @@ -49,7 +45,7 @@ |
49 | <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="{% url 'logout' %}?next=/home">Logout</a> | 45 | <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="{% url 'logout' %}?next=/home">Logout</a> |
50 | </li> | 46 | </li> |
51 | <li class="nav-item mx-0 mx-lg-1"> | 47 | <li class="nav-item mx-0 mx-lg-1"> |
52 | - <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="{% url 'logout' %}?next=/home">Edit Info</a> | 48 | + <a class="nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger" href="{% url 'edit' %}">Edit Info</a> |
53 | </li> | 49 | </li> |
54 | {% else %} | 50 | {% else %} |
55 | <li class="nav-item mx-0 mx-lg-1"> | 51 | <li class="nav-item mx-0 mx-lg-1"> |
... | @@ -214,34 +210,7 @@ | ... | @@ -214,34 +210,7 @@ |
214 | <br></p> | 210 | <br></p> |
215 | </div> | 211 | </div> |
216 | <div class="col-md-4 mb-5 mb-lg-0"> | 212 | <div class="col-md-4 mb-5 mb-lg-0"> |
217 | - <h4 class="text-uppercase mb-4">Around the Web</h4> | 213 | + |
218 | - <ul class="list-inline mb-0"> | ||
219 | - <li class="list-inline-item"> | ||
220 | - <a class="btn btn-outline-light btn-social text-center rounded-circle" href="#"> | ||
221 | - <i class="fa fa-fw fa-facebook"></i> | ||
222 | - </a> | ||
223 | - </li> | ||
224 | - <li class="list-inline-item"> | ||
225 | - <a class="btn btn-outline-light btn-social text-center rounded-circle" href="#"> | ||
226 | - <i class="fa fa-fw fa-google-plus"></i> | ||
227 | - </a> | ||
228 | - </li> | ||
229 | - <li class="list-inline-item"> | ||
230 | - <a class="btn btn-outline-light btn-social text-center rounded-circle" href="#"> | ||
231 | - <i class="fa fa-fw fa-twitter"></i> | ||
232 | - </a> | ||
233 | - </li> | ||
234 | - <li class="list-inline-item"> | ||
235 | - <a class="btn btn-outline-light btn-social text-center rounded-circle" href="#"> | ||
236 | - <i class="fa fa-fw fa-linkedin"></i> | ||
237 | - </a> | ||
238 | - </li> | ||
239 | - <li class="list-inline-item"> | ||
240 | - <a class="btn btn-outline-light btn-social text-center rounded-circle" href="#"> | ||
241 | - <i class="fa fa-fw fa-dribbble"></i> | ||
242 | - </a> | ||
243 | - </li> | ||
244 | - </ul> | ||
245 | </div> | 214 | </div> |
246 | <div class="col-md-4"> | 215 | <div class="col-md-4"> |
247 | <h4 class="text-uppercase mb-4">About Us</h4> | 216 | <h4 class="text-uppercase mb-4">About Us</h4> | ... | ... |
VulnNotti/templates/registration/edit.html
0 → 100644
1 | +{% load staticfiles %} | ||
2 | +{% load crispy_forms_tags %} | ||
3 | +<!DOCTYPE html> | ||
4 | +<html lang="en"> | ||
5 | + <head> | ||
6 | + | ||
7 | + <meta charset="utf-8"> | ||
8 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
9 | + <meta name="description" content=""> | ||
10 | + <meta name="author" content=""> | ||
11 | + | ||
12 | + <title>VulnNotti</title> | ||
13 | + | ||
14 | + <!-- Bootstrap core CSS --> | ||
15 | + <link rel="stylesheet" href="{% static 'vendor/freelancer_bootstrap/css/bootstrap.min.css' %}"> | ||
16 | + | ||
17 | + <!-- Custom fonts for this template --> | ||
18 | + <link rel="stylesheet" href="{% static 'vendor/freelancer_font-awesome/css/font-awesome.min.css' %}"> | ||
19 | + | ||
20 | + <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> | ||
21 | + <link href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css"> | ||
22 | + | ||
23 | + <!-- Plugin CSS --> | ||
24 | + <link rel="stylesheet" href="{% static 'vendor/magnific-popup/magnific-popup.css' %}"> | ||
25 | + <!-- Custom styles for this template --> | ||
26 | + <link rel="stylesheet" href="{% static 'css/freelancer.min.css' %}"> | ||
27 | + | ||
28 | + <style> | ||
29 | + | ||
30 | + .errornote{ | ||
31 | + display: block; | ||
32 | + margin: 5px 0; | ||
33 | + border: 1px solid #c30; | ||
34 | + background: #fcf; | ||
35 | + padding: 5px 25px; | ||
36 | + color: #c30; | ||
37 | + font-size: 12px; | ||
38 | + font-weight: bold; | ||
39 | + } | ||
40 | + | ||
41 | + fieldset{ | ||
42 | + border: 1px solid #ccc; | ||
43 | + } | ||
44 | + | ||
45 | + .aligned label{ | ||
46 | + width: 170px; | ||
47 | + display: block; | ||
48 | + padding: 3px 10px 0 0; | ||
49 | + float: left; | ||
50 | + } | ||
51 | + | ||
52 | + .form-row{ | ||
53 | + padding: 10px; | ||
54 | + font-size: 11px; | ||
55 | + border-bottom: 1px solid #eee; | ||
56 | + } | ||
57 | + | ||
58 | + .submit-row{ | ||
59 | + margin: 5px 0; | ||
60 | + border: 1px solid #ccc; | ||
61 | + text-align: right; | ||
62 | + } | ||
63 | + | ||
64 | + .submit-row input{ | ||
65 | + margin: 10px; | ||
66 | + background: #ffc; | ||
67 | + } | ||
68 | + | ||
69 | + </style> | ||
70 | + </head> | ||
71 | + | ||
72 | + <body id="page-top"> | ||
73 | + | ||
74 | + | ||
75 | + <!-- Header --> | ||
76 | + <header class="masthead bg-primary text-white text-center"> | ||
77 | + <div class="container"> | ||
78 | + <h1>Edit User Repository</h1> | ||
79 | + </div> | ||
80 | + </header> | ||
81 | + | ||
82 | + | ||
83 | + | ||
84 | + <section> | ||
85 | + | ||
86 | + <form method="post" action="."> {% csrf_token %} | ||
87 | + | ||
88 | + {% if form.errors %} | ||
89 | + <p class="errornote">Wrong! Please correct the error(s) below.</p> | ||
90 | + {% endif %} | ||
91 | + | ||
92 | + <fieldset class="aligned"> | ||
93 | + | ||
94 | + <div> | ||
95 | + {{ form|crispy }} | ||
96 | + </div> | ||
97 | + <input class="btn btn-success" style="background-color:#FF0066; border:#FF0066;"type="submit" value="Edit"/> | ||
98 | + | ||
99 | + </fieldset> | ||
100 | + | ||
101 | + </section> | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + <div class="copyright py-4 text-center text-white"> | ||
106 | + <div class="container"> | ||
107 | + <small>Copyright ©www.VulnNotti.com</small> | ||
108 | + </div> | ||
109 | + </div> | ||
110 | + | ||
111 | + <!-- Scroll to Top Button (Only visible on small and extra-small screen sizes) --> | ||
112 | + <div class="scroll-to-top d-lg-none position-fixed "> | ||
113 | + <a class="js-scroll-trigger d-block text-center text-white rounded" href="#page-top"> | ||
114 | + <i class="fa fa-chevron-up"></i> | ||
115 | + </a> | ||
116 | + </div> | ||
117 | + | ||
118 | + <!-- Portfolio Modals --> | ||
119 | + | ||
120 | + <script src="{% static 'vendor/freelancer_jquery/jquery.min.js' %}"></script> | ||
121 | + <script src="{% static 'vendor/freelancer_bootstrap/js/bootstrap.bundle.min.js' %}"></script> | ||
122 | + <script src="{% static 'vendor/jquery-easing/jquery.easing.min.js' %}"></script> | ||
123 | + <script src="{% static 'vendor/magnific-popup/jquery.magnific-popup.min.js' %}"></script> | ||
124 | + <script src="{% static 'js/jqBootstrapValidation.js' %}"></script> | ||
125 | + <script src="{% static 'js/contact_me.js' %}"></script> | ||
126 | + <script src="{% static 'js/freelancer.min.js' %}"></script> | ||
127 | + | ||
128 | + </body> | ||
129 | + | ||
130 | +</html> |
-
Please register or login to post a comment